Project import
diff --git a/slang/.clang-format b/slang/.clang-format new file mode 100644 index 0000000..00c22f5 --- /dev/null +++ b/slang/.clang-format
@@ -0,0 +1,2 @@ +# See http://clang.llvm.org/docs/ClangFormatStyleOptions.html +BasedOnStyle: llvm
diff --git a/slang/Android.mk b/slang/Android.mk new file mode 100644 index 0000000..61fba19 --- /dev/null +++ b/slang/Android.mk
@@ -0,0 +1,207 @@ +# +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +LOCAL_PATH := $(call my-dir) + +FORCE_BUILD_LLVM_DISABLE_NDEBUG ?= false +# Legality check: FORCE_BUILD_LLVM_DISABLE_NDEBUG should consist of one word -- either "true" or "false". +ifneq "$(words $(FORCE_BUILD_LLVM_DISABLE_NDEBUG))$(words $(filter-out true false,$(FORCE_BUILD_LLVM_DISABLE_NDEBUG)))" "10" + $(error FORCE_BUILD_LLVM_DISABLE_NDEBUG may only be true, false, or unset) +endif + +FORCE_BUILD_LLVM_DEBUG ?= false +# Legality check: FORCE_BUILD_LLVM_DEBUG should consist of one word -- either "true" or "false". +ifneq "$(words $(FORCE_BUILD_LLVM_DEBUG))$(words $(filter-out true false,$(FORCE_BUILD_LLVM_DEBUG)))" "10" + $(error FORCE_BUILD_LLVM_DEBUG may only be true, false, or unset) +endif + +# The prebuilt tools should be used when we are doing app-only build. +ifeq ($(TARGET_BUILD_APPS),) + + +local_cflags_for_slang := -Wall -Werror -std=c++11 +ifeq ($(TARGET_BUILD_VARIANT),eng) +local_cflags_for_slang += -O0 -D__ENABLE_INTERNAL_OPTIONS +else +ifeq ($(TARGET_BUILD_VARIANT),userdebug) +else +local_cflags_for_slang += -D__DISABLE_ASSERTS +endif +endif +local_cflags_for_slang += -DTARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT) + +include $(LOCAL_PATH)/rs_version.mk +local_cflags_for_slang += $(RS_VERSION_DEFINE) + +static_libraries_needed_by_slang := \ + libLLVMBitWriter_2_9 \ + libLLVMBitWriter_2_9_func \ + libLLVMBitWriter_3_2 + +# Static library libslang for host +# ======================================================== +include $(CLEAR_VARS) +include $(CLEAR_TBLGEN_VARS) + +LLVM_ROOT_PATH := external/llvm +CLANG_ROOT_PATH := external/clang + +include $(CLANG_ROOT_PATH)/clang.mk + +LOCAL_MODULE := libslang +LOCAL_MODULE_TAGS := optional + +LOCAL_CFLAGS += $(local_cflags_for_slang) + +# Skip missing-field-initializer warnings for mingw. +LOCAL_CFLAGS_windows += -Wno-error=missing-field-initializers + +TBLGEN_TABLES := \ + AttrList.inc \ + Attrs.inc \ + CommentCommandList.inc \ + CommentNodes.inc \ + DeclNodes.inc \ + DiagnosticCommonKinds.inc \ + DiagnosticFrontendKinds.inc \ + DiagnosticSemaKinds.inc \ + StmtNodes.inc + +LOCAL_SRC_FILES := \ + slang.cpp \ + slang_bitcode_gen.cpp \ + slang_backend.cpp \ + slang_diagnostic_buffer.cpp + +LOCAL_C_INCLUDES += frameworks/compile/libbcc/include + +LOCAL_LDLIBS := -ldl -lpthread + +include $(CLANG_HOST_BUILD_MK) +include $(CLANG_TBLGEN_RULES_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(LLVM_GEN_ATTRIBUTES_MK) +include $(BUILD_HOST_STATIC_LIBRARY) + +# ======================================================== +include $(CLEAR_VARS) + +LLVM_ROOT_PATH := external/llvm + +LOCAL_MODULE := llvm-rs-as +LOCAL_MODULE_TAGS := optional + +LOCAL_MODULE_CLASS := EXECUTABLES + +LOCAL_SRC_FILES := \ + llvm-rs-as.cpp + +LOCAL_CFLAGS += $(local_cflags_for_slang) +LOCAL_STATIC_LIBRARIES := \ + libslang \ + $(static_libraries_needed_by_slang) +LOCAL_SHARED_LIBRARIES := \ + libLLVM + +include $(CLANG_HOST_BUILD_MK) +include $(LLVM_HOST_BUILD_MK) +include $(LLVM_GEN_ATTRIBUTES_MK) +include $(BUILD_HOST_EXECUTABLE) + +# Executable llvm-rs-cc for host +# ======================================================== +include $(CLEAR_VARS) +include $(CLEAR_TBLGEN_VARS) + +LOCAL_IS_HOST_MODULE := true +LOCAL_MODULE := llvm-rs-cc + +LOCAL_CFLAGS += $(local_cflags_for_slang) + +# Skip missing-field-initializer warnings for mingw. +LOCAL_CFLAGS += -Wno-error=missing-field-initializers +LOCAL_MODULE_TAGS := optional + +LOCAL_MODULE_CLASS := EXECUTABLES + +TBLGEN_TABLES := \ + AttrList.inc \ + Attrs.inc \ + CommentCommandList.inc \ + CommentNodes.inc \ + DeclNodes.inc \ + DiagnosticCommonKinds.inc \ + DiagnosticDriverKinds.inc \ + DiagnosticFrontendKinds.inc \ + DiagnosticSemaKinds.inc \ + Options.inc \ + RSCCOptions.inc \ + StmtNodes.inc + +LOCAL_SRC_FILES := \ + llvm-rs-cc.cpp \ + rs_cc_options.cpp \ + slang_rs_foreach_lowering.cpp \ + slang_rs_ast_replace.cpp \ + slang_rs_check_ast.cpp \ + slang_rs_context.cpp \ + slang_rs_pragma_handler.cpp \ + slang_rs_exportable.cpp \ + slang_rs_export_type.cpp \ + slang_rs_export_element.cpp \ + slang_rs_export_var.cpp \ + slang_rs_export_func.cpp \ + slang_rs_export_foreach.cpp \ + slang_rs_export_reduce.cpp \ + slang_rs_object_ref_count.cpp \ + slang_rs_reflection.cpp \ + slang_rs_reflection_cpp.cpp \ + slang_rs_reflect_utils.cpp \ + slang_rs_special_func.cpp \ + slang_rs_special_kernel_param.cpp \ + strip_unknown_attributes.cpp + +LOCAL_C_INCLUDES += frameworks/compile/libbcc/include + +LOCAL_STATIC_LIBRARIES := \ + libslang \ + $(static_libraries_needed_by_slang) + +LOCAL_SHARED_LIBRARIES := \ + libclang \ + libLLVM + +LOCAL_LDLIBS_windows := -limagehlp -lpsapi +LOCAL_LDLIBS_linux := -ldl -lpthread +LOCAL_LDLIBS_darwin := -ldl -lpthread + +# For build RSCCOptions.inc from RSCCOptions.td +intermediates := $(call local-generated-sources-dir) +LOCAL_GENERATED_SOURCES += $(intermediates)/RSCCOptions.inc +$(intermediates)/RSCCOptions.inc: $(LOCAL_PATH)/RSCCOptions.td $(LLVM_ROOT_PATH)/include/llvm/Option/OptParser.td $(LLVM_TBLGEN) + @echo "Building Renderscript compiler (llvm-rs-cc) Option tables with tblgen" + $(call transform-host-td-to-out,opt-parser-defs) + +include $(CLANG_HOST_BUILD_MK) +include $(CLANG_TBLGEN_RULES_MK) +include $(LLVM_GEN_ATTRIBUTES_MK) +include $(BUILD_HOST_EXECUTABLE) + +endif # TARGET_BUILD_APPS + +#===================================================================== +# Include Subdirectories +#===================================================================== +include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/slang/BitWriter_2_9/Android.mk b/slang/BitWriter_2_9/Android.mk new file mode 100644 index 0000000..ff9c5bc --- /dev/null +++ b/slang/BitWriter_2_9/Android.mk
@@ -0,0 +1,28 @@ +LOCAL_PATH:= $(call my-dir) + +LLVM_ROOT_PATH := $(LOCAL_PATH)/../../../../external/llvm +include $(LLVM_ROOT_PATH)/llvm.mk + +bitcode_writer_2_9_SRC_FILES := \ + BitcodeWriter.cpp \ + BitcodeWriterPass.cpp \ + ValueEnumerator.cpp + +# For the host +# ===================================================== +include $(CLEAR_VARS) + +LOCAL_CFLAGS += $(local_cflags_for_slang) +LOCAL_C_INCLUDES += frameworks/compile/slang + +LOCAL_SRC_FILES := $(bitcode_writer_2_9_SRC_FILES) + +LOCAL_MODULE:= libLLVMBitWriter_2_9 + +LOCAL_MODULE_HOST_OS := darwin linux windows + +include $(LLVM_HOST_BUILD_MK) +include $(LLVM_GEN_ATTRIBUTES_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_HOST_STATIC_LIBRARY) +
diff --git a/slang/BitWriter_2_9/BitcodeWriter.cpp b/slang/BitWriter_2_9/BitcodeWriter.cpp new file mode 100644 index 0000000..5a905f8 --- /dev/null +++ b/slang/BitWriter_2_9/BitcodeWriter.cpp
@@ -0,0 +1,1739 @@ +//===--- Bitcode/Writer/BitcodeWriter.cpp - Bitcode Writer ----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Bitcode writer implementation. +// +//===----------------------------------------------------------------------===// + +#include "ReaderWriter_2_9.h" +#include "legacy_bitcode.h" +#include "ValueEnumerator.h" +#include "llvm/ADT/Triple.h" +#include "llvm/Bitcode/BitstreamWriter.h" +#include "llvm/Bitcode/LLVMBitCodes.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DebugInfoMetadata.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/InlineAsm.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/Operator.h" +#include "llvm/IR/ValueSymbolTable.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/Support/Program.h" +#include "llvm/Support/raw_ostream.h" +#include <cctype> +#include <map> +using namespace llvm; + +// Redefine older bitcode opcodes for use here. Note that these come from +// LLVM 2.7 (which is what HC shipped with). +#define METADATA_NODE_2_7 2 +#define METADATA_FN_NODE_2_7 3 +#define METADATA_NAMED_NODE_2_7 5 +#define METADATA_ATTACHMENT_2_7 7 +#define FUNC_CODE_INST_CALL_2_7 22 +#define FUNC_CODE_DEBUG_LOC_2_7 32 + +// Redefine older bitcode opcodes for use here. Note that these come from +// LLVM 2.7 - 3.0. +#define TYPE_BLOCK_ID_OLD_3_0 10 +#define TYPE_SYMTAB_BLOCK_ID_OLD_3_0 13 +#define TYPE_CODE_STRUCT_OLD_3_0 10 + +/// These are manifest constants used by the bitcode writer. They do not need to +/// be kept in sync with the reader, but need to be consistent within this file. +enum { + CurVersion = 0, + + // VALUE_SYMTAB_BLOCK abbrev id's. + VST_ENTRY_8_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + VST_ENTRY_7_ABBREV, + VST_ENTRY_6_ABBREV, + VST_BBENTRY_6_ABBREV, + + // CONSTANTS_BLOCK abbrev id's. + CONSTANTS_SETTYPE_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + CONSTANTS_INTEGER_ABBREV, + CONSTANTS_CE_CAST_Abbrev, + CONSTANTS_NULL_Abbrev, + + // FUNCTION_BLOCK abbrev id's. + FUNCTION_INST_LOAD_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + FUNCTION_INST_BINOP_ABBREV, + FUNCTION_INST_BINOP_FLAGS_ABBREV, + FUNCTION_INST_CAST_ABBREV, + FUNCTION_INST_RET_VOID_ABBREV, + FUNCTION_INST_RET_VAL_ABBREV, + FUNCTION_INST_UNREACHABLE_ABBREV +}; + +static unsigned GetEncodedCastOpcode(unsigned Opcode) { + switch (Opcode) { + default: llvm_unreachable("Unknown cast instruction!"); + case Instruction::Trunc : return bitc::CAST_TRUNC; + case Instruction::ZExt : return bitc::CAST_ZEXT; + case Instruction::SExt : return bitc::CAST_SEXT; + case Instruction::FPToUI : return bitc::CAST_FPTOUI; + case Instruction::FPToSI : return bitc::CAST_FPTOSI; + case Instruction::UIToFP : return bitc::CAST_UITOFP; + case Instruction::SIToFP : return bitc::CAST_SITOFP; + case Instruction::FPTrunc : return bitc::CAST_FPTRUNC; + case Instruction::FPExt : return bitc::CAST_FPEXT; + case Instruction::PtrToInt: return bitc::CAST_PTRTOINT; + case Instruction::IntToPtr: return bitc::CAST_INTTOPTR; + case Instruction::BitCast : return bitc::CAST_BITCAST; + } +} + +static unsigned GetEncodedBinaryOpcode(unsigned Opcode) { + switch (Opcode) { + default: llvm_unreachable("Unknown binary instruction!"); + case Instruction::Add: + case Instruction::FAdd: return bitc::BINOP_ADD; + case Instruction::Sub: + case Instruction::FSub: return bitc::BINOP_SUB; + case Instruction::Mul: + case Instruction::FMul: return bitc::BINOP_MUL; + case Instruction::UDiv: return bitc::BINOP_UDIV; + case Instruction::FDiv: + case Instruction::SDiv: return bitc::BINOP_SDIV; + case Instruction::URem: return bitc::BINOP_UREM; + case Instruction::FRem: + case Instruction::SRem: return bitc::BINOP_SREM; + case Instruction::Shl: return bitc::BINOP_SHL; + case Instruction::LShr: return bitc::BINOP_LSHR; + case Instruction::AShr: return bitc::BINOP_ASHR; + case Instruction::And: return bitc::BINOP_AND; + case Instruction::Or: return bitc::BINOP_OR; + case Instruction::Xor: return bitc::BINOP_XOR; + } +} + +static void WriteStringRecord(unsigned Code, StringRef Str, + unsigned AbbrevToUse, BitstreamWriter &Stream) { + SmallVector<unsigned, 64> Vals; + + // Code: [strchar x N] + for (unsigned i = 0, e = Str.size(); i != e; ++i) { + if (AbbrevToUse && !BitCodeAbbrevOp::isChar6(Str[i])) + AbbrevToUse = 0; + Vals.push_back(Str[i]); + } + + // Emit the finished record. + Stream.EmitRecord(Code, Vals, AbbrevToUse); +} + +// Emit information about parameter attributes. +static void WriteAttributeTable(const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const std::vector<AttributeSet> &Attrs = VE.getAttributes(); + if (Attrs.empty()) return; + + Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3); + + SmallVector<uint64_t, 64> Record; + for (unsigned i = 0, e = Attrs.size(); i != e; ++i) { + const AttributeSet &A = Attrs[i]; + for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) { + Record.push_back(A.getSlotIndex(i)); + Record.push_back(encodeLLVMAttributesForBitcode(A, A.getSlotIndex(i))); + } + + // This needs to use the 3.2 entry type + Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY_OLD, Record); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteTypeSymbolTable(const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const llvm_2_9::ValueEnumerator::TypeList &TypeList = VE.getTypes(); + Stream.EnterSubblock(TYPE_SYMTAB_BLOCK_ID_OLD_3_0, 3); + + // 7-bit fixed width VST_CODE_ENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(VE.getTypes().size()+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); + unsigned V7Abbrev = Stream.EmitAbbrev(Abbv); + + SmallVector<unsigned, 64> NameVals; + + for (unsigned i = 0, e = TypeList.size(); i != e; ++i) { + Type *T = TypeList[i]; + + switch (T->getTypeID()) { + case Type::StructTyID: { + StructType *ST = cast<StructType>(T); + if (ST->isLiteral()) { + // Skip anonymous struct definitions in type symbol table + // FIXME(srhines) + break; + } + + // TST_ENTRY: [typeid, namechar x N] + NameVals.push_back(i); + + const std::string &Str = ST->getName(); + bool is7Bit = true; + for (unsigned i = 0, e = Str.size(); i != e; ++i) { + NameVals.push_back((unsigned char)Str[i]); + if (Str[i] & 128) + is7Bit = false; + } + + // Emit the finished record. + Stream.EmitRecord(bitc::VST_CODE_ENTRY, NameVals, is7Bit ? V7Abbrev : 0); + NameVals.clear(); + + break; + } + default: break; + } + } + + Stream.ExitBlock(); +} + +/// WriteTypeTable - Write out the type table for a module. +static void WriteTypeTable(const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const llvm_2_9::ValueEnumerator::TypeList &TypeList = VE.getTypes(); + + Stream.EnterSubblock(TYPE_BLOCK_ID_OLD_3_0, 4 /*count from # abbrevs */); + SmallVector<uint64_t, 64> TypeVals; + + uint64_t NumBits = Log2_32_Ceil(VE.getTypes().size()+1); + + // Abbrev for TYPE_CODE_POINTER. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_POINTER)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0 + unsigned PtrAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_FUNCTION. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_FUNCTION_OLD)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isvararg + Abbv->Add(BitCodeAbbrevOp(0)); // FIXME: DEAD value, remove in LLVM 3.0 + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + unsigned FunctionAbbrev = Stream.EmitAbbrev(Abbv); + + + // Abbrev for TYPE_CODE_STRUCT. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(TYPE_CODE_STRUCT_OLD_3_0)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ispacked + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + unsigned StructAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_ARRAY. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_ARRAY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); // size + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + + unsigned ArrayAbbrev = Stream.EmitAbbrev(Abbv); + + // Emit an entry count so the reader can reserve space. + TypeVals.push_back(TypeList.size()); + Stream.EmitRecord(bitc::TYPE_CODE_NUMENTRY, TypeVals); + TypeVals.clear(); + + // Loop over all of the types, emitting each in turn. + for (unsigned i = 0, e = TypeList.size(); i != e; ++i) { + Type *T = TypeList[i]; + int AbbrevToUse = 0; + unsigned Code = 0; + + switch (T->getTypeID()) { + default: llvm_unreachable("Unknown type!"); + case Type::VoidTyID: Code = bitc::TYPE_CODE_VOID; break; + case Type::FloatTyID: Code = bitc::TYPE_CODE_FLOAT; break; + case Type::DoubleTyID: Code = bitc::TYPE_CODE_DOUBLE; break; + case Type::X86_FP80TyID: Code = bitc::TYPE_CODE_X86_FP80; break; + case Type::FP128TyID: Code = bitc::TYPE_CODE_FP128; break; + case Type::PPC_FP128TyID: Code = bitc::TYPE_CODE_PPC_FP128; break; + case Type::LabelTyID: Code = bitc::TYPE_CODE_LABEL; break; + case Type::MetadataTyID: Code = bitc::TYPE_CODE_METADATA; break; + case Type::X86_MMXTyID: Code = bitc::TYPE_CODE_X86_MMX; break; + case Type::IntegerTyID: + // INTEGER: [width] + Code = bitc::TYPE_CODE_INTEGER; + TypeVals.push_back(cast<IntegerType>(T)->getBitWidth()); + break; + case Type::PointerTyID: { + PointerType *PTy = cast<PointerType>(T); + // POINTER: [pointee type, address space] + Code = bitc::TYPE_CODE_POINTER; + TypeVals.push_back(VE.getTypeID(PTy->getElementType())); + unsigned AddressSpace = PTy->getAddressSpace(); + TypeVals.push_back(AddressSpace); + if (AddressSpace == 0) AbbrevToUse = PtrAbbrev; + break; + } + case Type::FunctionTyID: { + FunctionType *FT = cast<FunctionType>(T); + // FUNCTION: [isvararg, attrid, retty, paramty x N] + Code = bitc::TYPE_CODE_FUNCTION_OLD; + TypeVals.push_back(FT->isVarArg()); + TypeVals.push_back(0); // FIXME: DEAD: remove in llvm 3.0 + TypeVals.push_back(VE.getTypeID(FT->getReturnType())); + for (unsigned i = 0, e = FT->getNumParams(); i != e; ++i) + TypeVals.push_back(VE.getTypeID(FT->getParamType(i))); + AbbrevToUse = FunctionAbbrev; + break; + } + case Type::StructTyID: { + StructType *ST = cast<StructType>(T); + // STRUCT: [ispacked, eltty x N] + TypeVals.push_back(ST->isPacked()); + // Output all of the element types. + for (StructType::element_iterator I = ST->element_begin(), + E = ST->element_end(); I != E; ++I) + TypeVals.push_back(VE.getTypeID(*I)); + Code = TYPE_CODE_STRUCT_OLD_3_0; + AbbrevToUse = StructAbbrev; + break; + } + case Type::ArrayTyID: { + ArrayType *AT = cast<ArrayType>(T); + // ARRAY: [numelts, eltty] + Code = bitc::TYPE_CODE_ARRAY; + TypeVals.push_back(AT->getNumElements()); + TypeVals.push_back(VE.getTypeID(AT->getElementType())); + AbbrevToUse = ArrayAbbrev; + break; + } + case Type::VectorTyID: { + VectorType *VT = cast<VectorType>(T); + // VECTOR [numelts, eltty] + Code = bitc::TYPE_CODE_VECTOR; + TypeVals.push_back(VT->getNumElements()); + TypeVals.push_back(VE.getTypeID(VT->getElementType())); + break; + } + } + + // Emit the finished record. + Stream.EmitRecord(Code, TypeVals, AbbrevToUse); + TypeVals.clear(); + } + + Stream.ExitBlock(); + + WriteTypeSymbolTable(VE, Stream); +} + +static unsigned getEncodedLinkage(const GlobalValue &GV) { + switch (GV.getLinkage()) { + case GlobalValue::ExternalLinkage: + return 0; + case GlobalValue::WeakAnyLinkage: + return 1; + case GlobalValue::AppendingLinkage: + return 2; + case GlobalValue::InternalLinkage: + return 3; + case GlobalValue::LinkOnceAnyLinkage: + return 4; + case GlobalValue::ExternalWeakLinkage: + return 7; + case GlobalValue::CommonLinkage: + return 8; + case GlobalValue::PrivateLinkage: + return 9; + case GlobalValue::WeakODRLinkage: + return 10; + case GlobalValue::LinkOnceODRLinkage: + return 11; + case GlobalValue::AvailableExternallyLinkage: + return 12; + } + llvm_unreachable("Invalid linkage"); +} + +static unsigned getEncodedVisibility(const GlobalValue &GV) { + switch (GV.getVisibility()) { + case GlobalValue::DefaultVisibility: return 0; + case GlobalValue::HiddenVisibility: return 1; + case GlobalValue::ProtectedVisibility: return 2; + } + llvm_unreachable("Invalid visibility"); +} + +// Emit top-level description of module, including target triple, inline asm, +// descriptors for global variables, and function prototype info. +static void WriteModuleInfo(const Module *M, + const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + // Emit various pieces of data attached to a module. + if (!M->getTargetTriple().empty()) + WriteStringRecord(bitc::MODULE_CODE_TRIPLE, M->getTargetTriple(), + 0/*TODO*/, Stream); + const std::string &DL = M->getDataLayoutStr(); + if (!DL.empty()) + WriteStringRecord(bitc::MODULE_CODE_DATALAYOUT, DL, 0 /*TODO*/, Stream); + if (!M->getModuleInlineAsm().empty()) + WriteStringRecord(bitc::MODULE_CODE_ASM, M->getModuleInlineAsm(), + 0/*TODO*/, Stream); + + // Emit information about sections and GC, computing how many there are. Also + // compute the maximum alignment value. + std::map<std::string, unsigned> SectionMap; + std::map<std::string, unsigned> GCMap; + unsigned MaxAlignment = 0; + unsigned MaxGlobalType = 0; + for (const GlobalValue &GV : M->globals()) { + MaxAlignment = std::max(MaxAlignment, GV.getAlignment()); + MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV.getType())); + if (GV.hasSection()) { + // Give section names unique ID's. + unsigned &Entry = SectionMap[GV.getSection()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, GV.getSection(), + 0/*TODO*/, Stream); + Entry = SectionMap.size(); + } + } + } + for (const Function &F : *M) { + MaxAlignment = std::max(MaxAlignment, F.getAlignment()); + if (F.hasSection()) { + // Give section names unique ID's. + unsigned &Entry = SectionMap[F.getSection()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, F.getSection(), + 0/*TODO*/, Stream); + Entry = SectionMap.size(); + } + } + if (F.hasGC()) { + // Same for GC names. + unsigned &Entry = GCMap[F.getGC()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_GCNAME, F.getGC(), + 0/*TODO*/, Stream); + Entry = GCMap.size(); + } + } + } + + // Emit abbrev for globals, now that we know # sections and max alignment. + unsigned SimpleGVarAbbrev = 0; + if (!M->global_empty()) { + // Add an abbrev for common globals with no visibility or thread localness. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::MODULE_CODE_GLOBALVAR)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(MaxGlobalType+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Constant. + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Initializer. + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // Linkage. + if (MaxAlignment == 0) // Alignment. + Abbv->Add(BitCodeAbbrevOp(0)); + else { + unsigned MaxEncAlignment = Log2_32(MaxAlignment)+1; + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(MaxEncAlignment+1))); + } + if (SectionMap.empty()) // Section. + Abbv->Add(BitCodeAbbrevOp(0)); + else + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(SectionMap.size()+1))); + // Don't bother emitting vis + thread local. + SimpleGVarAbbrev = Stream.EmitAbbrev(Abbv); + } + + // Emit the global variable information. + SmallVector<unsigned, 64> Vals; + for (const GlobalVariable &GV : M->globals()) { + unsigned AbbrevToUse = 0; + + // GLOBALVAR: [type, isconst, initid, + // linkage, alignment, section, visibility, threadlocal, + // unnamed_addr] + Vals.push_back(VE.getTypeID(GV.getType())); + Vals.push_back(GV.isConstant()); + Vals.push_back(GV.isDeclaration() ? 0 : + (VE.getValueID(GV.getInitializer()) + 1)); + Vals.push_back(getEncodedLinkage(GV)); + Vals.push_back(Log2_32(GV.getAlignment())+1); + Vals.push_back(GV.hasSection() ? SectionMap[GV.getSection()] : 0); + if (GV.isThreadLocal() || + GV.getVisibility() != GlobalValue::DefaultVisibility || + GV.hasUnnamedAddr()) { + Vals.push_back(getEncodedVisibility(GV)); + Vals.push_back(GV.isThreadLocal()); + Vals.push_back(GV.hasUnnamedAddr()); + } else { + AbbrevToUse = SimpleGVarAbbrev; + } + + Stream.EmitRecord(bitc::MODULE_CODE_GLOBALVAR, Vals, AbbrevToUse); + Vals.clear(); + } + + // Emit the function proto information. + for (const Function &F : *M) { + // FUNCTION: [type, callingconv, isproto, paramattr, + // linkage, alignment, section, visibility, gc, unnamed_addr] + Vals.push_back(VE.getTypeID(F.getType())); + Vals.push_back(F.getCallingConv()); + Vals.push_back(F.isDeclaration()); + Vals.push_back(getEncodedLinkage(F)); + Vals.push_back(VE.getAttributeID(F.getAttributes())); + Vals.push_back(Log2_32(F.getAlignment())+1); + Vals.push_back(F.hasSection() ? SectionMap[F.getSection()] : 0); + Vals.push_back(getEncodedVisibility(F)); + Vals.push_back(F.hasGC() ? GCMap[F.getGC()] : 0); + Vals.push_back(F.hasUnnamedAddr()); + + unsigned AbbrevToUse = 0; + Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse); + Vals.clear(); + } + + // Emit the alias information. + for (const GlobalAlias &A : M->aliases()) { + Vals.push_back(VE.getTypeID(A.getType())); + Vals.push_back(VE.getValueID(A.getAliasee())); + Vals.push_back(getEncodedLinkage(A)); + Vals.push_back(getEncodedVisibility(A)); + unsigned AbbrevToUse = 0; + Stream.EmitRecord(bitc::MODULE_CODE_ALIAS_OLD, Vals, AbbrevToUse); + Vals.clear(); + } +} + +static uint64_t GetOptimizationFlags(const Value *V) { + uint64_t Flags = 0; + + if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) { + if (OBO->hasNoSignedWrap()) + Flags |= 1 << bitc::OBO_NO_SIGNED_WRAP; + if (OBO->hasNoUnsignedWrap()) + Flags |= 1 << bitc::OBO_NO_UNSIGNED_WRAP; + } else if (const auto *PEO = dyn_cast<PossiblyExactOperator>(V)) { + if (PEO->isExact()) + Flags |= 1 << bitc::PEO_EXACT; + } + + return Flags; +} + +static void WriteValueAsMetadata(const ValueAsMetadata *MD, + const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record) { + // Mimic an MDNode with a value as one operand. + Value *V = MD->getValue(); + Record.push_back(VE.getTypeID(V->getType())); + Record.push_back(VE.getValueID(V)); + Stream.EmitRecord(METADATA_NODE_2_7, Record, 0); + Record.clear(); +} + +static void WriteMDTuple(const MDTuple *N, const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, unsigned Abbrev) { + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { + Metadata *MD = N->getOperand(i); + assert(!(MD && isa<LocalAsMetadata>(MD)) && + "Unexpected function-local metadata"); + if (!MD) { + // TODO(srhines): I don't believe this case can exist for RS. + Record.push_back(VE.getTypeID(llvm::Type::getVoidTy(N->getContext()))); + Record.push_back(0); + } else if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MD)) { + Record.push_back(VE.getTypeID(MDC->getType())); + Record.push_back(VE.getValueID(MDC->getValue())); + } else { + Record.push_back(VE.getTypeID( + llvm::Type::getMetadataTy(N->getContext()))); + Record.push_back(VE.getMetadataID(MD)); + } + } + Stream.EmitRecord(METADATA_NODE_2_7, Record, Abbrev); + Record.clear(); +} + +/*static void WriteMDLocation(const MDLocation *N, const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, + unsigned Abbrev) { + Record.push_back(N->isDistinct()); + Record.push_back(N->getLine()); + Record.push_back(N->getColumn()); + Record.push_back(VE.getMetadataID(N->getScope())); + Record.push_back(VE.getMetadataOrNullID(N->getInlinedAt())); + + Stream.EmitRecord(bitc::METADATA_LOCATION, Record, Abbrev); + Record.clear(); +} + +static void WriteGenericDebugNode(const GenericDebugNode *, + const llvm_2_9::ValueEnumerator &, BitstreamWriter &, + SmallVectorImpl<uint64_t> &, unsigned) { + llvm_unreachable("unimplemented"); +}*/ + +static void WriteModuleMetadata(const Module *M, + const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const auto &MDs = VE.getMDs(); + if (MDs.empty() && M->named_metadata_empty()) + return; + + // RenderScript files *ALWAYS* have metadata! + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + + unsigned MDSAbbrev = 0; + if (VE.hasMDString()) { + // Abbrev for METADATA_STRING. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_STRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + MDSAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned MDLocationAbbrev = 0; + if (VE.hasDILocation()) { + // TODO(srhines): Should be unreachable for RenderScript. + // Abbrev for METADATA_LOCATION. + // + // Assume the column is usually under 128, and always output the inlined-at + // location (it's never more expensive than building an array size 1). + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_LOCATION)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + MDLocationAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned NameAbbrev = 0; + if (!M->named_metadata_empty()) { + // Abbrev for METADATA_NAME. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_NAME)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + NameAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned MDTupleAbbrev = 0; + //unsigned GenericDebugNodeAbbrev = 0; + SmallVector<uint64_t, 64> Record; + for (const Metadata *MD : MDs) { + if (const MDNode *N = dyn_cast<MDNode>(MD)) { + switch (N->getMetadataID()) { + default: + llvm_unreachable("Invalid MDNode subclass"); +#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) +#define HANDLE_MDNODE_LEAF(CLASS) \ + case Metadata::CLASS##Kind: \ + Write##CLASS(cast<CLASS>(N), VE, Stream, Record, CLASS##Abbrev); \ + continue; +#include "llvm/IR/Metadata.def" + } + } + if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MD)) { + WriteValueAsMetadata(MDC, VE, Stream, Record); + continue; + } + const MDString *MDS = cast<MDString>(MD); + // Code: [strchar x N] + Record.append(MDS->bytes_begin(), MDS->bytes_end()); + + // Emit the finished record. + Stream.EmitRecord(bitc::METADATA_STRING, Record, MDSAbbrev); + Record.clear(); + } + + // Write named metadata. + for (const NamedMDNode &NMD : M->named_metadata()) { + // Write name. + StringRef Str = NMD.getName(); + Record.append(Str.bytes_begin(), Str.bytes_end()); + Stream.EmitRecord(bitc::METADATA_NAME, Record, NameAbbrev); + Record.clear(); + + // Write named metadata operands. + for (const MDNode *N : NMD.operands()) + Record.push_back(VE.getMetadataID(N)); + Stream.EmitRecord(METADATA_NAMED_NODE_2_7, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteFunctionLocalMetadata(const Function &F, + const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + bool StartedMetadataBlock = false; + SmallVector<uint64_t, 64> Record; + const SmallVectorImpl<const LocalAsMetadata *> &MDs = + VE.getFunctionLocalMDs(); + for (unsigned i = 0, e = MDs.size(); i != e; ++i) { + assert(MDs[i] && "Expected valid function-local metadata"); + if (!StartedMetadataBlock) { + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + StartedMetadataBlock = true; + } + WriteValueAsMetadata(MDs[i], VE, Stream, Record); + } + + if (StartedMetadataBlock) + Stream.ExitBlock(); +} + +static void WriteMetadataAttachment(const Function &F, + const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::METADATA_ATTACHMENT_ID, 3); + + SmallVector<uint64_t, 64> Record; + + // Write metadata attachments + // METADATA_ATTACHMENT - [m x [value, [n x [id, mdnode]]] + SmallVector<std::pair<unsigned, MDNode *>, 4> MDs; + + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); + I != E; ++I) { + MDs.clear(); + I->getAllMetadataOtherThanDebugLoc(MDs); + + // If no metadata, ignore instruction. + if (MDs.empty()) continue; + + Record.push_back(VE.getInstructionID(&*I)); + + for (unsigned i = 0, e = MDs.size(); i != e; ++i) { + Record.push_back(MDs[i].first); + Record.push_back(VE.getMetadataID(MDs[i].second)); + } + Stream.EmitRecord(METADATA_ATTACHMENT_2_7, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteModuleMetadataStore(const Module *M, BitstreamWriter &Stream) { + SmallVector<uint64_t, 64> Record; + + // Write metadata kinds + // METADATA_KIND - [n x [id, name]] + SmallVector<StringRef, 4> Names; + M->getMDKindNames(Names); + + if (Names.empty()) return; + + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + + for (unsigned MDKindID = 0, e = Names.size(); MDKindID != e; ++MDKindID) { + Record.push_back(MDKindID); + StringRef KName = Names[MDKindID]; + Record.append(KName.begin(), KName.end()); + + Stream.EmitRecord(bitc::METADATA_KIND, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteConstants(unsigned FirstVal, unsigned LastVal, + const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream, bool isGlobal) { + if (FirstVal == LastVal) return; + + Stream.EnterSubblock(bitc::CONSTANTS_BLOCK_ID, 4); + + unsigned AggregateAbbrev = 0; + unsigned String8Abbrev = 0; + unsigned CString7Abbrev = 0; + unsigned CString6Abbrev = 0; + // If this is a constant pool for the module, emit module-specific abbrevs. + if (isGlobal) { + // Abbrev for CST_CODE_AGGREGATE. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_AGGREGATE)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, Log2_32_Ceil(LastVal+1))); + AggregateAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for CST_CODE_STRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_STRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + String8Abbrev = Stream.EmitAbbrev(Abbv); + // Abbrev for CST_CODE_CSTRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CSTRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); + CString7Abbrev = Stream.EmitAbbrev(Abbv); + // Abbrev for CST_CODE_CSTRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CSTRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + CString6Abbrev = Stream.EmitAbbrev(Abbv); + } + + SmallVector<uint64_t, 64> Record; + + const llvm_2_9::ValueEnumerator::ValueList &Vals = VE.getValues(); + Type *LastTy = nullptr; + for (unsigned i = FirstVal; i != LastVal; ++i) { + const Value *V = Vals[i].first; + // If we need to switch types, do so now. + if (V->getType() != LastTy) { + LastTy = V->getType(); + Record.push_back(VE.getTypeID(LastTy)); + Stream.EmitRecord(bitc::CST_CODE_SETTYPE, Record, + CONSTANTS_SETTYPE_ABBREV); + Record.clear(); + } + + if (const InlineAsm *IA = dyn_cast<InlineAsm>(V)) { + Record.push_back(unsigned(IA->hasSideEffects()) | + unsigned(IA->isAlignStack()) << 1); + + // Add the asm string. + const std::string &AsmStr = IA->getAsmString(); + Record.push_back(AsmStr.size()); + for (unsigned i = 0, e = AsmStr.size(); i != e; ++i) + Record.push_back(AsmStr[i]); + + // Add the constraint string. + const std::string &ConstraintStr = IA->getConstraintString(); + Record.push_back(ConstraintStr.size()); + for (unsigned i = 0, e = ConstraintStr.size(); i != e; ++i) + Record.push_back(ConstraintStr[i]); + Stream.EmitRecord(bitc::CST_CODE_INLINEASM, Record); + Record.clear(); + continue; + } + const Constant *C = cast<Constant>(V); + unsigned Code = -1U; + unsigned AbbrevToUse = 0; + if (C->isNullValue()) { + Code = bitc::CST_CODE_NULL; + } else if (isa<UndefValue>(C)) { + Code = bitc::CST_CODE_UNDEF; + } else if (const ConstantInt *IV = dyn_cast<ConstantInt>(C)) { + if (IV->getBitWidth() <= 64) { + uint64_t V = IV->getSExtValue(); + if ((int64_t)V >= 0) + Record.push_back(V << 1); + else + Record.push_back((-V << 1) | 1); + Code = bitc::CST_CODE_INTEGER; + AbbrevToUse = CONSTANTS_INTEGER_ABBREV; + } else { // Wide integers, > 64 bits in size. + // We have an arbitrary precision integer value to write whose + // bit width is > 64. However, in canonical unsigned integer + // format it is likely that the high bits are going to be zero. + // So, we only write the number of active words. + unsigned NWords = IV->getValue().getActiveWords(); + const uint64_t *RawWords = IV->getValue().getRawData(); + for (unsigned i = 0; i != NWords; ++i) { + int64_t V = RawWords[i]; + if (V >= 0) + Record.push_back(V << 1); + else + Record.push_back((-V << 1) | 1); + } + Code = bitc::CST_CODE_WIDE_INTEGER; + } + } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) { + Code = bitc::CST_CODE_FLOAT; + Type *Ty = CFP->getType(); + if (Ty->isFloatTy() || Ty->isDoubleTy()) { + Record.push_back(CFP->getValueAPF().bitcastToAPInt().getZExtValue()); + } else if (Ty->isX86_FP80Ty()) { + // api needed to prevent premature destruction + // bits are not in the same order as a normal i80 APInt, compensate. + APInt api = CFP->getValueAPF().bitcastToAPInt(); + const uint64_t *p = api.getRawData(); + Record.push_back((p[1] << 48) | (p[0] >> 16)); + Record.push_back(p[0] & 0xffffLL); + } else if (Ty->isFP128Ty() || Ty->isPPC_FP128Ty()) { + APInt api = CFP->getValueAPF().bitcastToAPInt(); + const uint64_t *p = api.getRawData(); + Record.push_back(p[0]); + Record.push_back(p[1]); + } else { + assert (0 && "Unknown FP type!"); + } + } else if (isa<ConstantDataSequential>(C) && + cast<ConstantDataSequential>(C)->isString()) { + const ConstantDataSequential *Str = cast<ConstantDataSequential>(C); + // Emit constant strings specially. + unsigned NumElts = Str->getNumElements(); + // If this is a null-terminated string, use the denser CSTRING encoding. + if (Str->isCString()) { + Code = bitc::CST_CODE_CSTRING; + --NumElts; // Don't encode the null, which isn't allowed by char6. + } else { + Code = bitc::CST_CODE_STRING; + AbbrevToUse = String8Abbrev; + } + bool isCStr7 = Code == bitc::CST_CODE_CSTRING; + bool isCStrChar6 = Code == bitc::CST_CODE_CSTRING; + for (unsigned i = 0; i != NumElts; ++i) { + unsigned char V = Str->getElementAsInteger(i); + Record.push_back(V); + isCStr7 &= (V & 128) == 0; + if (isCStrChar6) + isCStrChar6 = BitCodeAbbrevOp::isChar6(V); + } + + if (isCStrChar6) + AbbrevToUse = CString6Abbrev; + else if (isCStr7) + AbbrevToUse = CString7Abbrev; + } else if (const ConstantDataSequential *CDS = + dyn_cast<ConstantDataSequential>(C)) { + // We must replace ConstantDataSequential's representation with the + // legacy ConstantArray/ConstantVector/ConstantStruct version. + // ValueEnumerator is similarly modified to mark the appropriate + // Constants as used (so they are emitted). + Code = bitc::CST_CODE_AGGREGATE; + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) + Record.push_back(VE.getValueID(CDS->getElementAsConstant(i))); + AbbrevToUse = AggregateAbbrev; + } else if (isa<ConstantArray>(C) || isa<ConstantStruct>(C) || + isa<ConstantVector>(C)) { + Code = bitc::CST_CODE_AGGREGATE; + for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) + Record.push_back(VE.getValueID(C->getOperand(i))); + AbbrevToUse = AggregateAbbrev; + } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { + switch (CE->getOpcode()) { + default: + if (Instruction::isCast(CE->getOpcode())) { + Code = bitc::CST_CODE_CE_CAST; + Record.push_back(GetEncodedCastOpcode(CE->getOpcode())); + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + AbbrevToUse = CONSTANTS_CE_CAST_Abbrev; + } else { + assert(CE->getNumOperands() == 2 && "Unknown constant expr!"); + Code = bitc::CST_CODE_CE_BINOP; + Record.push_back(GetEncodedBinaryOpcode(CE->getOpcode())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + uint64_t Flags = GetOptimizationFlags(CE); + if (Flags != 0) + Record.push_back(Flags); + } + break; + case Instruction::GetElementPtr: + Code = bitc::CST_CODE_CE_GEP; + if (cast<GEPOperator>(C)->isInBounds()) + Code = bitc::CST_CODE_CE_INBOUNDS_GEP; + for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) { + Record.push_back(VE.getTypeID(C->getOperand(i)->getType())); + Record.push_back(VE.getValueID(C->getOperand(i))); + } + break; + case Instruction::Select: + Code = bitc::CST_CODE_CE_SELECT; + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ExtractElement: + Code = bitc::CST_CODE_CE_EXTRACTELT; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + break; + case Instruction::InsertElement: + Code = bitc::CST_CODE_CE_INSERTELT; + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ShuffleVector: + // If the return type and argument types are the same, this is a + // standard shufflevector instruction. If the types are different, + // then the shuffle is widening or truncating the input vectors, and + // the argument type must also be encoded. + if (C->getType() == C->getOperand(0)->getType()) { + Code = bitc::CST_CODE_CE_SHUFFLEVEC; + } else { + Code = bitc::CST_CODE_CE_SHUFVEC_EX; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + } + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ICmp: + case Instruction::FCmp: + Code = bitc::CST_CODE_CE_CMP; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(CE->getPredicate()); + break; + } + } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) { + Code = bitc::CST_CODE_BLOCKADDRESS; + Record.push_back(VE.getTypeID(BA->getFunction()->getType())); + Record.push_back(VE.getValueID(BA->getFunction())); + Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock())); + } else { +#ifndef NDEBUG + C->dump(); +#endif + llvm_unreachable("Unknown constant!"); + } + Stream.EmitRecord(Code, Record, AbbrevToUse); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteModuleConstants(const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const llvm_2_9::ValueEnumerator::ValueList &Vals = VE.getValues(); + + // Find the first constant to emit, which is the first non-globalvalue value. + // We know globalvalues have been emitted by WriteModuleInfo. + for (unsigned i = 0, e = Vals.size(); i != e; ++i) { + if (!isa<GlobalValue>(Vals[i].first)) { + WriteConstants(i, Vals.size(), VE, Stream, true); + return; + } + } +} + +/// PushValueAndType - The file has to encode both the value and type id for +/// many values, because we need to know what type to create for forward +/// references. However, most operands are not forward references, so this type +/// field is not needed. +/// +/// This function adds V's value ID to Vals. If the value ID is higher than the +/// instruction ID, then it is a forward reference, and it also includes the +/// type ID. +static bool PushValueAndType(const Value *V, unsigned InstID, + SmallVector<unsigned, 64> &Vals, + llvm_2_9::ValueEnumerator &VE) { + unsigned ValID = VE.getValueID(V); + Vals.push_back(ValID); + if (ValID >= InstID) { + Vals.push_back(VE.getTypeID(V->getType())); + return true; + } + return false; +} + +/// WriteInstruction - Emit an instruction to the specified stream. +static void WriteInstruction(const Instruction &I, unsigned InstID, + llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVector<unsigned, 64> &Vals) { + unsigned Code = 0; + unsigned AbbrevToUse = 0; + VE.setInstructionID(&I); + switch (I.getOpcode()) { + default: + if (Instruction::isCast(I.getOpcode())) { + Code = bitc::FUNC_CODE_INST_CAST; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_CAST_ABBREV; + Vals.push_back(VE.getTypeID(I.getType())); + Vals.push_back(GetEncodedCastOpcode(I.getOpcode())); + } else { + assert(isa<BinaryOperator>(I) && "Unknown instruction!"); + Code = bitc::FUNC_CODE_INST_BINOP; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_BINOP_ABBREV; + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(GetEncodedBinaryOpcode(I.getOpcode())); + uint64_t Flags = GetOptimizationFlags(&I); + if (Flags != 0) { + if (AbbrevToUse == FUNCTION_INST_BINOP_ABBREV) + AbbrevToUse = FUNCTION_INST_BINOP_FLAGS_ABBREV; + Vals.push_back(Flags); + } + } + break; + + case Instruction::GetElementPtr: + Code = bitc::FUNC_CODE_INST_GEP_OLD; + if (cast<GEPOperator>(&I)->isInBounds()) + Code = bitc::FUNC_CODE_INST_INBOUNDS_GEP_OLD; + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + break; + case Instruction::ExtractValue: { + Code = bitc::FUNC_CODE_INST_EXTRACTVAL; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + const ExtractValueInst *EVI = cast<ExtractValueInst>(&I); + for (const unsigned *i = EVI->idx_begin(), *e = EVI->idx_end(); i != e; ++i) + Vals.push_back(*i); + break; + } + case Instruction::InsertValue: { + Code = bitc::FUNC_CODE_INST_INSERTVAL; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + PushValueAndType(I.getOperand(1), InstID, Vals, VE); + const InsertValueInst *IVI = cast<InsertValueInst>(&I); + for (const unsigned *i = IVI->idx_begin(), *e = IVI->idx_end(); i != e; ++i) + Vals.push_back(*i); + break; + } + case Instruction::Select: + Code = bitc::FUNC_CODE_INST_VSELECT; + PushValueAndType(I.getOperand(1), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(2))); + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + break; + case Instruction::ExtractElement: + Code = bitc::FUNC_CODE_INST_EXTRACTELT; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + break; + case Instruction::InsertElement: + Code = bitc::FUNC_CODE_INST_INSERTELT; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(VE.getValueID(I.getOperand(2))); + break; + case Instruction::ShuffleVector: + Code = bitc::FUNC_CODE_INST_SHUFFLEVEC; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(VE.getValueID(I.getOperand(2))); + break; + case Instruction::ICmp: + case Instruction::FCmp: + // compare returning Int1Ty or vector of Int1Ty + Code = bitc::FUNC_CODE_INST_CMP2; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(cast<CmpInst>(I).getPredicate()); + break; + + case Instruction::Ret: + { + Code = bitc::FUNC_CODE_INST_RET; + unsigned NumOperands = I.getNumOperands(); + if (NumOperands == 0) + AbbrevToUse = FUNCTION_INST_RET_VOID_ABBREV; + else if (NumOperands == 1) { + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_RET_VAL_ABBREV; + } else { + for (unsigned i = 0, e = NumOperands; i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + } + } + break; + case Instruction::Br: + { + Code = bitc::FUNC_CODE_INST_BR; + const BranchInst &II = cast<BranchInst>(I); + Vals.push_back(VE.getValueID(II.getSuccessor(0))); + if (II.isConditional()) { + Vals.push_back(VE.getValueID(II.getSuccessor(1))); + Vals.push_back(VE.getValueID(II.getCondition())); + } + } + break; + case Instruction::Switch: + { + Code = bitc::FUNC_CODE_INST_SWITCH; + const SwitchInst &SI = cast<SwitchInst>(I); + Vals.push_back(VE.getTypeID(SI.getCondition()->getType())); + Vals.push_back(VE.getValueID(SI.getCondition())); + Vals.push_back(VE.getValueID(SI.getDefaultDest())); + for (SwitchInst::ConstCaseIt i = SI.case_begin(), e = SI.case_end(); + i != e; ++i) { + Vals.push_back(VE.getValueID(i.getCaseValue())); + Vals.push_back(VE.getValueID(i.getCaseSuccessor())); + } + } + break; + case Instruction::IndirectBr: + Code = bitc::FUNC_CODE_INST_INDIRECTBR; + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + Vals.push_back(VE.getValueID(I.getOperand(i))); + break; + + case Instruction::Invoke: { + const InvokeInst *II = cast<InvokeInst>(&I); + const Value *Callee(II->getCalledValue()); + PointerType *PTy = cast<PointerType>(Callee->getType()); + FunctionType *FTy = cast<FunctionType>(PTy->getElementType()); + Code = bitc::FUNC_CODE_INST_INVOKE; + + Vals.push_back(VE.getAttributeID(II->getAttributes())); + Vals.push_back(II->getCallingConv()); + Vals.push_back(VE.getValueID(II->getNormalDest())); + Vals.push_back(VE.getValueID(II->getUnwindDest())); + PushValueAndType(Callee, InstID, Vals, VE); + + // Emit value #'s for the fixed parameters. + for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) + Vals.push_back(VE.getValueID(I.getOperand(i))); // fixed param. + + // Emit type/value pairs for varargs params. + if (FTy->isVarArg()) { + for (unsigned i = FTy->getNumParams(), e = I.getNumOperands()-3; + i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); // vararg + } + break; + } + case Instruction::Unreachable: + Code = bitc::FUNC_CODE_INST_UNREACHABLE; + AbbrevToUse = FUNCTION_INST_UNREACHABLE_ABBREV; + break; + + case Instruction::PHI: { + const PHINode &PN = cast<PHINode>(I); + Code = bitc::FUNC_CODE_INST_PHI; + Vals.push_back(VE.getTypeID(PN.getType())); + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { + Vals.push_back(VE.getValueID(PN.getIncomingValue(i))); + Vals.push_back(VE.getValueID(PN.getIncomingBlock(i))); + } + break; + } + + case Instruction::Alloca: + Code = bitc::FUNC_CODE_INST_ALLOCA; + Vals.push_back(VE.getTypeID(I.getType())); + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); + Vals.push_back(VE.getValueID(I.getOperand(0))); // size. + Vals.push_back(Log2_32(cast<AllocaInst>(I).getAlignment())+1); + break; + + case Instruction::Load: + Code = bitc::FUNC_CODE_INST_LOAD; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) // ptr + AbbrevToUse = FUNCTION_INST_LOAD_ABBREV; + + Vals.push_back(Log2_32(cast<LoadInst>(I).getAlignment())+1); + Vals.push_back(cast<LoadInst>(I).isVolatile()); + break; + case Instruction::Store: + Code = bitc::FUNC_CODE_INST_STORE_OLD; + PushValueAndType(I.getOperand(1), InstID, Vals, VE); // ptrty + ptr + Vals.push_back(VE.getValueID(I.getOperand(0))); // val. + Vals.push_back(Log2_32(cast<StoreInst>(I).getAlignment())+1); + Vals.push_back(cast<StoreInst>(I).isVolatile()); + break; + case Instruction::Call: { + const CallInst &CI = cast<CallInst>(I); + PointerType *PTy = cast<PointerType>(CI.getCalledValue()->getType()); + FunctionType *FTy = cast<FunctionType>(PTy->getElementType()); + + Code = FUNC_CODE_INST_CALL_2_7; + + Vals.push_back(VE.getAttributeID(CI.getAttributes())); + Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall())); + PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee + + // Emit value #'s for the fixed parameters. + for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) + Vals.push_back(VE.getValueID(CI.getArgOperand(i))); // fixed param. + + // Emit type/value pairs for varargs params. + if (FTy->isVarArg()) { + for (unsigned i = FTy->getNumParams(), e = CI.getNumArgOperands(); + i != e; ++i) + PushValueAndType(CI.getArgOperand(i), InstID, Vals, VE); // varargs + } + break; + } + case Instruction::VAArg: + Code = bitc::FUNC_CODE_INST_VAARG; + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); // valistty + Vals.push_back(VE.getValueID(I.getOperand(0))); // valist. + Vals.push_back(VE.getTypeID(I.getType())); // restype. + break; + } + + Stream.EmitRecord(Code, Vals, AbbrevToUse); + Vals.clear(); +} + +// Emit names for globals/functions etc. +static void WriteValueSymbolTable(const ValueSymbolTable &VST, + const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + if (VST.empty()) return; + Stream.EnterSubblock(bitc::VALUE_SYMTAB_BLOCK_ID, 4); + + // FIXME: Set up the abbrev, we know how many values there are! + // FIXME: We know if the type names can use 7-bit ascii. + SmallVector<unsigned, 64> NameVals; + + for (ValueSymbolTable::const_iterator SI = VST.begin(), SE = VST.end(); + SI != SE; ++SI) { + + const ValueName &Name = *SI; + + // Figure out the encoding to use for the name. + bool is7Bit = true; + bool isChar6 = true; + for (const char *C = Name.getKeyData(), *E = C+Name.getKeyLength(); + C != E; ++C) { + if (isChar6) + isChar6 = BitCodeAbbrevOp::isChar6(*C); + if ((unsigned char)*C & 128) { + is7Bit = false; + break; // don't bother scanning the rest. + } + } + + unsigned AbbrevToUse = VST_ENTRY_8_ABBREV; + + // VST_ENTRY: [valueid, namechar x N] + // VST_BBENTRY: [bbid, namechar x N] + unsigned Code; + if (isa<BasicBlock>(SI->getValue())) { + Code = bitc::VST_CODE_BBENTRY; + if (isChar6) + AbbrevToUse = VST_BBENTRY_6_ABBREV; + } else { + Code = bitc::VST_CODE_ENTRY; + if (isChar6) + AbbrevToUse = VST_ENTRY_6_ABBREV; + else if (is7Bit) + AbbrevToUse = VST_ENTRY_7_ABBREV; + } + + NameVals.push_back(VE.getValueID(SI->getValue())); + for (const char *P = Name.getKeyData(), + *E = Name.getKeyData()+Name.getKeyLength(); P != E; ++P) + NameVals.push_back((unsigned char)*P); + + // Emit the finished record. + Stream.EmitRecord(Code, NameVals, AbbrevToUse); + NameVals.clear(); + } + Stream.ExitBlock(); +} + +/// WriteFunction - Emit a function body to the module stream. +static void WriteFunction(const Function &F, llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::FUNCTION_BLOCK_ID, 4); + VE.incorporateFunction(F); + + SmallVector<unsigned, 64> Vals; + + // Emit the number of basic blocks, so the reader can create them ahead of + // time. + Vals.push_back(VE.getBasicBlocks().size()); + Stream.EmitRecord(bitc::FUNC_CODE_DECLAREBLOCKS, Vals); + Vals.clear(); + + // If there are function-local constants, emit them now. + unsigned CstStart, CstEnd; + VE.getFunctionConstantRange(CstStart, CstEnd); + WriteConstants(CstStart, CstEnd, VE, Stream, false); + + // If there is function-local metadata, emit it now. + WriteFunctionLocalMetadata(F, VE, Stream); + + // Keep a running idea of what the instruction ID is. + unsigned InstID = CstEnd; + + bool NeedsMetadataAttachment = false; + + DILocation *LastDL = nullptr;; + + // Finally, emit all the instructions, in order. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); + I != E; ++I) { + WriteInstruction(*I, InstID, VE, Stream, Vals); + + if (!I->getType()->isVoidTy()) + ++InstID; + + // If the instruction has metadata, write a metadata attachment later. + NeedsMetadataAttachment |= I->hasMetadataOtherThanDebugLoc(); + + // If the instruction has a debug location, emit it. + DILocation *DL = I->getDebugLoc(); + if (!DL) + continue; + + if (DL == LastDL) { + // Just repeat the same debug loc as last time. + Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC_AGAIN, Vals); + continue; + } + + Vals.push_back(DL->getLine()); + Vals.push_back(DL->getColumn()); + Vals.push_back(VE.getMetadataOrNullID(DL->getScope())); + Vals.push_back(VE.getMetadataOrNullID(DL->getInlinedAt())); + Stream.EmitRecord(FUNC_CODE_DEBUG_LOC_2_7, Vals); + Vals.clear(); + + LastDL = DL; + } + + // Emit names for all the instructions etc. + WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream); + + if (NeedsMetadataAttachment) + WriteMetadataAttachment(F, VE, Stream); + VE.purgeFunction(); + Stream.ExitBlock(); +} + +// Emit blockinfo, which defines the standard abbreviations etc. +static void WriteBlockInfo(const llvm_2_9::ValueEnumerator &VE, + BitstreamWriter &Stream) { + // We only want to emit block info records for blocks that have multiple + // instances: CONSTANTS_BLOCK, FUNCTION_BLOCK and VALUE_SYMTAB_BLOCK. Other + // blocks can defined their abbrevs inline. + Stream.EnterBlockInfoBlock(2); + + { // 8-bit fixed-width VST_ENTRY/VST_BBENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_8_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // 7-bit fixed width VST_ENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_7_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // 6-bit char6 VST_ENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_6_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // 6-bit char6 VST_BBENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_BBENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_BBENTRY_6_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + + + { // SETTYPE abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_SETTYPE)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(VE.getTypes().size()+1))); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_SETTYPE_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // INTEGER abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_INTEGER)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_INTEGER_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // CE_CAST abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CE_CAST)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // cast opc + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, // typeid + Log2_32_Ceil(VE.getTypes().size()+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); // value id + + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_CE_CAST_Abbrev) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // NULL abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_NULL)); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_NULL_Abbrev) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + // FIXME: This should only use space for first class types! + + { // INST_LOAD abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_LOAD)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Ptr + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 4)); // Align + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // volatile + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_LOAD_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_BINOP abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_BINOP)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // RHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_BINOP_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_BINOP_FLAGS abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_BINOP)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // RHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); // flags + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_BINOP_FLAGS_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_CAST abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_CAST)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // OpVal + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, // dest ty + Log2_32_Ceil(VE.getTypes().size()+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_CAST_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // INST_RET abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_RET)); + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_RET_VOID_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_RET abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_RET)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // ValID + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_RET_VAL_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_UNREACHABLE abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_UNREACHABLE)); + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_UNREACHABLE_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + Stream.ExitBlock(); +} + +/// WriteModule - Emit the specified module to the bitstream. +static void WriteModule(const Module *M, BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::MODULE_BLOCK_ID, 3); + + // Emit the version number if it is non-zero. + if (CurVersion) { + SmallVector<unsigned, 1> Vals; + Vals.push_back(CurVersion); + Stream.EmitRecord(bitc::MODULE_CODE_VERSION, Vals); + } + + // Analyze the module, enumerating globals, functions, etc. + llvm_2_9::ValueEnumerator VE(*M); + + // Emit blockinfo, which defines the standard abbreviations etc. + WriteBlockInfo(VE, Stream); + + // Emit information about parameter attributes. + WriteAttributeTable(VE, Stream); + + // Emit information describing all of the types in the module. + WriteTypeTable(VE, Stream); + + // Emit top-level description of module, including target triple, inline asm, + // descriptors for global variables, and function prototype info. + WriteModuleInfo(M, VE, Stream); + + // Emit constants. + WriteModuleConstants(VE, Stream); + + // Emit metadata. + WriteModuleMetadata(M, VE, Stream); + + // Emit function bodies. + for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F) + if (!F->isDeclaration()) + WriteFunction(*F, VE, Stream); + + // Emit metadata. + WriteModuleMetadataStore(M, Stream); + + // Emit names for globals/functions etc. + WriteValueSymbolTable(M->getValueSymbolTable(), VE, Stream); + + Stream.ExitBlock(); +} + +/// EmitDarwinBCHeader - If generating a bc file on darwin, we have to emit a +/// header and trailer to make it compatible with the system archiver. To do +/// this we emit the following header, and then emit a trailer that pads the +/// file out to be a multiple of 16 bytes. +/// +/// struct bc_header { +/// uint32_t Magic; // 0x0B17C0DE +/// uint32_t Version; // Version, currently always 0. +/// uint32_t BitcodeOffset; // Offset to traditional bitcode file. +/// uint32_t BitcodeSize; // Size of traditional bitcode file. +/// uint32_t CPUType; // CPU specifier. +/// ... potentially more later ... +/// }; +enum { + DarwinBCSizeFieldOffset = 3*4, // Offset to bitcode_size. + DarwinBCHeaderSize = 5*4 +}; + +static void WriteInt32ToBuffer(uint32_t Value, SmallVectorImpl<char> &Buffer, + uint32_t &Position) { + Buffer[Position + 0] = (unsigned char) (Value >> 0); + Buffer[Position + 1] = (unsigned char) (Value >> 8); + Buffer[Position + 2] = (unsigned char) (Value >> 16); + Buffer[Position + 3] = (unsigned char) (Value >> 24); + Position += 4; +} + +static void EmitDarwinBCHeaderAndTrailer(SmallVectorImpl<char> &Buffer, + const Triple &TT) { + unsigned CPUType = ~0U; + + // Match x86_64-*, i[3-9]86-*, powerpc-*, powerpc64-*, arm-*, thumb-*, + // armv[0-9]-*, thumbv[0-9]-*, armv5te-*, or armv6t2-*. The CPUType is a magic + // number from /usr/include/mach/machine.h. It is ok to reproduce the + // specific constants here because they are implicitly part of the Darwin ABI. + enum { + DARWIN_CPU_ARCH_ABI64 = 0x01000000, + DARWIN_CPU_TYPE_X86 = 7, + DARWIN_CPU_TYPE_ARM = 12, + DARWIN_CPU_TYPE_POWERPC = 18 + }; + + Triple::ArchType Arch = TT.getArch(); + if (Arch == Triple::x86_64) + CPUType = DARWIN_CPU_TYPE_X86 | DARWIN_CPU_ARCH_ABI64; + else if (Arch == Triple::x86) + CPUType = DARWIN_CPU_TYPE_X86; + else if (Arch == Triple::ppc) + CPUType = DARWIN_CPU_TYPE_POWERPC; + else if (Arch == Triple::ppc64) + CPUType = DARWIN_CPU_TYPE_POWERPC | DARWIN_CPU_ARCH_ABI64; + else if (Arch == Triple::arm || Arch == Triple::thumb) + CPUType = DARWIN_CPU_TYPE_ARM; + + // Traditional Bitcode starts after header. + assert(Buffer.size() >= DarwinBCHeaderSize && + "Expected header size to be reserved"); + unsigned BCOffset = DarwinBCHeaderSize; + unsigned BCSize = Buffer.size()-DarwinBCHeaderSize; + + // Write the magic and version. + unsigned Position = 0; + WriteInt32ToBuffer(0x0B17C0DE , Buffer, Position); + WriteInt32ToBuffer(0 , Buffer, Position); // Version. + WriteInt32ToBuffer(BCOffset , Buffer, Position); + WriteInt32ToBuffer(BCSize , Buffer, Position); + WriteInt32ToBuffer(CPUType , Buffer, Position); + + // If the file is not a multiple of 16 bytes, insert dummy padding. + while (Buffer.size() & 15) + Buffer.push_back(0); +} + +/// WriteBitcodeToFile - Write the specified module to the specified output +/// stream. +void llvm_2_9::WriteBitcodeToFile(const Module *M, raw_ostream &Out) { + SmallVector<char, 1024> Buffer; + Buffer.reserve(256*1024); + + // If this is darwin or another generic macho target, reserve space for the + // header. + Triple TT(M->getTargetTriple()); + if (TT.isOSDarwin()) + Buffer.insert(Buffer.begin(), DarwinBCHeaderSize, 0); + + // Emit the module into the buffer. + { + BitstreamWriter Stream(Buffer); + + // Emit the file header. + Stream.Emit((unsigned)'B', 8); + Stream.Emit((unsigned)'C', 8); + Stream.Emit(0x0, 4); + Stream.Emit(0xC, 4); + Stream.Emit(0xE, 4); + Stream.Emit(0xD, 4); + + // Emit the module. + WriteModule(M, Stream); + } + + if (TT.isOSDarwin()) + EmitDarwinBCHeaderAndTrailer(Buffer, TT); + + // Write the generated bitstream to "Out". + Out.write((char*)&Buffer.front(), Buffer.size()); +}
diff --git a/slang/BitWriter_2_9/BitcodeWriterPass.cpp b/slang/BitWriter_2_9/BitcodeWriterPass.cpp new file mode 100644 index 0000000..d43d690 --- /dev/null +++ b/slang/BitWriter_2_9/BitcodeWriterPass.cpp
@@ -0,0 +1,46 @@ +//===--- Bitcode/Writer/BitcodeWriterPass.cpp - Bitcode Writer ------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// BitcodeWriterPass implementation. +// +//===----------------------------------------------------------------------===// + +#include "ReaderWriter_2_9.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/Pass.h" +using namespace llvm; + +namespace { + class WriteBitcodePass : public ModulePass { + raw_ostream &OS; // raw_ostream to print on + + public: + static char ID; // Pass identification, replacement for typeid + explicit WriteBitcodePass(raw_ostream &o) + : ModulePass(ID), OS(o) {} + + const char *getPassName() const { return "Bitcode Writer"; } + + bool runOnModule(Module &M) { + bool Changed = false; + llvm_2_9::WriteBitcodeToFile(&M, OS); + return Changed; + } + }; +} + +char WriteBitcodePass::ID = 0; + +/// createBitcodeWriterPass - Create and return a pass that writes the module +/// to the specified ostream. +llvm::ModulePass *llvm_2_9::createBitcodeWriterPass(llvm::raw_ostream &Str) { + return new WriteBitcodePass(Str); +}
diff --git a/slang/BitWriter_2_9/CMakeLists.txt b/slang/BitWriter_2_9/CMakeLists.txt new file mode 100644 index 0000000..f097b09 --- /dev/null +++ b/slang/BitWriter_2_9/CMakeLists.txt
@@ -0,0 +1,6 @@ +add_llvm_library(LLVMBitWriter + BitWriter.cpp + BitcodeWriter.cpp + BitcodeWriterPass.cpp + ValueEnumerator.cpp + )
diff --git a/slang/BitWriter_2_9/Makefile b/slang/BitWriter_2_9/Makefile new file mode 100644 index 0000000..7b0bd72 --- /dev/null +++ b/slang/BitWriter_2_9/Makefile
@@ -0,0 +1,15 @@ +##===- lib/Bitcode/Reader/Makefile -------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = ../../.. +LIBRARYNAME = LLVMBitWriter +BUILD_ARCHIVE = 1 + +include $(LEVEL)/Makefile.common +
diff --git a/slang/BitWriter_2_9/ReaderWriter_2_9.h b/slang/BitWriter_2_9/ReaderWriter_2_9.h new file mode 100644 index 0000000..997e9c7 --- /dev/null +++ b/slang/BitWriter_2_9/ReaderWriter_2_9.h
@@ -0,0 +1,143 @@ +//===-- llvm/Bitcode/ReaderWriter.h - Bitcode reader/writers ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This header defines interfaces to read and write LLVM bitcode files/streams. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_BITCODE_2_9_H +#define LLVM_BITCODE_2_9_H + +#include <string> + +namespace llvm { + class Module; + class MemoryBuffer; + class ModulePass; + class BitstreamWriter; + class LLVMContext; + class raw_ostream; +} // End llvm namespace + +namespace llvm_2_9 { + /// getLazyBitcodeModule - Read the header of the specified bitcode buffer + /// and prepare for lazy deserialization of function bodies. If successful, + /// this takes ownership of 'buffer' and returns a non-null pointer. On + /// error, this returns null, *does not* take ownership of Buffer, and fills + /// in *ErrMsg with an error description if ErrMsg is non-null. + llvm::Module *getLazyBitcodeModule(llvm::MemoryBuffer *Buffer, + llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// getBitcodeTargetTriple - Read the header of the specified bitcode + /// buffer and extract just the triple information. If successful, + /// this returns a string and *does not* take ownership + /// of 'buffer'. On error, this returns "", and fills in *ErrMsg + /// if ErrMsg is non-null. + std::string getBitcodeTargetTriple(llvm::MemoryBuffer *Buffer, + llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// ParseBitcodeFile - Read the specified bitcode file, returning the module. + /// If an error occurs, this returns null and fills in *ErrMsg if it is + /// non-null. This method *never* takes ownership of Buffer. + llvm::Module *ParseBitcodeFile(llvm::MemoryBuffer *Buffer, llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// WriteBitcodeToFile - Write the specified module to the specified + /// raw output stream. For streams where it matters, the given stream + /// should be in "binary" mode. + void WriteBitcodeToFile(const llvm::Module *M, llvm::raw_ostream &Out); + + /// createBitcodeWriterPass - Create and return a pass that writes the module + /// to the specified ostream. + llvm::ModulePass *createBitcodeWriterPass(llvm::raw_ostream &Str); + + + /// isBitcodeWrapper - Return true if the given bytes are the magic bytes + /// for an LLVM IR bitcode wrapper. + /// + static inline bool isBitcodeWrapper(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + // See if you can find the hidden message in the magic bytes :-). + // (Hint: it's a little-endian encoding.) + return BufPtr != BufEnd && + BufPtr[0] == 0xDE && + BufPtr[1] == 0xC0 && + BufPtr[2] == 0x17 && + BufPtr[3] == 0x0B; + } + + /// isRawBitcode - Return true if the given bytes are the magic bytes for + /// raw LLVM IR bitcode (without a wrapper). + /// + static inline bool isRawBitcode(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + // These bytes sort of have a hidden message, but it's not in + // little-endian this time, and it's a little redundant. + return BufPtr != BufEnd && + BufPtr[0] == 'B' && + BufPtr[1] == 'C' && + BufPtr[2] == 0xc0 && + BufPtr[3] == 0xde; + } + + /// isBitcode - Return true if the given bytes are the magic bytes for + /// LLVM IR bitcode, either with or without a wrapper. + /// + static bool inline isBitcode(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + return isBitcodeWrapper(BufPtr, BufEnd) || + isRawBitcode(BufPtr, BufEnd); + } + + /// SkipBitcodeWrapperHeader - Some systems wrap bc files with a special + /// header for padding or other reasons. The format of this header is: + /// + /// struct bc_header { + /// uint32_t Magic; // 0x0B17C0DE + /// uint32_t Version; // Version, currently always 0. + /// uint32_t BitcodeOffset; // Offset to traditional bitcode file. + /// uint32_t BitcodeSize; // Size of traditional bitcode file. + /// ... potentially other gunk ... + /// }; + /// + /// This function is called when we find a file with a matching magic number. + /// In this case, skip down to the subsection of the file that is actually a + /// BC file. + static inline bool SkipBitcodeWrapperHeader(unsigned char *&BufPtr, + unsigned char *&BufEnd) { + enum { + KnownHeaderSize = 4*4, // Size of header we read. + OffsetField = 2*4, // Offset in bytes to Offset field. + SizeField = 3*4 // Offset in bytes to Size field. + }; + + // Must contain the header! + if (BufEnd-BufPtr < KnownHeaderSize) return true; + + unsigned Offset = ( BufPtr[OffsetField ] | + (BufPtr[OffsetField+1] << 8) | + (BufPtr[OffsetField+2] << 16) | + (BufPtr[OffsetField+3] << 24)); + unsigned Size = ( BufPtr[SizeField ] | + (BufPtr[SizeField +1] << 8) | + (BufPtr[SizeField +2] << 16) | + (BufPtr[SizeField +3] << 24)); + + // Verify that Offset+Size fits in the file. + if (Offset+Size > unsigned(BufEnd-BufPtr)) + return true; + BufPtr += Offset; + BufEnd = BufPtr+Size; + return false; + } +} // End llvm_2_9 namespace + +#endif
diff --git a/slang/BitWriter_2_9/ValueEnumerator.cpp b/slang/BitWriter_2_9/ValueEnumerator.cpp new file mode 100644 index 0000000..dedbedd --- /dev/null +++ b/slang/BitWriter_2_9/ValueEnumerator.cpp
@@ -0,0 +1,546 @@ +//===-- ValueEnumerator.cpp - Number values and types for bitcode writer --===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the ValueEnumerator class. +// +//===----------------------------------------------------------------------===// + +#include "ValueEnumerator.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DebugInfoMetadata.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/ValueSymbolTable.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" +#include <algorithm> +using namespace llvm; + +namespace llvm_2_9 { + +static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) { + return V.first->getType()->isIntOrIntVectorTy(); +} + +/// ValueEnumerator - Enumerate module-level information. +ValueEnumerator::ValueEnumerator(const llvm::Module &M) + : HasMDString(false), HasDILocation(false) { + // Enumerate the global variables. + for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) + EnumerateValue(&*I); + + // Enumerate the functions. + for (llvm::Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) { + EnumerateValue(&*I); + EnumerateAttributes(cast<Function>(I)->getAttributes()); + } + + // Enumerate the aliases. + for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); + I != E; ++I) + EnumerateValue(&*I); + + // Remember what is the cutoff between globalvalue's and other constants. + unsigned FirstConstant = Values.size(); + + // Enumerate the global variable initializers. + for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) + if (I->hasInitializer()) + EnumerateValue(I->getInitializer()); + + // Enumerate the aliasees. + for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); + I != E; ++I) + EnumerateValue(I->getAliasee()); + + // Enumerate the metadata type. + // + // TODO: Move this to ValueEnumerator::EnumerateOperandType() once bitcode + // only encodes the metadata type when it's used as a value. + EnumerateType(Type::getMetadataTy(M.getContext())); + + // Insert constants and metadata that are named at module level into the slot + // pool so that the module symbol table can refer to them... + EnumerateValueSymbolTable(M.getValueSymbolTable()); + EnumerateNamedMetadata(M); + + SmallVector<std::pair<unsigned, MDNode *>, 8> MDs; + + // Enumerate types used by function bodies and argument lists. + for (const Function &F : M) { + for (const Argument &A : F.args()) + EnumerateType(A.getType()); + + for (const BasicBlock &BB : F) + for (const Instruction &I : BB) { + for (const Use &Op : I.operands()) { + auto *MD = dyn_cast<MetadataAsValue>(&Op); + if (!MD) { + EnumerateOperandType(Op); + continue; + } + + // Local metadata is enumerated during function-incorporation. + if (isa<LocalAsMetadata>(MD->getMetadata())) + continue; + + EnumerateMetadata(MD->getMetadata()); + } + EnumerateType(I.getType()); + if (const CallInst *CI = dyn_cast<CallInst>(&I)) + EnumerateAttributes(CI->getAttributes()); + else if (const InvokeInst *II = dyn_cast<InvokeInst>(&I)) + EnumerateAttributes(II->getAttributes()); + + // Enumerate metadata attached with this instruction. + MDs.clear(); + I.getAllMetadataOtherThanDebugLoc(MDs); + for (unsigned i = 0, e = MDs.size(); i != e; ++i) + EnumerateMetadata(MDs[i].second); + + // Don't enumerate the location directly -- it has a special record + // type -- but enumerate its operands. + if (DILocation *L = I.getDebugLoc()) + EnumerateMDNodeOperands(L); + } + } + + // Optimize constant ordering. + OptimizeConstants(FirstConstant, Values.size()); +} + +unsigned ValueEnumerator::getInstructionID(const Instruction *Inst) const { + InstructionMapType::const_iterator I = InstructionMap.find(Inst); + assert(I != InstructionMap.end() && "Instruction is not mapped!"); + return I->second; +} + +void ValueEnumerator::setInstructionID(const Instruction *I) { + InstructionMap[I] = InstructionCount++; +} + +unsigned ValueEnumerator::getValueID(const Value *V) const { + if (auto *MD = dyn_cast<MetadataAsValue>(V)) + return getMetadataID(MD->getMetadata()); + + ValueMapType::const_iterator I = ValueMap.find(V); + assert(I != ValueMap.end() && "Value not in slotcalculator!"); + return I->second-1; +} + +void ValueEnumerator::dump() const { + print(dbgs(), ValueMap, "Default"); + dbgs() << '\n'; + print(dbgs(), MDValueMap, "MetaData"); + dbgs() << '\n'; +} + +void ValueEnumerator::print(raw_ostream &OS, const ValueMapType &Map, + const char *Name) const { + + OS << "Map Name: " << Name << "\n"; + OS << "Size: " << Map.size() << "\n"; + for (ValueMapType::const_iterator I = Map.begin(), + E = Map.end(); I != E; ++I) { + + const Value *V = I->first; + if (V->hasName()) + OS << "Value: " << V->getName(); + else + OS << "Value: [null]\n"; + V->dump(); + + OS << " Uses(" << std::distance(V->use_begin(),V->use_end()) << "):"; + for (const Use &U : V->uses()) { + if (&U != &*V->use_begin()) + OS << ","; + if(U->hasName()) + OS << " " << U->getName(); + else + OS << " [null]"; + + } + OS << "\n\n"; + } +} + +void ValueEnumerator::print(llvm::raw_ostream &OS, const MetadataMapType &Map, + const char *Name) const { + + OS << "Map Name: " << Name << "\n"; + OS << "Size: " << Map.size() << "\n"; + for (auto I = Map.begin(), E = Map.end(); I != E; ++I) { + const llvm::Metadata *MD = I->first; + OS << "Metadata: slot = " << I->second << "\n"; + MD->print(OS); + } +} + + +// Optimize constant ordering. +namespace { + struct CstSortPredicate { + ValueEnumerator &VE; + explicit CstSortPredicate(ValueEnumerator &ve) : VE(ve) {} + bool operator()(const std::pair<const Value*, unsigned> &LHS, + const std::pair<const Value*, unsigned> &RHS) { + // Sort by plane. + if (LHS.first->getType() != RHS.first->getType()) + return VE.getTypeID(LHS.first->getType()) < + VE.getTypeID(RHS.first->getType()); + // Then by frequency. + return LHS.second > RHS.second; + } + }; +} + +/// OptimizeConstants - Reorder constant pool for denser encoding. +void ValueEnumerator::OptimizeConstants(unsigned CstStart, unsigned CstEnd) { + if (CstStart == CstEnd || CstStart+1 == CstEnd) return; + + CstSortPredicate P(*this); + std::stable_sort(Values.begin()+CstStart, Values.begin()+CstEnd, P); + + // Ensure that integer and vector of integer constants are at the start of the + // constant pool. This is important so that GEP structure indices come before + // gep constant exprs. + std::partition(Values.begin()+CstStart, Values.begin()+CstEnd, + isIntOrIntVectorValue); + + // Rebuild the modified portion of ValueMap. + for (; CstStart != CstEnd; ++CstStart) + ValueMap[Values[CstStart].first] = CstStart+1; +} + + +/// EnumerateValueSymbolTable - Insert all of the values in the specified symbol +/// table into the values table. +void ValueEnumerator::EnumerateValueSymbolTable(const ValueSymbolTable &VST) { + for (ValueSymbolTable::const_iterator VI = VST.begin(), VE = VST.end(); + VI != VE; ++VI) + EnumerateValue(VI->getValue()); +} + +/// EnumerateNamedMetadata - Insert all of the values referenced by +/// named metadata in the specified module. +void ValueEnumerator::EnumerateNamedMetadata(const llvm::Module &M) { + for (llvm::Module::const_named_metadata_iterator I = M.named_metadata_begin(), + E = M.named_metadata_end(); + I != E; ++I) + EnumerateNamedMDNode(&*I); +} + +void ValueEnumerator::EnumerateNamedMDNode(const NamedMDNode *MD) { + for (unsigned i = 0, e = MD->getNumOperands(); i != e; ++i) + EnumerateMetadata(MD->getOperand(i)); +} + +/// EnumerateMDNodeOperands - Enumerate all non-function-local values +/// and types referenced by the given MDNode. +void ValueEnumerator::EnumerateMDNodeOperands(const MDNode *N) { + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { + Metadata *MD = N->getOperand(i); + if (!MD) + continue; + assert(!isa<LocalAsMetadata>(MD) && "MDNodes cannot be function-local"); + EnumerateMetadata(MD); + } +} + +void ValueEnumerator::EnumerateMetadata(const llvm::Metadata *MD) { + assert( + (isa<MDNode>(MD) || isa<MDString>(MD) || isa<ConstantAsMetadata>(MD)) && + "Invalid metadata kind"); + + // Insert a dummy ID to block the co-recursive call to + // EnumerateMDNodeOperands() from re-visiting MD in a cyclic graph. + // + // Return early if there's already an ID. + if (!MDValueMap.insert(std::make_pair(MD, 0)).second) + return; + + // Visit operands first to minimize RAUW. + if (auto *N = dyn_cast<MDNode>(MD)) + EnumerateMDNodeOperands(N); + else if (auto *C = dyn_cast<ConstantAsMetadata>(MD)) + EnumerateValue(C->getValue()); + + HasMDString |= isa<MDString>(MD); + HasDILocation |= isa<DILocation>(MD); + + // Replace the dummy ID inserted above with the correct one. MDValueMap may + // have changed by inserting operands, so we need a fresh lookup here. + MDs.push_back(MD); + MDValueMap[MD] = MDs.size(); +} + +/// EnumerateFunctionLocalMetadataa - Incorporate function-local metadata +/// information reachable from the metadata. +void ValueEnumerator::EnumerateFunctionLocalMetadata( + const llvm::LocalAsMetadata *Local) { + // Check to see if it's already in! + unsigned &MDValueID = MDValueMap[Local]; + if (MDValueID) + return; + + MDs.push_back(Local); + MDValueID = MDs.size(); + + EnumerateValue(Local->getValue()); + + // Also, collect all function-local metadata for easy access. + FunctionLocalMDs.push_back(Local); +} + +void ValueEnumerator::EnumerateValue(const Value *V) { + assert(!V->getType()->isVoidTy() && "Can't insert void values!"); + assert(!isa<MetadataAsValue>(V) && "EnumerateValue doesn't handle Metadata!"); + + // Check to see if it's already in! + unsigned &ValueID = ValueMap[V]; + if (ValueID) { + // Increment use count. + Values[ValueID-1].second++; + return; + } + + // Enumerate the type of this value. + EnumerateType(V->getType()); + + if (const Constant *C = dyn_cast<Constant>(V)) { + if (isa<GlobalValue>(C)) { + // Initializers for globals are handled explicitly elsewhere. + } else if (C->getNumOperands()) { + // If a constant has operands, enumerate them. This makes sure that if a + // constant has uses (for example an array of const ints), that they are + // inserted also. + + // We prefer to enumerate them with values before we enumerate the user + // itself. This makes it more likely that we can avoid forward references + // in the reader. We know that there can be no cycles in the constants + // graph that don't go through a global variable. + for (User::const_op_iterator I = C->op_begin(), E = C->op_end(); + I != E; ++I) + if (!isa<BasicBlock>(*I)) // Don't enumerate BB operand to BlockAddress. + EnumerateValue(*I); + + // Finally, add the value. Doing this could make the ValueID reference be + // dangling, don't reuse it. + Values.push_back(std::make_pair(V, 1U)); + ValueMap[V] = Values.size(); + return; + } else if (const ConstantDataSequential *CDS = + dyn_cast<ConstantDataSequential>(C)) { + // For our legacy handling of the new ConstantDataSequential type, we + // need to enumerate the individual elements, as well as mark the + // outer constant as used. + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) + EnumerateValue(CDS->getElementAsConstant(i)); + Values.push_back(std::make_pair(V, 1U)); + ValueMap[V] = Values.size(); + return; + } + } + + // Add the value. + Values.push_back(std::make_pair(V, 1U)); + ValueID = Values.size(); +} + + +void ValueEnumerator::EnumerateType(Type *Ty) { + unsigned *TypeID = &TypeMap[Ty]; + + // We've already seen this type. + if (*TypeID) + return; + + // If it is a non-anonymous struct, mark the type as being visited so that we + // don't recursively visit it. This is safe because we allow forward + // references of these in the bitcode reader. + if (StructType *STy = dyn_cast<StructType>(Ty)) + if (!STy->isLiteral()) + *TypeID = ~0U; + + // Enumerate all of the subtypes before we enumerate this type. This ensures + // that the type will be enumerated in an order that can be directly built. + for (Type *SubTy : Ty->subtypes()) + EnumerateType(SubTy); + + // Refresh the TypeID pointer in case the table rehashed. + TypeID = &TypeMap[Ty]; + + // Check to see if we got the pointer another way. This can happen when + // enumerating recursive types that hit the base case deeper than they start. + // + // If this is actually a struct that we are treating as forward ref'able, + // then emit the definition now that all of its contents are available. + if (*TypeID && *TypeID != ~0U) + return; + + // Add this type now that its contents are all happily enumerated. + Types.push_back(Ty); + + *TypeID = Types.size(); +} + +// Enumerate the types for the specified value. If the value is a constant, +// walk through it, enumerating the types of the constant. +void ValueEnumerator::EnumerateOperandType(const Value *V) { + EnumerateType(V->getType()); + + if (auto *MD = dyn_cast<MetadataAsValue>(V)) { + assert(!isa<LocalAsMetadata>(MD->getMetadata()) && + "Function-local metadata should be left for later"); + + EnumerateMetadata(MD->getMetadata()); + return; + } + + const Constant *C = dyn_cast<Constant>(V); + if (!C) + return; + + // If this constant is already enumerated, ignore it, we know its type must + // be enumerated. + if (ValueMap.count(C)) + return; + + // This constant may have operands, make sure to enumerate the types in + // them. + for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) { + const Value *Op = C->getOperand(i); + + // Don't enumerate basic blocks here, this happens as operands to + // blockaddress. + if (isa<BasicBlock>(Op)) + continue; + + EnumerateOperandType(Op); + } +} + +void ValueEnumerator::EnumerateAttributes(AttributeSet PAL) { + if (PAL.isEmpty()) return; // null is always 0. + + // Do a lookup. + unsigned &Entry = AttributeMap[PAL]; + if (Entry == 0) { + // Never saw this before, add it. + Attribute.push_back(PAL); + Entry = Attribute.size(); + } + + // Do lookups for all attribute groups. + for (unsigned i = 0, e = PAL.getNumSlots(); i != e; ++i) { + AttributeSet AS = PAL.getSlotAttributes(i); + unsigned &Entry = AttributeGroupMap[AS]; + if (Entry == 0) { + AttributeGroups.push_back(AS); + Entry = AttributeGroups.size(); + } + } +} + +void ValueEnumerator::incorporateFunction(const Function &F) { + InstructionCount = 0; + NumModuleValues = Values.size(); + NumModuleMDs = MDs.size(); + + // Adding function arguments to the value table. + for (Function::const_arg_iterator I = F.arg_begin(), E = F.arg_end(); + I != E; ++I) + EnumerateValue(&*I); + + FirstFuncConstantID = Values.size(); + + // Add all function-level constants to the value table. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) + for (User::const_op_iterator OI = I->op_begin(), E = I->op_end(); + OI != E; ++OI) { + if ((isa<Constant>(*OI) && !isa<GlobalValue>(*OI)) || + isa<InlineAsm>(*OI)) + EnumerateValue(*OI); + } + BasicBlocks.push_back(&*BB); + ValueMap[&*BB] = BasicBlocks.size(); + } + + // Optimize the constant layout. + OptimizeConstants(FirstFuncConstantID, Values.size()); + + // Add the function's parameter attributes so they are available for use in + // the function's instruction. + EnumerateAttributes(F.getAttributes()); + + FirstInstID = Values.size(); + + SmallVector<llvm::LocalAsMetadata *, 8> FnLocalMDVector; + // Add all of the instructions. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) { + for (User::const_op_iterator OI = I->op_begin(), E = I->op_end(); + OI != E; ++OI) { + if (auto *MD = dyn_cast<llvm::MetadataAsValue>(&*OI)) + if (auto *Local = dyn_cast<LocalAsMetadata>(MD->getMetadata())) + // Enumerate metadata after the instructions they might refer to. + FnLocalMDVector.push_back(Local); + } + + if (!I->getType()->isVoidTy()) + EnumerateValue(&*I); + } + } + + // Add all of the function-local metadata. + for (unsigned i = 0, e = FnLocalMDVector.size(); i != e; ++i) + EnumerateFunctionLocalMetadata(FnLocalMDVector[i]); +} + +void ValueEnumerator::purgeFunction() { + /// Remove purged values from the ValueMap. + for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i) + ValueMap.erase(Values[i].first); + for (unsigned i = NumModuleMDs, e = MDs.size(); i != e; ++i) + MDValueMap.erase(MDs[i]); + for (unsigned i = 0, e = BasicBlocks.size(); i != e; ++i) + ValueMap.erase(BasicBlocks[i]); + + Values.resize(NumModuleValues); + MDs.resize(NumModuleMDs); + BasicBlocks.clear(); + FunctionLocalMDs.clear(); +} + +static void IncorporateFunctionInfoGlobalBBIDs(const Function *F, + DenseMap<const BasicBlock*, unsigned> &IDMap) { + unsigned Counter = 0; + for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB) + IDMap[&*BB] = ++Counter; +} + +/// getGlobalBasicBlockID - This returns the function-specific ID for the +/// specified basic block. This is relatively expensive information, so it +/// should only be used by rare constructs such as address-of-label. +unsigned ValueEnumerator::getGlobalBasicBlockID(const BasicBlock *BB) const { + unsigned &Idx = GlobalBasicBlockIDs[BB]; + if (Idx != 0) + return Idx-1; + + IncorporateFunctionInfoGlobalBBIDs(BB->getParent(), GlobalBasicBlockIDs); + return getGlobalBasicBlockID(BB); +} + +} // end llvm_2_9 namespace
diff --git a/slang/BitWriter_2_9/ValueEnumerator.h b/slang/BitWriter_2_9/ValueEnumerator.h new file mode 100644 index 0000000..1812cd8 --- /dev/null +++ b/slang/BitWriter_2_9/ValueEnumerator.h
@@ -0,0 +1,195 @@ +//===-- Bitcode/Writer/ValueEnumerator.h - Number values --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This class gives values and types Unique ID's. +// +//===----------------------------------------------------------------------===// + +#ifndef VALUE_ENUMERATOR_H +#define VALUE_ENUMERATOR_H + +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/IR/Attributes.h" +#include <vector> + +namespace llvm { + +class Type; +class Value; +class Instruction; +class BasicBlock; +class Function; +class Module; +class Metadata; +class LocalAsMetadata; +class MDNode; +class NamedMDNode; +class AttributeSet; +class ValueSymbolTable; +class MDSymbolTable; +class raw_ostream; + +} // end llvm namespace + +namespace llvm_2_9 { + +class ValueEnumerator { +public: + typedef std::vector<llvm::Type*> TypeList; + + // For each value, we remember its Value* and occurrence frequency. + typedef std::vector<std::pair<const llvm::Value*, unsigned> > ValueList; +private: + typedef llvm::DenseMap<llvm::Type*, unsigned> TypeMapType; + TypeMapType TypeMap; + TypeList Types; + + typedef llvm::DenseMap<const llvm::Value*, unsigned> ValueMapType; + ValueMapType ValueMap; + ValueList Values; + + + std::vector<const llvm::Metadata *> MDs; + llvm::SmallVector<const llvm::LocalAsMetadata *, 8> FunctionLocalMDs; + typedef llvm::DenseMap<const llvm::Metadata *, unsigned> MetadataMapType; + MetadataMapType MDValueMap; + bool HasMDString; + bool HasDILocation; + + typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeGroupMapType; + AttributeGroupMapType AttributeGroupMap; + std::vector<llvm::AttributeSet> AttributeGroups; + + typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeMapType; + AttributeMapType AttributeMap; + std::vector<llvm::AttributeSet> Attribute; + + /// GlobalBasicBlockIDs - This map memoizes the basic block ID's referenced by + /// the "getGlobalBasicBlockID" method. + mutable llvm::DenseMap<const llvm::BasicBlock*, unsigned> GlobalBasicBlockIDs; + + typedef llvm::DenseMap<const llvm::Instruction*, unsigned> InstructionMapType; + InstructionMapType InstructionMap; + unsigned InstructionCount; + + /// BasicBlocks - This contains all the basic blocks for the currently + /// incorporated function. Their reverse mapping is stored in ValueMap. + std::vector<const llvm::BasicBlock*> BasicBlocks; + + /// When a function is incorporated, this is the size of the Values list + /// before incorporation. + unsigned NumModuleValues; + + /// When a function is incorporated, this is the size of the MDValues list + /// before incorporation. + unsigned NumModuleMDs; + + unsigned FirstFuncConstantID; + unsigned FirstInstID; + + ValueEnumerator(const ValueEnumerator &) = delete; + void operator=(const ValueEnumerator &) = delete; +public: + explicit ValueEnumerator(const llvm::Module &M); + + void dump() const; + void print(llvm::raw_ostream &OS, const ValueMapType &Map, const char *Name) const; + void print(llvm::raw_ostream &OS, const MetadataMapType &Map, + const char *Name) const; + + unsigned getValueID(const llvm::Value *V) const; + unsigned getMetadataID(const llvm::Metadata *MD) const { + auto ID = getMetadataOrNullID(MD); + assert(ID != 0 && "Metadata not in slotcalculator!"); + return ID - 1; + } + unsigned getMetadataOrNullID(const llvm::Metadata *MD) const { + return MDValueMap.lookup(MD); + } + + bool hasMDString() const { return HasMDString; } + bool hasDILocation() const { return HasDILocation; } + + unsigned getTypeID(llvm::Type *T) const { + TypeMapType::const_iterator I = TypeMap.find(T); + assert(I != TypeMap.end() && "Type not in ValueEnumerator!"); + return I->second-1; + } + + unsigned getInstructionID(const llvm::Instruction *I) const; + void setInstructionID(const llvm::Instruction *I); + + unsigned getAttributeID(llvm::AttributeSet PAL) const { + if (PAL.isEmpty()) return 0; // Null maps to zero. + AttributeMapType::const_iterator I = AttributeMap.find(PAL); + assert(I != AttributeMap.end() && "Attribute not in ValueEnumerator!"); + return I->second; + } + + unsigned getAttributeGroupID(llvm::AttributeSet PAL) const { + if (PAL.isEmpty()) return 0; // Null maps to zero. + AttributeGroupMapType::const_iterator I = AttributeGroupMap.find(PAL); + assert(I != AttributeGroupMap.end() && "Attribute not in ValueEnumerator!"); + return I->second; + } + + /// getFunctionConstantRange - Return the range of values that corresponds to + /// function-local constants. + void getFunctionConstantRange(unsigned &Start, unsigned &End) const { + Start = FirstFuncConstantID; + End = FirstInstID; + } + + const ValueList &getValues() const { return Values; } + const std::vector<const llvm::Metadata *> &getMDs() const { return MDs; } + const llvm::SmallVectorImpl<const llvm::LocalAsMetadata *> &getFunctionLocalMDs() const { + return FunctionLocalMDs; + } + const TypeList &getTypes() const { return Types; } + const std::vector<const llvm::BasicBlock*> &getBasicBlocks() const { + return BasicBlocks; + } + const std::vector<llvm::AttributeSet> &getAttributes() const { + return Attribute; + } + const std::vector<llvm::AttributeSet> &getAttributeGroups() const { + return AttributeGroups; + } + + /// getGlobalBasicBlockID - This returns the function-specific ID for the + /// specified basic block. This is relatively expensive information, so it + /// should only be used by rare constructs such as address-of-label. + unsigned getGlobalBasicBlockID(const llvm::BasicBlock *BB) const; + + /// incorporateFunction/purgeFunction - If you'd like to deal with a function, + /// use these two methods to get its data into the ValueEnumerator! + /// + void incorporateFunction(const llvm::Function &F); + void purgeFunction(); + +private: + void OptimizeConstants(unsigned CstStart, unsigned CstEnd); + + void EnumerateMDNodeOperands(const llvm::MDNode *N); + void EnumerateMetadata(const llvm::Metadata *MD); + void EnumerateFunctionLocalMetadata(const llvm::LocalAsMetadata *Local); + void EnumerateNamedMDNode(const llvm::NamedMDNode *NMD); + void EnumerateValue(const llvm::Value *V); + void EnumerateType(llvm::Type *T); + void EnumerateOperandType(const llvm::Value *V); + void EnumerateAttributes(llvm::AttributeSet PAL); + + void EnumerateValueSymbolTable(const llvm::ValueSymbolTable &ST); + void EnumerateNamedMetadata(const llvm::Module &M); +}; + +} // end llvm_2_9 namespace + +#endif
diff --git a/slang/BitWriter_2_9_func/Android.mk b/slang/BitWriter_2_9_func/Android.mk new file mode 100644 index 0000000..a33313a --- /dev/null +++ b/slang/BitWriter_2_9_func/Android.mk
@@ -0,0 +1,28 @@ +LOCAL_PATH:= $(call my-dir) + +LLVM_ROOT_PATH := $(LOCAL_PATH)/../../../../external/llvm +include $(LLVM_ROOT_PATH)/llvm.mk + +bitcode_writer_2_9_func_SRC_FILES := \ + BitcodeWriter.cpp \ + BitcodeWriterPass.cpp \ + ValueEnumerator.cpp + +# For the host +# ===================================================== +include $(CLEAR_VARS) + +LOCAL_CFLAGS += $(local_cflags_for_slang) +LOCAL_C_INCLUDES += frameworks/compile/slang + +LOCAL_SRC_FILES := $(bitcode_writer_2_9_func_SRC_FILES) + +LOCAL_MODULE:= libLLVMBitWriter_2_9_func + +LOCAL_MODULE_HOST_OS := darwin linux windows + +include $(LLVM_HOST_BUILD_MK) +include $(LLVM_GEN_ATTRIBUTES_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_HOST_STATIC_LIBRARY) +
diff --git a/slang/BitWriter_2_9_func/BitcodeWriter.cpp b/slang/BitWriter_2_9_func/BitcodeWriter.cpp new file mode 100644 index 0000000..4ef7ac2 --- /dev/null +++ b/slang/BitWriter_2_9_func/BitcodeWriter.cpp
@@ -0,0 +1,1803 @@ +//===--- Bitcode/Writer/BitcodeWriter.cpp - Bitcode Writer ----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Bitcode writer implementation. +// +//===----------------------------------------------------------------------===// + +#include "ReaderWriter_2_9_func.h" +#include "legacy_bitcode.h" +#include "ValueEnumerator.h" +#include "llvm/ADT/Triple.h" +#include "llvm/Bitcode/BitstreamWriter.h" +#include "llvm/Bitcode/LLVMBitCodes.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DebugInfoMetadata.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/InlineAsm.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/Operator.h" +#include "llvm/IR/ValueSymbolTable.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/Support/Program.h" +#include "llvm/Support/raw_ostream.h" +#include <cctype> +#include <map> +using namespace llvm; + +/// These are manifest constants used by the bitcode writer. They do not need to +/// be kept in sync with the reader, but need to be consistent within this file. +enum { + CurVersion = 0, + + // VALUE_SYMTAB_BLOCK abbrev id's. + VST_ENTRY_8_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + VST_ENTRY_7_ABBREV, + VST_ENTRY_6_ABBREV, + VST_BBENTRY_6_ABBREV, + + // CONSTANTS_BLOCK abbrev id's. + CONSTANTS_SETTYPE_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + CONSTANTS_INTEGER_ABBREV, + CONSTANTS_CE_CAST_Abbrev, + CONSTANTS_NULL_Abbrev, + + // FUNCTION_BLOCK abbrev id's. + FUNCTION_INST_LOAD_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + FUNCTION_INST_BINOP_ABBREV, + FUNCTION_INST_BINOP_FLAGS_ABBREV, + FUNCTION_INST_CAST_ABBREV, + FUNCTION_INST_RET_VOID_ABBREV, + FUNCTION_INST_RET_VAL_ABBREV, + FUNCTION_INST_UNREACHABLE_ABBREV +}; + +static unsigned GetEncodedCastOpcode(unsigned Opcode) { + switch (Opcode) { + default: llvm_unreachable("Unknown cast instruction!"); + case Instruction::Trunc : return bitc::CAST_TRUNC; + case Instruction::ZExt : return bitc::CAST_ZEXT; + case Instruction::SExt : return bitc::CAST_SEXT; + case Instruction::FPToUI : return bitc::CAST_FPTOUI; + case Instruction::FPToSI : return bitc::CAST_FPTOSI; + case Instruction::UIToFP : return bitc::CAST_UITOFP; + case Instruction::SIToFP : return bitc::CAST_SITOFP; + case Instruction::FPTrunc : return bitc::CAST_FPTRUNC; + case Instruction::FPExt : return bitc::CAST_FPEXT; + case Instruction::PtrToInt: return bitc::CAST_PTRTOINT; + case Instruction::IntToPtr: return bitc::CAST_INTTOPTR; + case Instruction::BitCast : return bitc::CAST_BITCAST; + } +} + +static unsigned GetEncodedBinaryOpcode(unsigned Opcode) { + switch (Opcode) { + default: llvm_unreachable("Unknown binary instruction!"); + case Instruction::Add: + case Instruction::FAdd: return bitc::BINOP_ADD; + case Instruction::Sub: + case Instruction::FSub: return bitc::BINOP_SUB; + case Instruction::Mul: + case Instruction::FMul: return bitc::BINOP_MUL; + case Instruction::UDiv: return bitc::BINOP_UDIV; + case Instruction::FDiv: + case Instruction::SDiv: return bitc::BINOP_SDIV; + case Instruction::URem: return bitc::BINOP_UREM; + case Instruction::FRem: + case Instruction::SRem: return bitc::BINOP_SREM; + case Instruction::Shl: return bitc::BINOP_SHL; + case Instruction::LShr: return bitc::BINOP_LSHR; + case Instruction::AShr: return bitc::BINOP_ASHR; + case Instruction::And: return bitc::BINOP_AND; + case Instruction::Or: return bitc::BINOP_OR; + case Instruction::Xor: return bitc::BINOP_XOR; + } +} + +static unsigned GetEncodedRMWOperation(AtomicRMWInst::BinOp Op) { + switch (Op) { + default: llvm_unreachable("Unknown RMW operation!"); + case AtomicRMWInst::Xchg: return bitc::RMW_XCHG; + case AtomicRMWInst::Add: return bitc::RMW_ADD; + case AtomicRMWInst::Sub: return bitc::RMW_SUB; + case AtomicRMWInst::And: return bitc::RMW_AND; + case AtomicRMWInst::Nand: return bitc::RMW_NAND; + case AtomicRMWInst::Or: return bitc::RMW_OR; + case AtomicRMWInst::Xor: return bitc::RMW_XOR; + case AtomicRMWInst::Max: return bitc::RMW_MAX; + case AtomicRMWInst::Min: return bitc::RMW_MIN; + case AtomicRMWInst::UMax: return bitc::RMW_UMAX; + case AtomicRMWInst::UMin: return bitc::RMW_UMIN; + } +} + +static unsigned GetEncodedOrdering(AtomicOrdering Ordering) { + switch (Ordering) { + default: llvm_unreachable("Unknown atomic ordering"); + case NotAtomic: return bitc::ORDERING_NOTATOMIC; + case Unordered: return bitc::ORDERING_UNORDERED; + case Monotonic: return bitc::ORDERING_MONOTONIC; + case Acquire: return bitc::ORDERING_ACQUIRE; + case Release: return bitc::ORDERING_RELEASE; + case AcquireRelease: return bitc::ORDERING_ACQREL; + case SequentiallyConsistent: return bitc::ORDERING_SEQCST; + } +} + +static unsigned GetEncodedSynchScope(SynchronizationScope SynchScope) { + switch (SynchScope) { + default: llvm_unreachable("Unknown synchronization scope"); + case SingleThread: return bitc::SYNCHSCOPE_SINGLETHREAD; + case CrossThread: return bitc::SYNCHSCOPE_CROSSTHREAD; + } +} + +static void WriteStringRecord(unsigned Code, StringRef Str, + unsigned AbbrevToUse, BitstreamWriter &Stream) { + SmallVector<unsigned, 64> Vals; + + // Code: [strchar x N] + for (unsigned i = 0, e = Str.size(); i != e; ++i) { + if (AbbrevToUse && !BitCodeAbbrevOp::isChar6(Str[i])) + AbbrevToUse = 0; + Vals.push_back(Str[i]); + } + + // Emit the finished record. + Stream.EmitRecord(Code, Vals, AbbrevToUse); +} + +// Emit information about parameter attributes. +static void WriteAttributeTable(const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const std::vector<AttributeSet> &Attrs = VE.getAttributes(); + if (Attrs.empty()) return; + + Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3); + + SmallVector<uint64_t, 64> Record; + for (unsigned i = 0, e = Attrs.size(); i != e; ++i) { + const AttributeSet &A = Attrs[i]; + for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) { + Record.push_back(A.getSlotIndex(i)); + Record.push_back(encodeLLVMAttributesForBitcode(A, A.getSlotIndex(i))); + } + + // This needs to use the 3.2 entry type + Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY_OLD, Record); + Record.clear(); + } + + Stream.ExitBlock(); +} + +/// WriteTypeTable - Write out the type table for a module. +static void WriteTypeTable(const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const llvm_2_9_func::ValueEnumerator::TypeList &TypeList = VE.getTypes(); + + Stream.EnterSubblock(bitc::TYPE_BLOCK_ID_NEW, 4 /*count from # abbrevs */); + SmallVector<uint64_t, 64> TypeVals; + + uint64_t NumBits = Log2_32_Ceil(VE.getTypes().size()+1); + + // Abbrev for TYPE_CODE_POINTER. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_POINTER)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0 + unsigned PtrAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_FUNCTION. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_FUNCTION_OLD)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isvararg + Abbv->Add(BitCodeAbbrevOp(0)); // FIXME: DEAD value, remove in LLVM 3.0 + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + unsigned FunctionAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_STRUCT_ANON. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_ANON)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ispacked + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + unsigned StructAnonAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_STRUCT_NAME. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_NAME)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + unsigned StructNameAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_STRUCT_NAMED. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_NAMED)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ispacked + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + unsigned StructNamedAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_ARRAY. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_ARRAY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); // size + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + + unsigned ArrayAbbrev = Stream.EmitAbbrev(Abbv); + + // Emit an entry count so the reader can reserve space. + TypeVals.push_back(TypeList.size()); + Stream.EmitRecord(bitc::TYPE_CODE_NUMENTRY, TypeVals); + TypeVals.clear(); + + // Loop over all of the types, emitting each in turn. + for (unsigned i = 0, e = TypeList.size(); i != e; ++i) { + Type *T = TypeList[i]; + int AbbrevToUse = 0; + unsigned Code = 0; + + switch (T->getTypeID()) { + default: llvm_unreachable("Unknown type!"); + case Type::VoidTyID: Code = bitc::TYPE_CODE_VOID; break; + case Type::FloatTyID: Code = bitc::TYPE_CODE_FLOAT; break; + case Type::DoubleTyID: Code = bitc::TYPE_CODE_DOUBLE; break; + case Type::X86_FP80TyID: Code = bitc::TYPE_CODE_X86_FP80; break; + case Type::FP128TyID: Code = bitc::TYPE_CODE_FP128; break; + case Type::PPC_FP128TyID: Code = bitc::TYPE_CODE_PPC_FP128; break; + case Type::LabelTyID: Code = bitc::TYPE_CODE_LABEL; break; + case Type::MetadataTyID: Code = bitc::TYPE_CODE_METADATA; break; + case Type::X86_MMXTyID: Code = bitc::TYPE_CODE_X86_MMX; break; + case Type::IntegerTyID: + // INTEGER: [width] + Code = bitc::TYPE_CODE_INTEGER; + TypeVals.push_back(cast<IntegerType>(T)->getBitWidth()); + break; + case Type::PointerTyID: { + PointerType *PTy = cast<PointerType>(T); + // POINTER: [pointee type, address space] + Code = bitc::TYPE_CODE_POINTER; + TypeVals.push_back(VE.getTypeID(PTy->getElementType())); + unsigned AddressSpace = PTy->getAddressSpace(); + TypeVals.push_back(AddressSpace); + if (AddressSpace == 0) AbbrevToUse = PtrAbbrev; + break; + } + case Type::FunctionTyID: { + FunctionType *FT = cast<FunctionType>(T); + // FUNCTION: [isvararg, attrid, retty, paramty x N] + Code = bitc::TYPE_CODE_FUNCTION_OLD; + TypeVals.push_back(FT->isVarArg()); + TypeVals.push_back(0); // FIXME: DEAD: remove in llvm 3.0 + TypeVals.push_back(VE.getTypeID(FT->getReturnType())); + for (unsigned i = 0, e = FT->getNumParams(); i != e; ++i) + TypeVals.push_back(VE.getTypeID(FT->getParamType(i))); + AbbrevToUse = FunctionAbbrev; + break; + } + case Type::StructTyID: { + StructType *ST = cast<StructType>(T); + // STRUCT: [ispacked, eltty x N] + TypeVals.push_back(ST->isPacked()); + // Output all of the element types. + for (StructType::element_iterator I = ST->element_begin(), + E = ST->element_end(); I != E; ++I) + TypeVals.push_back(VE.getTypeID(*I)); + + if (ST->isLiteral()) { + Code = bitc::TYPE_CODE_STRUCT_ANON; + AbbrevToUse = StructAnonAbbrev; + } else { + if (ST->isOpaque()) { + Code = bitc::TYPE_CODE_OPAQUE; + } else { + Code = bitc::TYPE_CODE_STRUCT_NAMED; + AbbrevToUse = StructNamedAbbrev; + } + + // Emit the name if it is present. + if (!ST->getName().empty()) + WriteStringRecord(bitc::TYPE_CODE_STRUCT_NAME, ST->getName(), + StructNameAbbrev, Stream); + } + break; + } + case Type::ArrayTyID: { + ArrayType *AT = cast<ArrayType>(T); + // ARRAY: [numelts, eltty] + Code = bitc::TYPE_CODE_ARRAY; + TypeVals.push_back(AT->getNumElements()); + TypeVals.push_back(VE.getTypeID(AT->getElementType())); + AbbrevToUse = ArrayAbbrev; + break; + } + case Type::VectorTyID: { + VectorType *VT = cast<VectorType>(T); + // VECTOR [numelts, eltty] + Code = bitc::TYPE_CODE_VECTOR; + TypeVals.push_back(VT->getNumElements()); + TypeVals.push_back(VE.getTypeID(VT->getElementType())); + break; + } + } + + // Emit the finished record. + Stream.EmitRecord(Code, TypeVals, AbbrevToUse); + TypeVals.clear(); + } + + Stream.ExitBlock(); +} + +static unsigned getEncodedLinkage(const GlobalValue &GV) { + switch (GV.getLinkage()) { + case GlobalValue::ExternalLinkage: + return 0; + case GlobalValue::WeakAnyLinkage: + return 1; + case GlobalValue::AppendingLinkage: + return 2; + case GlobalValue::InternalLinkage: + return 3; + case GlobalValue::LinkOnceAnyLinkage: + return 4; + case GlobalValue::ExternalWeakLinkage: + return 7; + case GlobalValue::CommonLinkage: + return 8; + case GlobalValue::PrivateLinkage: + return 9; + case GlobalValue::WeakODRLinkage: + return 10; + case GlobalValue::LinkOnceODRLinkage: + return 11; + case GlobalValue::AvailableExternallyLinkage: + return 12; + } + llvm_unreachable("Invalid linkage"); +} + +static unsigned getEncodedVisibility(const GlobalValue &GV) { + switch (GV.getVisibility()) { + case GlobalValue::DefaultVisibility: return 0; + case GlobalValue::HiddenVisibility: return 1; + case GlobalValue::ProtectedVisibility: return 2; + } + llvm_unreachable("Invalid visibility"); +} + +// Emit top-level description of module, including target triple, inline asm, +// descriptors for global variables, and function prototype info. +static void WriteModuleInfo(const Module *M, + const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + // Emit various pieces of data attached to a module. + if (!M->getTargetTriple().empty()) + WriteStringRecord(bitc::MODULE_CODE_TRIPLE, M->getTargetTriple(), + 0/*TODO*/, Stream); + const std::string &DL = M->getDataLayoutStr(); + if (!DL.empty()) + WriteStringRecord(bitc::MODULE_CODE_DATALAYOUT, DL, 0 /*TODO*/, Stream); + if (!M->getModuleInlineAsm().empty()) + WriteStringRecord(bitc::MODULE_CODE_ASM, M->getModuleInlineAsm(), + 0/*TODO*/, Stream); + + // Emit information about sections and GC, computing how many there are. Also + // compute the maximum alignment value. + std::map<std::string, unsigned> SectionMap; + std::map<std::string, unsigned> GCMap; + unsigned MaxAlignment = 0; + unsigned MaxGlobalType = 0; + for (const GlobalValue &GV : M->globals()) { + MaxAlignment = std::max(MaxAlignment, GV.getAlignment()); + MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV.getType())); + if (GV.hasSection()) { + // Give section names unique ID's. + unsigned &Entry = SectionMap[GV.getSection()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, GV.getSection(), + 0/*TODO*/, Stream); + Entry = SectionMap.size(); + } + } + } + for (const Function &F : *M) { + MaxAlignment = std::max(MaxAlignment, F.getAlignment()); + if (F.hasSection()) { + // Give section names unique ID's. + unsigned &Entry = SectionMap[F.getSection()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, F.getSection(), + 0/*TODO*/, Stream); + Entry = SectionMap.size(); + } + } + if (F.hasGC()) { + // Same for GC names. + unsigned &Entry = GCMap[F.getGC()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_GCNAME, F.getGC(), + 0/*TODO*/, Stream); + Entry = GCMap.size(); + } + } + } + + // Emit abbrev for globals, now that we know # sections and max alignment. + unsigned SimpleGVarAbbrev = 0; + if (!M->global_empty()) { + // Add an abbrev for common globals with no visibility or thread localness. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::MODULE_CODE_GLOBALVAR)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(MaxGlobalType+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Constant. + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Initializer. + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // Linkage. + if (MaxAlignment == 0) // Alignment. + Abbv->Add(BitCodeAbbrevOp(0)); + else { + unsigned MaxEncAlignment = Log2_32(MaxAlignment)+1; + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(MaxEncAlignment+1))); + } + if (SectionMap.empty()) // Section. + Abbv->Add(BitCodeAbbrevOp(0)); + else + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(SectionMap.size()+1))); + // Don't bother emitting vis + thread local. + SimpleGVarAbbrev = Stream.EmitAbbrev(Abbv); + } + + // Emit the global variable information. + SmallVector<unsigned, 64> Vals; + for (const GlobalVariable &GV : M->globals()) { + unsigned AbbrevToUse = 0; + + // GLOBALVAR: [type, isconst, initid, + // linkage, alignment, section, visibility, threadlocal, + // unnamed_addr] + Vals.push_back(VE.getTypeID(GV.getType())); + Vals.push_back(GV.isConstant()); + Vals.push_back(GV.isDeclaration() ? 0 : + (VE.getValueID(GV.getInitializer()) + 1)); + Vals.push_back(getEncodedLinkage(GV)); + Vals.push_back(Log2_32(GV.getAlignment())+1); + Vals.push_back(GV.hasSection() ? SectionMap[GV.getSection()] : 0); + if (GV.isThreadLocal() || + GV.getVisibility() != GlobalValue::DefaultVisibility || + GV.hasUnnamedAddr()) { + Vals.push_back(getEncodedVisibility(GV)); + Vals.push_back(GV.isThreadLocal()); + Vals.push_back(GV.hasUnnamedAddr()); + } else { + AbbrevToUse = SimpleGVarAbbrev; + } + + Stream.EmitRecord(bitc::MODULE_CODE_GLOBALVAR, Vals, AbbrevToUse); + Vals.clear(); + } + + // Emit the function proto information. + for (const Function &F : *M) { + // FUNCTION: [type, callingconv, isproto, paramattr, + // linkage, alignment, section, visibility, gc, unnamed_addr] + Vals.push_back(VE.getTypeID(F.getType())); + Vals.push_back(F.getCallingConv()); + Vals.push_back(F.isDeclaration()); + Vals.push_back(getEncodedLinkage(F)); + Vals.push_back(VE.getAttributeID(F.getAttributes())); + Vals.push_back(Log2_32(F.getAlignment())+1); + Vals.push_back(F.hasSection() ? SectionMap[F.getSection()] : 0); + Vals.push_back(getEncodedVisibility(F)); + Vals.push_back(F.hasGC() ? GCMap[F.getGC()] : 0); + Vals.push_back(F.hasUnnamedAddr()); + + unsigned AbbrevToUse = 0; + Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse); + Vals.clear(); + } + + // Emit the alias information. + for (const GlobalAlias &A : M->aliases()) { + Vals.push_back(VE.getTypeID(A.getType())); + Vals.push_back(VE.getValueID(A.getAliasee())); + Vals.push_back(getEncodedLinkage(A)); + Vals.push_back(getEncodedVisibility(A)); + unsigned AbbrevToUse = 0; + Stream.EmitRecord(bitc::MODULE_CODE_ALIAS_OLD, Vals, AbbrevToUse); + Vals.clear(); + } +} + +static uint64_t GetOptimizationFlags(const Value *V) { + uint64_t Flags = 0; + + if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) { + if (OBO->hasNoSignedWrap()) + Flags |= 1 << bitc::OBO_NO_SIGNED_WRAP; + if (OBO->hasNoUnsignedWrap()) + Flags |= 1 << bitc::OBO_NO_UNSIGNED_WRAP; + } else if (const auto *PEO = dyn_cast<PossiblyExactOperator>(V)) { + if (PEO->isExact()) + Flags |= 1 << bitc::PEO_EXACT; + } + + return Flags; +} + +static void WriteValueAsMetadata(const ValueAsMetadata *MD, + const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record) { + // Mimic an MDNode with a value as one operand. + Value *V = MD->getValue(); + Record.push_back(VE.getTypeID(V->getType())); + Record.push_back(VE.getValueID(V)); + Stream.EmitRecord(bitc::METADATA_OLD_NODE, Record, 0); + Record.clear(); +} + +static void WriteMDTuple(const MDTuple *N, const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, unsigned Abbrev) { + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { + Metadata *MD = N->getOperand(i); + assert(!(MD && isa<LocalAsMetadata>(MD)) && + "Unexpected function-local metadata"); + if (!MD) { + // TODO(srhines): I don't believe this case can exist for RS. + Record.push_back(VE.getTypeID(llvm::Type::getVoidTy(N->getContext()))); + Record.push_back(0); + } else if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MD)) { + Record.push_back(VE.getTypeID(MDC->getType())); + Record.push_back(VE.getValueID(MDC->getValue())); + } else { + Record.push_back(VE.getTypeID( + llvm::Type::getMetadataTy(N->getContext()))); + Record.push_back(VE.getMetadataID(MD)); + } + } + Stream.EmitRecord(bitc::METADATA_OLD_NODE, Record, Abbrev); + Record.clear(); +} + +/*static void WriteMDLocation(const MDLocation *N, const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, + unsigned Abbrev) { + Record.push_back(N->isDistinct()); + Record.push_back(N->getLine()); + Record.push_back(N->getColumn()); + Record.push_back(VE.getMetadataID(N->getScope())); + Record.push_back(VE.getMetadataOrNullID(N->getInlinedAt())); + + Stream.EmitRecord(bitc::METADATA_LOCATION, Record, Abbrev); + Record.clear(); +} + +static void WriteGenericDebugNode(const GenericDebugNode *, + const llvm_2_9_func::ValueEnumerator &, BitstreamWriter &, + SmallVectorImpl<uint64_t> &, unsigned) { + llvm_unreachable("unimplemented"); +}*/ + +static void WriteModuleMetadata(const Module *M, + const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const auto &MDs = VE.getMDs(); + if (MDs.empty() && M->named_metadata_empty()) + return; + + // RenderScript files *ALWAYS* have metadata! + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + + unsigned MDSAbbrev = 0; + if (VE.hasMDString()) { + // Abbrev for METADATA_STRING. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_STRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + MDSAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned MDLocationAbbrev = 0; + if (VE.hasDILocation()) { + // TODO(srhines): Should be unreachable for RenderScript. + // Abbrev for METADATA_LOCATION. + // + // Assume the column is usually under 128, and always output the inlined-at + // location (it's never more expensive than building an array size 1). + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_LOCATION)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + MDLocationAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned NameAbbrev = 0; + if (!M->named_metadata_empty()) { + // Abbrev for METADATA_NAME. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_NAME)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + NameAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned MDTupleAbbrev = 0; + //unsigned GenericDebugNodeAbbrev = 0; + SmallVector<uint64_t, 64> Record; + for (const Metadata *MD : MDs) { + if (const MDNode *N = dyn_cast<MDNode>(MD)) { + switch (N->getMetadataID()) { + default: + llvm_unreachable("Invalid MDNode subclass"); +#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) +#define HANDLE_MDNODE_LEAF(CLASS) \ + case Metadata::CLASS##Kind: \ + Write##CLASS(cast<CLASS>(N), VE, Stream, Record, CLASS##Abbrev); \ + continue; +#include "llvm/IR/Metadata.def" + } + } + if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MD)) { + WriteValueAsMetadata(MDC, VE, Stream, Record); + continue; + } + const MDString *MDS = cast<MDString>(MD); + // Code: [strchar x N] + Record.append(MDS->bytes_begin(), MDS->bytes_end()); + + // Emit the finished record. + Stream.EmitRecord(bitc::METADATA_STRING, Record, MDSAbbrev); + Record.clear(); + } + + // Write named metadata. + for (const NamedMDNode &NMD : M->named_metadata()) { + // Write name. + StringRef Str = NMD.getName(); + Record.append(Str.bytes_begin(), Str.bytes_end()); + Stream.EmitRecord(bitc::METADATA_NAME, Record, NameAbbrev); + Record.clear(); + + // Write named metadata operands. + for (const MDNode *N : NMD.operands()) + Record.push_back(VE.getMetadataID(N)); + Stream.EmitRecord(bitc::METADATA_NAMED_NODE, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteFunctionLocalMetadata(const Function &F, + const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + bool StartedMetadataBlock = false; + SmallVector<uint64_t, 64> Record; + const SmallVectorImpl<const LocalAsMetadata *> &MDs = + VE.getFunctionLocalMDs(); + for (unsigned i = 0, e = MDs.size(); i != e; ++i) { + assert(MDs[i] && "Expected valid function-local metadata"); + if (!StartedMetadataBlock) { + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + StartedMetadataBlock = true; + } + WriteValueAsMetadata(MDs[i], VE, Stream, Record); + } + + if (StartedMetadataBlock) + Stream.ExitBlock(); +} + +static void WriteMetadataAttachment(const Function &F, + const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::METADATA_ATTACHMENT_ID, 3); + + SmallVector<uint64_t, 64> Record; + + // Write metadata attachments + // METADATA_ATTACHMENT - [m x [value, [n x [id, mdnode]]] + SmallVector<std::pair<unsigned, MDNode *>, 4> MDs; + + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); + I != E; ++I) { + MDs.clear(); + I->getAllMetadataOtherThanDebugLoc(MDs); + + // If no metadata, ignore instruction. + if (MDs.empty()) continue; + + Record.push_back(VE.getInstructionID(&*I)); + + for (unsigned i = 0, e = MDs.size(); i != e; ++i) { + Record.push_back(MDs[i].first); + Record.push_back(VE.getMetadataID(MDs[i].second)); + } + Stream.EmitRecord(bitc::METADATA_ATTACHMENT, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteModuleMetadataStore(const Module *M, BitstreamWriter &Stream) { + SmallVector<uint64_t, 64> Record; + + // Write metadata kinds + // METADATA_KIND - [n x [id, name]] + SmallVector<StringRef, 4> Names; + M->getMDKindNames(Names); + + if (Names.empty()) return; + + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + + for (unsigned MDKindID = 0, e = Names.size(); MDKindID != e; ++MDKindID) { + Record.push_back(MDKindID); + StringRef KName = Names[MDKindID]; + Record.append(KName.begin(), KName.end()); + + Stream.EmitRecord(bitc::METADATA_KIND, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteConstants(unsigned FirstVal, unsigned LastVal, + const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream, bool isGlobal) { + if (FirstVal == LastVal) return; + + Stream.EnterSubblock(bitc::CONSTANTS_BLOCK_ID, 4); + + unsigned AggregateAbbrev = 0; + unsigned String8Abbrev = 0; + unsigned CString7Abbrev = 0; + unsigned CString6Abbrev = 0; + // If this is a constant pool for the module, emit module-specific abbrevs. + if (isGlobal) { + // Abbrev for CST_CODE_AGGREGATE. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_AGGREGATE)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, Log2_32_Ceil(LastVal+1))); + AggregateAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for CST_CODE_STRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_STRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + String8Abbrev = Stream.EmitAbbrev(Abbv); + // Abbrev for CST_CODE_CSTRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CSTRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); + CString7Abbrev = Stream.EmitAbbrev(Abbv); + // Abbrev for CST_CODE_CSTRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CSTRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + CString6Abbrev = Stream.EmitAbbrev(Abbv); + } + + SmallVector<uint64_t, 64> Record; + + const llvm_2_9_func::ValueEnumerator::ValueList &Vals = VE.getValues(); + Type *LastTy = nullptr; + for (unsigned i = FirstVal; i != LastVal; ++i) { + const Value *V = Vals[i].first; + // If we need to switch types, do so now. + if (V->getType() != LastTy) { + LastTy = V->getType(); + Record.push_back(VE.getTypeID(LastTy)); + Stream.EmitRecord(bitc::CST_CODE_SETTYPE, Record, + CONSTANTS_SETTYPE_ABBREV); + Record.clear(); + } + + if (const InlineAsm *IA = dyn_cast<InlineAsm>(V)) { + Record.push_back(unsigned(IA->hasSideEffects()) | + unsigned(IA->isAlignStack()) << 1); + + // Add the asm string. + const std::string &AsmStr = IA->getAsmString(); + Record.push_back(AsmStr.size()); + for (unsigned i = 0, e = AsmStr.size(); i != e; ++i) + Record.push_back(AsmStr[i]); + + // Add the constraint string. + const std::string &ConstraintStr = IA->getConstraintString(); + Record.push_back(ConstraintStr.size()); + for (unsigned i = 0, e = ConstraintStr.size(); i != e; ++i) + Record.push_back(ConstraintStr[i]); + Stream.EmitRecord(bitc::CST_CODE_INLINEASM, Record); + Record.clear(); + continue; + } + const Constant *C = cast<Constant>(V); + unsigned Code = -1U; + unsigned AbbrevToUse = 0; + if (C->isNullValue()) { + Code = bitc::CST_CODE_NULL; + } else if (isa<UndefValue>(C)) { + Code = bitc::CST_CODE_UNDEF; + } else if (const ConstantInt *IV = dyn_cast<ConstantInt>(C)) { + if (IV->getBitWidth() <= 64) { + uint64_t V = IV->getSExtValue(); + if ((int64_t)V >= 0) + Record.push_back(V << 1); + else + Record.push_back((-V << 1) | 1); + Code = bitc::CST_CODE_INTEGER; + AbbrevToUse = CONSTANTS_INTEGER_ABBREV; + } else { // Wide integers, > 64 bits in size. + // We have an arbitrary precision integer value to write whose + // bit width is > 64. However, in canonical unsigned integer + // format it is likely that the high bits are going to be zero. + // So, we only write the number of active words. + unsigned NWords = IV->getValue().getActiveWords(); + const uint64_t *RawWords = IV->getValue().getRawData(); + for (unsigned i = 0; i != NWords; ++i) { + int64_t V = RawWords[i]; + if (V >= 0) + Record.push_back(V << 1); + else + Record.push_back((-V << 1) | 1); + } + Code = bitc::CST_CODE_WIDE_INTEGER; + } + } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) { + Code = bitc::CST_CODE_FLOAT; + Type *Ty = CFP->getType(); + if (Ty->isFloatTy() || Ty->isDoubleTy()) { + Record.push_back(CFP->getValueAPF().bitcastToAPInt().getZExtValue()); + } else if (Ty->isX86_FP80Ty()) { + // api needed to prevent premature destruction + // bits are not in the same order as a normal i80 APInt, compensate. + APInt api = CFP->getValueAPF().bitcastToAPInt(); + const uint64_t *p = api.getRawData(); + Record.push_back((p[1] << 48) | (p[0] >> 16)); + Record.push_back(p[0] & 0xffffLL); + } else if (Ty->isFP128Ty() || Ty->isPPC_FP128Ty()) { + APInt api = CFP->getValueAPF().bitcastToAPInt(); + const uint64_t *p = api.getRawData(); + Record.push_back(p[0]); + Record.push_back(p[1]); + } else { + assert (0 && "Unknown FP type!"); + } + } else if (isa<ConstantDataSequential>(C) && + cast<ConstantDataSequential>(C)->isString()) { + const ConstantDataSequential *Str = cast<ConstantDataSequential>(C); + // Emit constant strings specially. + unsigned NumElts = Str->getNumElements(); + // If this is a null-terminated string, use the denser CSTRING encoding. + if (Str->isCString()) { + Code = bitc::CST_CODE_CSTRING; + --NumElts; // Don't encode the null, which isn't allowed by char6. + } else { + Code = bitc::CST_CODE_STRING; + AbbrevToUse = String8Abbrev; + } + bool isCStr7 = Code == bitc::CST_CODE_CSTRING; + bool isCStrChar6 = Code == bitc::CST_CODE_CSTRING; + for (unsigned i = 0; i != NumElts; ++i) { + unsigned char V = Str->getElementAsInteger(i); + Record.push_back(V); + isCStr7 &= (V & 128) == 0; + if (isCStrChar6) + isCStrChar6 = BitCodeAbbrevOp::isChar6(V); + } + + if (isCStrChar6) + AbbrevToUse = CString6Abbrev; + else if (isCStr7) + AbbrevToUse = CString7Abbrev; + } else if (const ConstantDataSequential *CDS = + dyn_cast<ConstantDataSequential>(C)) { + // We must replace ConstantDataSequential's representation with the + // legacy ConstantArray/ConstantVector/ConstantStruct version. + // ValueEnumerator is similarly modified to mark the appropriate + // Constants as used (so they are emitted). + Code = bitc::CST_CODE_AGGREGATE; + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) + Record.push_back(VE.getValueID(CDS->getElementAsConstant(i))); + AbbrevToUse = AggregateAbbrev; + } else if (isa<ConstantArray>(C) || isa<ConstantStruct>(C) || + isa<ConstantVector>(C)) { + Code = bitc::CST_CODE_AGGREGATE; + for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) + Record.push_back(VE.getValueID(C->getOperand(i))); + AbbrevToUse = AggregateAbbrev; + } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { + switch (CE->getOpcode()) { + default: + if (Instruction::isCast(CE->getOpcode())) { + Code = bitc::CST_CODE_CE_CAST; + Record.push_back(GetEncodedCastOpcode(CE->getOpcode())); + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + AbbrevToUse = CONSTANTS_CE_CAST_Abbrev; + } else { + assert(CE->getNumOperands() == 2 && "Unknown constant expr!"); + Code = bitc::CST_CODE_CE_BINOP; + Record.push_back(GetEncodedBinaryOpcode(CE->getOpcode())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + uint64_t Flags = GetOptimizationFlags(CE); + if (Flags != 0) + Record.push_back(Flags); + } + break; + case Instruction::GetElementPtr: + Code = bitc::CST_CODE_CE_GEP; + if (cast<GEPOperator>(C)->isInBounds()) + Code = bitc::CST_CODE_CE_INBOUNDS_GEP; + for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) { + Record.push_back(VE.getTypeID(C->getOperand(i)->getType())); + Record.push_back(VE.getValueID(C->getOperand(i))); + } + break; + case Instruction::Select: + Code = bitc::CST_CODE_CE_SELECT; + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ExtractElement: + Code = bitc::CST_CODE_CE_EXTRACTELT; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + break; + case Instruction::InsertElement: + Code = bitc::CST_CODE_CE_INSERTELT; + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ShuffleVector: + // If the return type and argument types are the same, this is a + // standard shufflevector instruction. If the types are different, + // then the shuffle is widening or truncating the input vectors, and + // the argument type must also be encoded. + if (C->getType() == C->getOperand(0)->getType()) { + Code = bitc::CST_CODE_CE_SHUFFLEVEC; + } else { + Code = bitc::CST_CODE_CE_SHUFVEC_EX; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + } + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ICmp: + case Instruction::FCmp: + Code = bitc::CST_CODE_CE_CMP; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(CE->getPredicate()); + break; + } + } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) { + Code = bitc::CST_CODE_BLOCKADDRESS; + Record.push_back(VE.getTypeID(BA->getFunction()->getType())); + Record.push_back(VE.getValueID(BA->getFunction())); + Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock())); + } else { +#ifndef NDEBUG + C->dump(); +#endif + llvm_unreachable("Unknown constant!"); + } + Stream.EmitRecord(Code, Record, AbbrevToUse); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteModuleConstants(const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const llvm_2_9_func::ValueEnumerator::ValueList &Vals = VE.getValues(); + + // Find the first constant to emit, which is the first non-globalvalue value. + // We know globalvalues have been emitted by WriteModuleInfo. + for (unsigned i = 0, e = Vals.size(); i != e; ++i) { + if (!isa<GlobalValue>(Vals[i].first)) { + WriteConstants(i, Vals.size(), VE, Stream, true); + return; + } + } +} + +/// PushValueAndType - The file has to encode both the value and type id for +/// many values, because we need to know what type to create for forward +/// references. However, most operands are not forward references, so this type +/// field is not needed. +/// +/// This function adds V's value ID to Vals. If the value ID is higher than the +/// instruction ID, then it is a forward reference, and it also includes the +/// type ID. +static bool PushValueAndType(const Value *V, unsigned InstID, + SmallVector<unsigned, 64> &Vals, + llvm_2_9_func::ValueEnumerator &VE) { + unsigned ValID = VE.getValueID(V); + Vals.push_back(ValID); + if (ValID >= InstID) { + Vals.push_back(VE.getTypeID(V->getType())); + return true; + } + return false; +} + +/// WriteInstruction - Emit an instruction to the specified stream. +static void WriteInstruction(const Instruction &I, unsigned InstID, + llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVector<unsigned, 64> &Vals) { + unsigned Code = 0; + unsigned AbbrevToUse = 0; + VE.setInstructionID(&I); + switch (I.getOpcode()) { + default: + if (Instruction::isCast(I.getOpcode())) { + Code = bitc::FUNC_CODE_INST_CAST; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_CAST_ABBREV; + Vals.push_back(VE.getTypeID(I.getType())); + Vals.push_back(GetEncodedCastOpcode(I.getOpcode())); + } else { + assert(isa<BinaryOperator>(I) && "Unknown instruction!"); + Code = bitc::FUNC_CODE_INST_BINOP; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_BINOP_ABBREV; + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(GetEncodedBinaryOpcode(I.getOpcode())); + uint64_t Flags = GetOptimizationFlags(&I); + if (Flags != 0) { + if (AbbrevToUse == FUNCTION_INST_BINOP_ABBREV) + AbbrevToUse = FUNCTION_INST_BINOP_FLAGS_ABBREV; + Vals.push_back(Flags); + } + } + break; + + case Instruction::GetElementPtr: + Code = bitc::FUNC_CODE_INST_GEP_OLD; + if (cast<GEPOperator>(&I)->isInBounds()) + Code = bitc::FUNC_CODE_INST_INBOUNDS_GEP_OLD; + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + break; + case Instruction::ExtractValue: { + Code = bitc::FUNC_CODE_INST_EXTRACTVAL; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + const ExtractValueInst *EVI = cast<ExtractValueInst>(&I); + for (const unsigned *i = EVI->idx_begin(), *e = EVI->idx_end(); i != e; ++i) + Vals.push_back(*i); + break; + } + case Instruction::InsertValue: { + Code = bitc::FUNC_CODE_INST_INSERTVAL; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + PushValueAndType(I.getOperand(1), InstID, Vals, VE); + const InsertValueInst *IVI = cast<InsertValueInst>(&I); + for (const unsigned *i = IVI->idx_begin(), *e = IVI->idx_end(); i != e; ++i) + Vals.push_back(*i); + break; + } + case Instruction::Select: + Code = bitc::FUNC_CODE_INST_VSELECT; + PushValueAndType(I.getOperand(1), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(2))); + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + break; + case Instruction::ExtractElement: + Code = bitc::FUNC_CODE_INST_EXTRACTELT; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + break; + case Instruction::InsertElement: + Code = bitc::FUNC_CODE_INST_INSERTELT; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(VE.getValueID(I.getOperand(2))); + break; + case Instruction::ShuffleVector: + Code = bitc::FUNC_CODE_INST_SHUFFLEVEC; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(VE.getValueID(I.getOperand(2))); + break; + case Instruction::ICmp: + case Instruction::FCmp: + // compare returning Int1Ty or vector of Int1Ty + Code = bitc::FUNC_CODE_INST_CMP2; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(cast<CmpInst>(I).getPredicate()); + break; + + case Instruction::Ret: + { + Code = bitc::FUNC_CODE_INST_RET; + unsigned NumOperands = I.getNumOperands(); + if (NumOperands == 0) + AbbrevToUse = FUNCTION_INST_RET_VOID_ABBREV; + else if (NumOperands == 1) { + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_RET_VAL_ABBREV; + } else { + for (unsigned i = 0, e = NumOperands; i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + } + } + break; + case Instruction::Br: + { + Code = bitc::FUNC_CODE_INST_BR; + const BranchInst &II = cast<BranchInst>(I); + Vals.push_back(VE.getValueID(II.getSuccessor(0))); + if (II.isConditional()) { + Vals.push_back(VE.getValueID(II.getSuccessor(1))); + Vals.push_back(VE.getValueID(II.getCondition())); + } + } + break; + case Instruction::Switch: + { + Code = bitc::FUNC_CODE_INST_SWITCH; + const SwitchInst &SI = cast<SwitchInst>(I); + Vals.push_back(VE.getTypeID(SI.getCondition()->getType())); + Vals.push_back(VE.getValueID(SI.getCondition())); + Vals.push_back(VE.getValueID(SI.getDefaultDest())); + for (SwitchInst::ConstCaseIt i = SI.case_begin(), e = SI.case_end(); + i != e; ++i) { + Vals.push_back(VE.getValueID(i.getCaseValue())); + Vals.push_back(VE.getValueID(i.getCaseSuccessor())); + } + } + break; + case Instruction::IndirectBr: + Code = bitc::FUNC_CODE_INST_INDIRECTBR; + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + Vals.push_back(VE.getValueID(I.getOperand(i))); + break; + + case Instruction::Invoke: { + const InvokeInst *II = cast<InvokeInst>(&I); + const Value *Callee(II->getCalledValue()); + PointerType *PTy = cast<PointerType>(Callee->getType()); + FunctionType *FTy = cast<FunctionType>(PTy->getElementType()); + Code = bitc::FUNC_CODE_INST_INVOKE; + + Vals.push_back(VE.getAttributeID(II->getAttributes())); + Vals.push_back(II->getCallingConv()); + Vals.push_back(VE.getValueID(II->getNormalDest())); + Vals.push_back(VE.getValueID(II->getUnwindDest())); + PushValueAndType(Callee, InstID, Vals, VE); + + // Emit value #'s for the fixed parameters. + for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) + Vals.push_back(VE.getValueID(I.getOperand(i))); // fixed param. + + // Emit type/value pairs for varargs params. + if (FTy->isVarArg()) { + for (unsigned i = FTy->getNumParams(), e = I.getNumOperands()-3; + i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); // vararg + } + break; + } + case Instruction::Resume: + Code = bitc::FUNC_CODE_INST_RESUME; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + break; + case Instruction::Unreachable: + Code = bitc::FUNC_CODE_INST_UNREACHABLE; + AbbrevToUse = FUNCTION_INST_UNREACHABLE_ABBREV; + break; + + case Instruction::PHI: { + const PHINode &PN = cast<PHINode>(I); + Code = bitc::FUNC_CODE_INST_PHI; + Vals.push_back(VE.getTypeID(PN.getType())); + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { + Vals.push_back(VE.getValueID(PN.getIncomingValue(i))); + Vals.push_back(VE.getValueID(PN.getIncomingBlock(i))); + } + break; + } + + case Instruction::LandingPad: { + const LandingPadInst &LP = cast<LandingPadInst>(I); + Code = bitc::FUNC_CODE_INST_LANDINGPAD_OLD; + Vals.push_back(VE.getTypeID(LP.getType())); + // TODO (rebase): is this fix enough? + // PushValueAndType(LP.getPersonalityFn(), InstID, Vals, VE); + Vals.push_back(LP.isCleanup()); + Vals.push_back(LP.getNumClauses()); + for (unsigned I = 0, E = LP.getNumClauses(); I != E; ++I) { + if (LP.isCatch(I)) + Vals.push_back(LandingPadInst::Catch); + else + Vals.push_back(LandingPadInst::Filter); + PushValueAndType(LP.getClause(I), InstID, Vals, VE); + } + break; + } + + case Instruction::Alloca: + Code = bitc::FUNC_CODE_INST_ALLOCA; + Vals.push_back(VE.getTypeID(I.getType())); + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); + Vals.push_back(VE.getValueID(I.getOperand(0))); // size. + Vals.push_back(Log2_32(cast<AllocaInst>(I).getAlignment())+1); + break; + + case Instruction::Load: + if (cast<LoadInst>(I).isAtomic()) { + Code = bitc::FUNC_CODE_INST_LOADATOMIC; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + } else { + Code = bitc::FUNC_CODE_INST_LOAD; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) // ptr + AbbrevToUse = FUNCTION_INST_LOAD_ABBREV; + } + Vals.push_back(Log2_32(cast<LoadInst>(I).getAlignment())+1); + Vals.push_back(cast<LoadInst>(I).isVolatile()); + if (cast<LoadInst>(I).isAtomic()) { + Vals.push_back(GetEncodedOrdering(cast<LoadInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope(cast<LoadInst>(I).getSynchScope())); + } + break; + case Instruction::Store: + if (cast<StoreInst>(I).isAtomic()) + Code = bitc::FUNC_CODE_INST_STOREATOMIC; + else + Code = bitc::FUNC_CODE_INST_STORE_OLD; + PushValueAndType(I.getOperand(1), InstID, Vals, VE); // ptrty + ptr + Vals.push_back(VE.getValueID(I.getOperand(0))); // val. + Vals.push_back(Log2_32(cast<StoreInst>(I).getAlignment())+1); + Vals.push_back(cast<StoreInst>(I).isVolatile()); + if (cast<StoreInst>(I).isAtomic()) { + Vals.push_back(GetEncodedOrdering(cast<StoreInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope(cast<StoreInst>(I).getSynchScope())); + } + break; + case Instruction::AtomicCmpXchg: + Code = bitc::FUNC_CODE_INST_CMPXCHG; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); // ptrty + ptr + Vals.push_back(VE.getValueID(I.getOperand(1))); // cmp. + Vals.push_back(VE.getValueID(I.getOperand(2))); // newval. + Vals.push_back(cast<AtomicCmpXchgInst>(I).isVolatile()); + Vals.push_back(GetEncodedOrdering( + cast<AtomicCmpXchgInst>(I).getSuccessOrdering())); + Vals.push_back(GetEncodedSynchScope( + cast<AtomicCmpXchgInst>(I).getSynchScope())); + break; + case Instruction::AtomicRMW: + Code = bitc::FUNC_CODE_INST_ATOMICRMW; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); // ptrty + ptr + Vals.push_back(VE.getValueID(I.getOperand(1))); // val. + Vals.push_back(GetEncodedRMWOperation( + cast<AtomicRMWInst>(I).getOperation())); + Vals.push_back(cast<AtomicRMWInst>(I).isVolatile()); + Vals.push_back(GetEncodedOrdering(cast<AtomicRMWInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope( + cast<AtomicRMWInst>(I).getSynchScope())); + break; + case Instruction::Fence: + Code = bitc::FUNC_CODE_INST_FENCE; + Vals.push_back(GetEncodedOrdering(cast<FenceInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope(cast<FenceInst>(I).getSynchScope())); + break; + case Instruction::Call: { + const CallInst &CI = cast<CallInst>(I); + PointerType *PTy = cast<PointerType>(CI.getCalledValue()->getType()); + FunctionType *FTy = cast<FunctionType>(PTy->getElementType()); + + Code = bitc::FUNC_CODE_INST_CALL; + + Vals.push_back(VE.getAttributeID(CI.getAttributes())); + Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall())); + PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee + + // Emit value #'s for the fixed parameters. + for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) + Vals.push_back(VE.getValueID(CI.getArgOperand(i))); // fixed param. + + // Emit type/value pairs for varargs params. + if (FTy->isVarArg()) { + for (unsigned i = FTy->getNumParams(), e = CI.getNumArgOperands(); + i != e; ++i) + PushValueAndType(CI.getArgOperand(i), InstID, Vals, VE); // varargs + } + break; + } + case Instruction::VAArg: + Code = bitc::FUNC_CODE_INST_VAARG; + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); // valistty + Vals.push_back(VE.getValueID(I.getOperand(0))); // valist. + Vals.push_back(VE.getTypeID(I.getType())); // restype. + break; + } + + Stream.EmitRecord(Code, Vals, AbbrevToUse); + Vals.clear(); +} + +// Emit names for globals/functions etc. +static void WriteValueSymbolTable(const ValueSymbolTable &VST, + const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + if (VST.empty()) return; + Stream.EnterSubblock(bitc::VALUE_SYMTAB_BLOCK_ID, 4); + + // FIXME: Set up the abbrev, we know how many values there are! + // FIXME: We know if the type names can use 7-bit ascii. + SmallVector<unsigned, 64> NameVals; + + for (ValueSymbolTable::const_iterator SI = VST.begin(), SE = VST.end(); + SI != SE; ++SI) { + + const ValueName &Name = *SI; + + // Figure out the encoding to use for the name. + bool is7Bit = true; + bool isChar6 = true; + for (const char *C = Name.getKeyData(), *E = C+Name.getKeyLength(); + C != E; ++C) { + if (isChar6) + isChar6 = BitCodeAbbrevOp::isChar6(*C); + if ((unsigned char)*C & 128) { + is7Bit = false; + break; // don't bother scanning the rest. + } + } + + unsigned AbbrevToUse = VST_ENTRY_8_ABBREV; + + // VST_ENTRY: [valueid, namechar x N] + // VST_BBENTRY: [bbid, namechar x N] + unsigned Code; + if (isa<BasicBlock>(SI->getValue())) { + Code = bitc::VST_CODE_BBENTRY; + if (isChar6) + AbbrevToUse = VST_BBENTRY_6_ABBREV; + } else { + Code = bitc::VST_CODE_ENTRY; + if (isChar6) + AbbrevToUse = VST_ENTRY_6_ABBREV; + else if (is7Bit) + AbbrevToUse = VST_ENTRY_7_ABBREV; + } + + NameVals.push_back(VE.getValueID(SI->getValue())); + for (const char *P = Name.getKeyData(), + *E = Name.getKeyData()+Name.getKeyLength(); P != E; ++P) + NameVals.push_back((unsigned char)*P); + + // Emit the finished record. + Stream.EmitRecord(Code, NameVals, AbbrevToUse); + NameVals.clear(); + } + Stream.ExitBlock(); +} + +/// WriteFunction - Emit a function body to the module stream. +static void WriteFunction(const Function &F, llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::FUNCTION_BLOCK_ID, 4); + VE.incorporateFunction(F); + + SmallVector<unsigned, 64> Vals; + + // Emit the number of basic blocks, so the reader can create them ahead of + // time. + Vals.push_back(VE.getBasicBlocks().size()); + Stream.EmitRecord(bitc::FUNC_CODE_DECLAREBLOCKS, Vals); + Vals.clear(); + + // If there are function-local constants, emit them now. + unsigned CstStart, CstEnd; + VE.getFunctionConstantRange(CstStart, CstEnd); + WriteConstants(CstStart, CstEnd, VE, Stream, false); + + // If there is function-local metadata, emit it now. + WriteFunctionLocalMetadata(F, VE, Stream); + + // Keep a running idea of what the instruction ID is. + unsigned InstID = CstEnd; + + bool NeedsMetadataAttachment = false; + + DILocation *LastDL = nullptr; + + // Finally, emit all the instructions, in order. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); + I != E; ++I) { + WriteInstruction(*I, InstID, VE, Stream, Vals); + + if (!I->getType()->isVoidTy()) + ++InstID; + + // If the instruction has metadata, write a metadata attachment later. + NeedsMetadataAttachment |= I->hasMetadataOtherThanDebugLoc(); + + // If the instruction has a debug location, emit it. + DILocation *DL = I->getDebugLoc(); + if (!DL) + continue; + + if (DL == LastDL) { + // Just repeat the same debug loc as last time. + Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC_AGAIN, Vals); + continue; + } + + Vals.push_back(DL->getLine()); + Vals.push_back(DL->getColumn()); + Vals.push_back(VE.getMetadataOrNullID(DL->getScope())); + Vals.push_back(VE.getMetadataOrNullID(DL->getInlinedAt())); + Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC, Vals); + Vals.clear(); + + // Fixme(pirama): The following line is missing from upstream + // https://llvm.org/bugs/show_bug.cgi?id=23436 + LastDL = DL; + } + + // Emit names for all the instructions etc. + WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream); + + if (NeedsMetadataAttachment) + WriteMetadataAttachment(F, VE, Stream); + VE.purgeFunction(); + Stream.ExitBlock(); +} + +// Emit blockinfo, which defines the standard abbreviations etc. +static void WriteBlockInfo(const llvm_2_9_func::ValueEnumerator &VE, + BitstreamWriter &Stream) { + // We only want to emit block info records for blocks that have multiple + // instances: CONSTANTS_BLOCK, FUNCTION_BLOCK and VALUE_SYMTAB_BLOCK. Other + // blocks can defined their abbrevs inline. + Stream.EnterBlockInfoBlock(2); + + { // 8-bit fixed-width VST_ENTRY/VST_BBENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_8_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // 7-bit fixed width VST_ENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_7_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // 6-bit char6 VST_ENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_6_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // 6-bit char6 VST_BBENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_BBENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_BBENTRY_6_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + + + { // SETTYPE abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_SETTYPE)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(VE.getTypes().size()+1))); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_SETTYPE_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // INTEGER abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_INTEGER)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_INTEGER_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // CE_CAST abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CE_CAST)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // cast opc + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, // typeid + Log2_32_Ceil(VE.getTypes().size()+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); // value id + + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_CE_CAST_Abbrev) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // NULL abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_NULL)); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_NULL_Abbrev) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + // FIXME: This should only use space for first class types! + + { // INST_LOAD abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_LOAD)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Ptr + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 4)); // Align + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // volatile + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_LOAD_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_BINOP abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_BINOP)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // RHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_BINOP_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_BINOP_FLAGS abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_BINOP)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // RHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); // flags + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_BINOP_FLAGS_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_CAST abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_CAST)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // OpVal + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, // dest ty + Log2_32_Ceil(VE.getTypes().size()+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_CAST_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // INST_RET abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_RET)); + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_RET_VOID_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_RET abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_RET)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // ValID + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_RET_VAL_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_UNREACHABLE abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_UNREACHABLE)); + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_UNREACHABLE_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + Stream.ExitBlock(); +} + +/// WriteModule - Emit the specified module to the bitstream. +static void WriteModule(const Module *M, BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::MODULE_BLOCK_ID, 3); + + // Emit the version number if it is non-zero. + if (CurVersion) { + SmallVector<unsigned, 1> Vals; + Vals.push_back(CurVersion); + Stream.EmitRecord(bitc::MODULE_CODE_VERSION, Vals); + } + + // Analyze the module, enumerating globals, functions, etc. + llvm_2_9_func::ValueEnumerator VE(*M); + + // Emit blockinfo, which defines the standard abbreviations etc. + WriteBlockInfo(VE, Stream); + + // Emit information about parameter attributes. + WriteAttributeTable(VE, Stream); + + // Emit information describing all of the types in the module. + WriteTypeTable(VE, Stream); + + // Emit top-level description of module, including target triple, inline asm, + // descriptors for global variables, and function prototype info. + WriteModuleInfo(M, VE, Stream); + + // Emit constants. + WriteModuleConstants(VE, Stream); + + // Emit metadata. + WriteModuleMetadata(M, VE, Stream); + + // Emit function bodies. + for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F) + if (!F->isDeclaration()) + WriteFunction(*F, VE, Stream); + + // Emit metadata. + WriteModuleMetadataStore(M, Stream); + + // Emit names for globals/functions etc. + WriteValueSymbolTable(M->getValueSymbolTable(), VE, Stream); + + Stream.ExitBlock(); +} + +/// EmitDarwinBCHeader - If generating a bc file on darwin, we have to emit a +/// header and trailer to make it compatible with the system archiver. To do +/// this we emit the following header, and then emit a trailer that pads the +/// file out to be a multiple of 16 bytes. +/// +/// struct bc_header { +/// uint32_t Magic; // 0x0B17C0DE +/// uint32_t Version; // Version, currently always 0. +/// uint32_t BitcodeOffset; // Offset to traditional bitcode file. +/// uint32_t BitcodeSize; // Size of traditional bitcode file. +/// uint32_t CPUType; // CPU specifier. +/// ... potentially more later ... +/// }; +enum { + DarwinBCSizeFieldOffset = 3*4, // Offset to bitcode_size. + DarwinBCHeaderSize = 5*4 +}; + +static void WriteInt32ToBuffer(uint32_t Value, SmallVectorImpl<char> &Buffer, + uint32_t &Position) { + Buffer[Position + 0] = (unsigned char) (Value >> 0); + Buffer[Position + 1] = (unsigned char) (Value >> 8); + Buffer[Position + 2] = (unsigned char) (Value >> 16); + Buffer[Position + 3] = (unsigned char) (Value >> 24); + Position += 4; +} + +static void EmitDarwinBCHeaderAndTrailer(SmallVectorImpl<char> &Buffer, + const Triple &TT) { + unsigned CPUType = ~0U; + + // Match x86_64-*, i[3-9]86-*, powerpc-*, powerpc64-*, arm-*, thumb-*, + // armv[0-9]-*, thumbv[0-9]-*, armv5te-*, or armv6t2-*. The CPUType is a magic + // number from /usr/include/mach/machine.h. It is ok to reproduce the + // specific constants here because they are implicitly part of the Darwin ABI. + enum { + DARWIN_CPU_ARCH_ABI64 = 0x01000000, + DARWIN_CPU_TYPE_X86 = 7, + DARWIN_CPU_TYPE_ARM = 12, + DARWIN_CPU_TYPE_POWERPC = 18 + }; + + Triple::ArchType Arch = TT.getArch(); + if (Arch == Triple::x86_64) + CPUType = DARWIN_CPU_TYPE_X86 | DARWIN_CPU_ARCH_ABI64; + else if (Arch == Triple::x86) + CPUType = DARWIN_CPU_TYPE_X86; + else if (Arch == Triple::ppc) + CPUType = DARWIN_CPU_TYPE_POWERPC; + else if (Arch == Triple::ppc64) + CPUType = DARWIN_CPU_TYPE_POWERPC | DARWIN_CPU_ARCH_ABI64; + else if (Arch == Triple::arm || Arch == Triple::thumb) + CPUType = DARWIN_CPU_TYPE_ARM; + + // Traditional Bitcode starts after header. + assert(Buffer.size() >= DarwinBCHeaderSize && + "Expected header size to be reserved"); + unsigned BCOffset = DarwinBCHeaderSize; + unsigned BCSize = Buffer.size()-DarwinBCHeaderSize; + + // Write the magic and version. + unsigned Position = 0; + WriteInt32ToBuffer(0x0B17C0DE , Buffer, Position); + WriteInt32ToBuffer(0 , Buffer, Position); // Version. + WriteInt32ToBuffer(BCOffset , Buffer, Position); + WriteInt32ToBuffer(BCSize , Buffer, Position); + WriteInt32ToBuffer(CPUType , Buffer, Position); + + // If the file is not a multiple of 16 bytes, insert dummy padding. + while (Buffer.size() & 15) + Buffer.push_back(0); +} + +/// WriteBitcodeToFile - Write the specified module to the specified output +/// stream. +void llvm_2_9_func::WriteBitcodeToFile(const Module *M, raw_ostream &Out) { + SmallVector<char, 1024> Buffer; + Buffer.reserve(256*1024); + + // If this is darwin or another generic macho target, reserve space for the + // header. + Triple TT(M->getTargetTriple()); + if (TT.isOSDarwin()) + Buffer.insert(Buffer.begin(), DarwinBCHeaderSize, 0); + + // Emit the module into the buffer. + { + BitstreamWriter Stream(Buffer); + + // Emit the file header. + Stream.Emit((unsigned)'B', 8); + Stream.Emit((unsigned)'C', 8); + Stream.Emit(0x0, 4); + Stream.Emit(0xC, 4); + Stream.Emit(0xE, 4); + Stream.Emit(0xD, 4); + + // Emit the module. + WriteModule(M, Stream); + } + + if (TT.isOSDarwin()) + EmitDarwinBCHeaderAndTrailer(Buffer, TT); + + // Write the generated bitstream to "Out". + Out.write((char*)&Buffer.front(), Buffer.size()); +}
diff --git a/slang/BitWriter_2_9_func/BitcodeWriterPass.cpp b/slang/BitWriter_2_9_func/BitcodeWriterPass.cpp new file mode 100644 index 0000000..fe807d3 --- /dev/null +++ b/slang/BitWriter_2_9_func/BitcodeWriterPass.cpp
@@ -0,0 +1,46 @@ +//===--- Bitcode/Writer/BitcodeWriterPass.cpp - Bitcode Writer ------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// BitcodeWriterPass implementation. +// +//===----------------------------------------------------------------------===// + +#include "ReaderWriter_2_9_func.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/Pass.h" +using namespace llvm; + +namespace { + class WriteBitcodePass : public ModulePass { + raw_ostream &OS; // raw_ostream to print on + + public: + static char ID; // Pass identification, replacement for typeid + explicit WriteBitcodePass(raw_ostream &o) + : ModulePass(ID), OS(o) {} + + const char *getPassName() const { return "Bitcode Writer"; } + + bool runOnModule(Module &M) { + bool Changed = false; + llvm_2_9_func::WriteBitcodeToFile(&M, OS); + return Changed; + } + }; +} + +char WriteBitcodePass::ID = 0; + +/// createBitcodeWriterPass - Create and return a pass that writes the module +/// to the specified ostream. +llvm::ModulePass *llvm_2_9_func::createBitcodeWriterPass(llvm::raw_ostream &Str) { + return new WriteBitcodePass(Str); +}
diff --git a/slang/BitWriter_2_9_func/ReaderWriter_2_9_func.h b/slang/BitWriter_2_9_func/ReaderWriter_2_9_func.h new file mode 100644 index 0000000..24ecc49 --- /dev/null +++ b/slang/BitWriter_2_9_func/ReaderWriter_2_9_func.h
@@ -0,0 +1,143 @@ +//===-- llvm/Bitcode/ReaderWriter.h - Bitcode reader/writers ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This header defines interfaces to read and write LLVM bitcode files/streams. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_BITCODE_2_9_FUNC_H +#define LLVM_BITCODE_2_9_FUNC_H + +#include <string> + +namespace llvm { + class Module; + class MemoryBuffer; + class ModulePass; + class BitstreamWriter; + class LLVMContext; + class raw_ostream; +} // End llvm namespace + +namespace llvm_2_9_func { + /// getLazyBitcodeModule - Read the header of the specified bitcode buffer + /// and prepare for lazy deserialization of function bodies. If successful, + /// this takes ownership of 'buffer' and returns a non-null pointer. On + /// error, this returns null, *does not* take ownership of Buffer, and fills + /// in *ErrMsg with an error description if ErrMsg is non-null. + llvm::Module *getLazyBitcodeModule(llvm::MemoryBuffer *Buffer, + llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// getBitcodeTargetTriple - Read the header of the specified bitcode + /// buffer and extract just the triple information. If successful, + /// this returns a string and *does not* take ownership + /// of 'buffer'. On error, this returns "", and fills in *ErrMsg + /// if ErrMsg is non-null. + std::string getBitcodeTargetTriple(llvm::MemoryBuffer *Buffer, + llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// ParseBitcodeFile - Read the specified bitcode file, returning the module. + /// If an error occurs, this returns null and fills in *ErrMsg if it is + /// non-null. This method *never* takes ownership of Buffer. + llvm::Module *ParseBitcodeFile(llvm::MemoryBuffer *Buffer, llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// WriteBitcodeToFile - Write the specified module to the specified + /// raw output stream. For streams where it matters, the given stream + /// should be in "binary" mode. + void WriteBitcodeToFile(const llvm::Module *M, llvm::raw_ostream &Out); + + /// createBitcodeWriterPass - Create and return a pass that writes the module + /// to the specified ostream. + llvm::ModulePass *createBitcodeWriterPass(llvm::raw_ostream &Str); + + + /// isBitcodeWrapper - Return true if the given bytes are the magic bytes + /// for an LLVM IR bitcode wrapper. + /// + static inline bool isBitcodeWrapper(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + // See if you can find the hidden message in the magic bytes :-). + // (Hint: it's a little-endian encoding.) + return BufPtr != BufEnd && + BufPtr[0] == 0xDE && + BufPtr[1] == 0xC0 && + BufPtr[2] == 0x17 && + BufPtr[3] == 0x0B; + } + + /// isRawBitcode - Return true if the given bytes are the magic bytes for + /// raw LLVM IR bitcode (without a wrapper). + /// + static inline bool isRawBitcode(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + // These bytes sort of have a hidden message, but it's not in + // little-endian this time, and it's a little redundant. + return BufPtr != BufEnd && + BufPtr[0] == 'B' && + BufPtr[1] == 'C' && + BufPtr[2] == 0xc0 && + BufPtr[3] == 0xde; + } + + /// isBitcode - Return true if the given bytes are the magic bytes for + /// LLVM IR bitcode, either with or without a wrapper. + /// + static bool inline isBitcode(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + return isBitcodeWrapper(BufPtr, BufEnd) || + isRawBitcode(BufPtr, BufEnd); + } + + /// SkipBitcodeWrapperHeader - Some systems wrap bc files with a special + /// header for padding or other reasons. The format of this header is: + /// + /// struct bc_header { + /// uint32_t Magic; // 0x0B17C0DE + /// uint32_t Version; // Version, currently always 0. + /// uint32_t BitcodeOffset; // Offset to traditional bitcode file. + /// uint32_t BitcodeSize; // Size of traditional bitcode file. + /// ... potentially other gunk ... + /// }; + /// + /// This function is called when we find a file with a matching magic number. + /// In this case, skip down to the subsection of the file that is actually a + /// BC file. + static inline bool SkipBitcodeWrapperHeader(unsigned char *&BufPtr, + unsigned char *&BufEnd) { + enum { + KnownHeaderSize = 4*4, // Size of header we read. + OffsetField = 2*4, // Offset in bytes to Offset field. + SizeField = 3*4 // Offset in bytes to Size field. + }; + + // Must contain the header! + if (BufEnd-BufPtr < KnownHeaderSize) return true; + + unsigned Offset = ( BufPtr[OffsetField ] | + (BufPtr[OffsetField+1] << 8) | + (BufPtr[OffsetField+2] << 16) | + (BufPtr[OffsetField+3] << 24)); + unsigned Size = ( BufPtr[SizeField ] | + (BufPtr[SizeField +1] << 8) | + (BufPtr[SizeField +2] << 16) | + (BufPtr[SizeField +3] << 24)); + + // Verify that Offset+Size fits in the file. + if (Offset+Size > unsigned(BufEnd-BufPtr)) + return true; + BufPtr += Offset; + BufEnd = BufPtr+Size; + return false; + } +} // End llvm_2_9_func namespace + +#endif
diff --git a/slang/BitWriter_2_9_func/ValueEnumerator.cpp b/slang/BitWriter_2_9_func/ValueEnumerator.cpp new file mode 100644 index 0000000..ce785da --- /dev/null +++ b/slang/BitWriter_2_9_func/ValueEnumerator.cpp
@@ -0,0 +1,546 @@ +//===-- ValueEnumerator.cpp - Number values and types for bitcode writer --===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the ValueEnumerator class. +// +//===----------------------------------------------------------------------===// + +#include "ValueEnumerator.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DebugInfoMetadata.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/ValueSymbolTable.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" +#include <algorithm> +using namespace llvm; + +namespace llvm_2_9_func { + +static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) { + return V.first->getType()->isIntOrIntVectorTy(); +} + +/// ValueEnumerator - Enumerate module-level information. +ValueEnumerator::ValueEnumerator(const llvm::Module &M) + : HasMDString(false), HasDILocation(false) { + // Enumerate the global variables. + for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) + EnumerateValue(&*I); + + // Enumerate the functions. + for (llvm::Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) { + EnumerateValue(&*I); + EnumerateAttributes(cast<Function>(I)->getAttributes()); + } + + // Enumerate the aliases. + for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); + I != E; ++I) + EnumerateValue(&*I); + + // Remember what is the cutoff between globalvalue's and other constants. + unsigned FirstConstant = Values.size(); + + // Enumerate the global variable initializers. + for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) + if (I->hasInitializer()) + EnumerateValue(I->getInitializer()); + + // Enumerate the aliasees. + for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); + I != E; ++I) + EnumerateValue(I->getAliasee()); + + // Enumerate the metadata type. + // + // TODO: Move this to ValueEnumerator::EnumerateOperandType() once bitcode + // only encodes the metadata type when it's used as a value. + EnumerateType(Type::getMetadataTy(M.getContext())); + + // Insert constants and metadata that are named at module level into the slot + // pool so that the module symbol table can refer to them... + EnumerateValueSymbolTable(M.getValueSymbolTable()); + EnumerateNamedMetadata(M); + + SmallVector<std::pair<unsigned, MDNode *>, 8> MDs; + + // Enumerate types used by function bodies and argument lists. + for (const Function &F : M) { + for (const Argument &A : F.args()) + EnumerateType(A.getType()); + + for (const BasicBlock &BB : F) + for (const Instruction &I : BB) { + for (const Use &Op : I.operands()) { + auto *MD = dyn_cast<MetadataAsValue>(&Op); + if (!MD) { + EnumerateOperandType(Op); + continue; + } + + // Local metadata is enumerated during function-incorporation. + if (isa<LocalAsMetadata>(MD->getMetadata())) + continue; + + EnumerateMetadata(MD->getMetadata()); + } + EnumerateType(I.getType()); + if (const CallInst *CI = dyn_cast<CallInst>(&I)) + EnumerateAttributes(CI->getAttributes()); + else if (const InvokeInst *II = dyn_cast<InvokeInst>(&I)) + EnumerateAttributes(II->getAttributes()); + + // Enumerate metadata attached with this instruction. + MDs.clear(); + I.getAllMetadataOtherThanDebugLoc(MDs); + for (unsigned i = 0, e = MDs.size(); i != e; ++i) + EnumerateMetadata(MDs[i].second); + + // Don't enumerate the location directly -- it has a special record + // type -- but enumerate its operands. + if (DILocation *L = I.getDebugLoc()) + EnumerateMDNodeOperands(L); + } + } + + // Optimize constant ordering. + OptimizeConstants(FirstConstant, Values.size()); +} + +unsigned ValueEnumerator::getInstructionID(const Instruction *Inst) const { + InstructionMapType::const_iterator I = InstructionMap.find(Inst); + assert(I != InstructionMap.end() && "Instruction is not mapped!"); + return I->second; +} + +void ValueEnumerator::setInstructionID(const Instruction *I) { + InstructionMap[I] = InstructionCount++; +} + +unsigned ValueEnumerator::getValueID(const Value *V) const { + if (auto *MD = dyn_cast<MetadataAsValue>(V)) + return getMetadataID(MD->getMetadata()); + + ValueMapType::const_iterator I = ValueMap.find(V); + assert(I != ValueMap.end() && "Value not in slotcalculator!"); + return I->second-1; +} + +void ValueEnumerator::dump() const { + print(dbgs(), ValueMap, "Default"); + dbgs() << '\n'; + print(dbgs(), MDValueMap, "MetaData"); + dbgs() << '\n'; +} + +void ValueEnumerator::print(raw_ostream &OS, const ValueMapType &Map, + const char *Name) const { + + OS << "Map Name: " << Name << "\n"; + OS << "Size: " << Map.size() << "\n"; + for (ValueMapType::const_iterator I = Map.begin(), + E = Map.end(); I != E; ++I) { + + const Value *V = I->first; + if (V->hasName()) + OS << "Value: " << V->getName(); + else + OS << "Value: [null]\n"; + V->dump(); + + OS << " Uses(" << std::distance(V->use_begin(),V->use_end()) << "):"; + for (const Use &U : V->uses()) { + if (&U != &*V->use_begin()) + OS << ","; + if(U->hasName()) + OS << " " << U->getName(); + else + OS << " [null]"; + + } + OS << "\n\n"; + } +} + +void ValueEnumerator::print(llvm::raw_ostream &OS, const MetadataMapType &Map, + const char *Name) const { + + OS << "Map Name: " << Name << "\n"; + OS << "Size: " << Map.size() << "\n"; + for (auto I = Map.begin(), E = Map.end(); I != E; ++I) { + const llvm::Metadata *MD = I->first; + OS << "Metadata: slot = " << I->second << "\n"; + MD->print(OS); + } +} + + +// Optimize constant ordering. +namespace { + struct CstSortPredicate { + ValueEnumerator &VE; + explicit CstSortPredicate(ValueEnumerator &ve) : VE(ve) {} + bool operator()(const std::pair<const Value*, unsigned> &LHS, + const std::pair<const Value*, unsigned> &RHS) { + // Sort by plane. + if (LHS.first->getType() != RHS.first->getType()) + return VE.getTypeID(LHS.first->getType()) < + VE.getTypeID(RHS.first->getType()); + // Then by frequency. + return LHS.second > RHS.second; + } + }; +} + +/// OptimizeConstants - Reorder constant pool for denser encoding. +void ValueEnumerator::OptimizeConstants(unsigned CstStart, unsigned CstEnd) { + if (CstStart == CstEnd || CstStart+1 == CstEnd) return; + + CstSortPredicate P(*this); + std::stable_sort(Values.begin()+CstStart, Values.begin()+CstEnd, P); + + // Ensure that integer and vector of integer constants are at the start of the + // constant pool. This is important so that GEP structure indices come before + // gep constant exprs. + std::partition(Values.begin()+CstStart, Values.begin()+CstEnd, + isIntOrIntVectorValue); + + // Rebuild the modified portion of ValueMap. + for (; CstStart != CstEnd; ++CstStart) + ValueMap[Values[CstStart].first] = CstStart+1; +} + + +/// EnumerateValueSymbolTable - Insert all of the values in the specified symbol +/// table into the values table. +void ValueEnumerator::EnumerateValueSymbolTable(const ValueSymbolTable &VST) { + for (ValueSymbolTable::const_iterator VI = VST.begin(), VE = VST.end(); + VI != VE; ++VI) + EnumerateValue(VI->getValue()); +} + +/// EnumerateNamedMetadata - Insert all of the values referenced by +/// named metadata in the specified module. +void ValueEnumerator::EnumerateNamedMetadata(const llvm::Module &M) { + for (llvm::Module::const_named_metadata_iterator I = M.named_metadata_begin(), + E = M.named_metadata_end(); + I != E; ++I) + EnumerateNamedMDNode(&*I); +} + +void ValueEnumerator::EnumerateNamedMDNode(const NamedMDNode *MD) { + for (unsigned i = 0, e = MD->getNumOperands(); i != e; ++i) + EnumerateMetadata(MD->getOperand(i)); +} + +/// EnumerateMDNodeOperands - Enumerate all non-function-local values +/// and types referenced by the given MDNode. +void ValueEnumerator::EnumerateMDNodeOperands(const MDNode *N) { + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { + Metadata *MD = N->getOperand(i); + if (!MD) + continue; + assert(!isa<LocalAsMetadata>(MD) && "MDNodes cannot be function-local"); + EnumerateMetadata(MD); + } +} + +void ValueEnumerator::EnumerateMetadata(const llvm::Metadata *MD) { + assert( + (isa<MDNode>(MD) || isa<MDString>(MD) || isa<ConstantAsMetadata>(MD)) && + "Invalid metadata kind"); + + // Insert a dummy ID to block the co-recursive call to + // EnumerateMDNodeOperands() from re-visiting MD in a cyclic graph. + // + // Return early if there's already an ID. + if (!MDValueMap.insert(std::make_pair(MD, 0)).second) + return; + + // Visit operands first to minimize RAUW. + if (auto *N = dyn_cast<MDNode>(MD)) + EnumerateMDNodeOperands(N); + else if (auto *C = dyn_cast<ConstantAsMetadata>(MD)) + EnumerateValue(C->getValue()); + + HasMDString |= isa<MDString>(MD); + HasDILocation |= isa<DILocation>(MD); + + // Replace the dummy ID inserted above with the correct one. MDValueMap may + // have changed by inserting operands, so we need a fresh lookup here. + MDs.push_back(MD); + MDValueMap[MD] = MDs.size(); +} + +/// EnumerateFunctionLocalMetadataa - Incorporate function-local metadata +/// information reachable from the metadata. +void ValueEnumerator::EnumerateFunctionLocalMetadata( + const llvm::LocalAsMetadata *Local) { + // Check to see if it's already in! + unsigned &MDValueID = MDValueMap[Local]; + if (MDValueID) + return; + + MDs.push_back(Local); + MDValueID = MDs.size(); + + EnumerateValue(Local->getValue()); + + // Also, collect all function-local metadata for easy access. + FunctionLocalMDs.push_back(Local); +} + +void ValueEnumerator::EnumerateValue(const Value *V) { + assert(!V->getType()->isVoidTy() && "Can't insert void values!"); + assert(!isa<MetadataAsValue>(V) && "EnumerateValue doesn't handle Metadata!"); + + // Check to see if it's already in! + unsigned &ValueID = ValueMap[V]; + if (ValueID) { + // Increment use count. + Values[ValueID-1].second++; + return; + } + + // Enumerate the type of this value. + EnumerateType(V->getType()); + + if (const Constant *C = dyn_cast<Constant>(V)) { + if (isa<GlobalValue>(C)) { + // Initializers for globals are handled explicitly elsewhere. + } else if (C->getNumOperands()) { + // If a constant has operands, enumerate them. This makes sure that if a + // constant has uses (for example an array of const ints), that they are + // inserted also. + + // We prefer to enumerate them with values before we enumerate the user + // itself. This makes it more likely that we can avoid forward references + // in the reader. We know that there can be no cycles in the constants + // graph that don't go through a global variable. + for (User::const_op_iterator I = C->op_begin(), E = C->op_end(); + I != E; ++I) + if (!isa<BasicBlock>(*I)) // Don't enumerate BB operand to BlockAddress. + EnumerateValue(*I); + + // Finally, add the value. Doing this could make the ValueID reference be + // dangling, don't reuse it. + Values.push_back(std::make_pair(V, 1U)); + ValueMap[V] = Values.size(); + return; + } else if (const ConstantDataSequential *CDS = + dyn_cast<ConstantDataSequential>(C)) { + // For our legacy handling of the new ConstantDataSequential type, we + // need to enumerate the individual elements, as well as mark the + // outer constant as used. + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) + EnumerateValue(CDS->getElementAsConstant(i)); + Values.push_back(std::make_pair(V, 1U)); + ValueMap[V] = Values.size(); + return; + } + } + + // Add the value. + Values.push_back(std::make_pair(V, 1U)); + ValueID = Values.size(); +} + + +void ValueEnumerator::EnumerateType(Type *Ty) { + unsigned *TypeID = &TypeMap[Ty]; + + // We've already seen this type. + if (*TypeID) + return; + + // If it is a non-anonymous struct, mark the type as being visited so that we + // don't recursively visit it. This is safe because we allow forward + // references of these in the bitcode reader. + if (StructType *STy = dyn_cast<StructType>(Ty)) + if (!STy->isLiteral()) + *TypeID = ~0U; + + // Enumerate all of the subtypes before we enumerate this type. This ensures + // that the type will be enumerated in an order that can be directly built. + for (Type *SubTy : Ty->subtypes()) + EnumerateType(SubTy); + + // Refresh the TypeID pointer in case the table rehashed. + TypeID = &TypeMap[Ty]; + + // Check to see if we got the pointer another way. This can happen when + // enumerating recursive types that hit the base case deeper than they start. + // + // If this is actually a struct that we are treating as forward ref'able, + // then emit the definition now that all of its contents are available. + if (*TypeID && *TypeID != ~0U) + return; + + // Add this type now that its contents are all happily enumerated. + Types.push_back(Ty); + + *TypeID = Types.size(); +} + +// Enumerate the types for the specified value. If the value is a constant, +// walk through it, enumerating the types of the constant. +void ValueEnumerator::EnumerateOperandType(const Value *V) { + EnumerateType(V->getType()); + + if (auto *MD = dyn_cast<MetadataAsValue>(V)) { + assert(!isa<LocalAsMetadata>(MD->getMetadata()) && + "Function-local metadata should be left for later"); + + EnumerateMetadata(MD->getMetadata()); + return; + } + + const Constant *C = dyn_cast<Constant>(V); + if (!C) + return; + + // If this constant is already enumerated, ignore it, we know its type must + // be enumerated. + if (ValueMap.count(C)) + return; + + // This constant may have operands, make sure to enumerate the types in + // them. + for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) { + const Value *Op = C->getOperand(i); + + // Don't enumerate basic blocks here, this happens as operands to + // blockaddress. + if (isa<BasicBlock>(Op)) + continue; + + EnumerateOperandType(Op); + } +} + +void ValueEnumerator::EnumerateAttributes(AttributeSet PAL) { + if (PAL.isEmpty()) return; // null is always 0. + + // Do a lookup. + unsigned &Entry = AttributeMap[PAL]; + if (Entry == 0) { + // Never saw this before, add it. + Attribute.push_back(PAL); + Entry = Attribute.size(); + } + + // Do lookups for all attribute groups. + for (unsigned i = 0, e = PAL.getNumSlots(); i != e; ++i) { + AttributeSet AS = PAL.getSlotAttributes(i); + unsigned &Entry = AttributeGroupMap[AS]; + if (Entry == 0) { + AttributeGroups.push_back(AS); + Entry = AttributeGroups.size(); + } + } +} + +void ValueEnumerator::incorporateFunction(const Function &F) { + InstructionCount = 0; + NumModuleValues = Values.size(); + NumModuleMDs = MDs.size(); + + // Adding function arguments to the value table. + for (Function::const_arg_iterator I = F.arg_begin(), E = F.arg_end(); + I != E; ++I) + EnumerateValue(&*I); + + FirstFuncConstantID = Values.size(); + + // Add all function-level constants to the value table. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) + for (User::const_op_iterator OI = I->op_begin(), E = I->op_end(); + OI != E; ++OI) { + if ((isa<Constant>(*OI) && !isa<GlobalValue>(*OI)) || + isa<InlineAsm>(*OI)) + EnumerateValue(*OI); + } + BasicBlocks.push_back(&*BB); + ValueMap[&*BB] = BasicBlocks.size(); + } + + // Optimize the constant layout. + OptimizeConstants(FirstFuncConstantID, Values.size()); + + // Add the function's parameter attributes so they are available for use in + // the function's instruction. + EnumerateAttributes(F.getAttributes()); + + FirstInstID = Values.size(); + + SmallVector<llvm::LocalAsMetadata *, 8> FnLocalMDVector; + // Add all of the instructions. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) { + for (User::const_op_iterator OI = I->op_begin(), E = I->op_end(); + OI != E; ++OI) { + if (auto *MD = dyn_cast<llvm::MetadataAsValue>(&*OI)) + if (auto *Local = dyn_cast<LocalAsMetadata>(MD->getMetadata())) + // Enumerate metadata after the instructions they might refer to. + FnLocalMDVector.push_back(Local); + } + + if (!I->getType()->isVoidTy()) + EnumerateValue(&*I); + } + } + + // Add all of the function-local metadata. + for (unsigned i = 0, e = FnLocalMDVector.size(); i != e; ++i) + EnumerateFunctionLocalMetadata(FnLocalMDVector[i]); +} + +void ValueEnumerator::purgeFunction() { + /// Remove purged values from the ValueMap. + for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i) + ValueMap.erase(Values[i].first); + for (unsigned i = NumModuleMDs, e = MDs.size(); i != e; ++i) + MDValueMap.erase(MDs[i]); + for (unsigned i = 0, e = BasicBlocks.size(); i != e; ++i) + ValueMap.erase(BasicBlocks[i]); + + Values.resize(NumModuleValues); + MDs.resize(NumModuleMDs); + BasicBlocks.clear(); + FunctionLocalMDs.clear(); +} + +static void IncorporateFunctionInfoGlobalBBIDs(const Function *F, + DenseMap<const BasicBlock*, unsigned> &IDMap) { + unsigned Counter = 0; + for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB) + IDMap[&*BB] = ++Counter; +} + +/// getGlobalBasicBlockID - This returns the function-specific ID for the +/// specified basic block. This is relatively expensive information, so it +/// should only be used by rare constructs such as address-of-label. +unsigned ValueEnumerator::getGlobalBasicBlockID(const BasicBlock *BB) const { + unsigned &Idx = GlobalBasicBlockIDs[BB]; + if (Idx != 0) + return Idx-1; + + IncorporateFunctionInfoGlobalBBIDs(BB->getParent(), GlobalBasicBlockIDs); + return getGlobalBasicBlockID(BB); +} + +} // end llvm_2_9_func namespace
diff --git a/slang/BitWriter_2_9_func/ValueEnumerator.h b/slang/BitWriter_2_9_func/ValueEnumerator.h new file mode 100644 index 0000000..f26b986 --- /dev/null +++ b/slang/BitWriter_2_9_func/ValueEnumerator.h
@@ -0,0 +1,195 @@ +//===-- Bitcode/Writer/ValueEnumerator.h - Number values --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This class gives values and types Unique ID's. +// +//===----------------------------------------------------------------------===// + +#ifndef VALUE_ENUMERATOR_H +#define VALUE_ENUMERATOR_H + +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/IR/Attributes.h" +#include <vector> + +namespace llvm { + +class Type; +class Value; +class Instruction; +class BasicBlock; +class Function; +class Module; +class Metadata; +class LocalAsMetadata; +class MDNode; +class NamedMDNode; +class AttributeSet; +class ValueSymbolTable; +class MDSymbolTable; +class raw_ostream; + +} // end llvm namespace + +namespace llvm_2_9_func { + +class ValueEnumerator { +public: + typedef std::vector<llvm::Type*> TypeList; + + // For each value, we remember its Value* and occurrence frequency. + typedef std::vector<std::pair<const llvm::Value*, unsigned> > ValueList; +private: + typedef llvm::DenseMap<llvm::Type*, unsigned> TypeMapType; + TypeMapType TypeMap; + TypeList Types; + + typedef llvm::DenseMap<const llvm::Value*, unsigned> ValueMapType; + ValueMapType ValueMap; + ValueList Values; + + + std::vector<const llvm::Metadata *> MDs; + llvm::SmallVector<const llvm::LocalAsMetadata *, 8> FunctionLocalMDs; + typedef llvm::DenseMap<const llvm::Metadata *, unsigned> MetadataMapType; + MetadataMapType MDValueMap; + bool HasMDString; + bool HasDILocation; + + typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeGroupMapType; + AttributeGroupMapType AttributeGroupMap; + std::vector<llvm::AttributeSet> AttributeGroups; + + typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeMapType; + AttributeMapType AttributeMap; + std::vector<llvm::AttributeSet> Attribute; + + /// GlobalBasicBlockIDs - This map memoizes the basic block ID's referenced by + /// the "getGlobalBasicBlockID" method. + mutable llvm::DenseMap<const llvm::BasicBlock*, unsigned> GlobalBasicBlockIDs; + + typedef llvm::DenseMap<const llvm::Instruction*, unsigned> InstructionMapType; + InstructionMapType InstructionMap; + unsigned InstructionCount; + + /// BasicBlocks - This contains all the basic blocks for the currently + /// incorporated function. Their reverse mapping is stored in ValueMap. + std::vector<const llvm::BasicBlock*> BasicBlocks; + + /// When a function is incorporated, this is the size of the Values list + /// before incorporation. + unsigned NumModuleValues; + + /// When a function is incorporated, this is the size of the MDValues list + /// before incorporation. + unsigned NumModuleMDs; + + unsigned FirstFuncConstantID; + unsigned FirstInstID; + + ValueEnumerator(const ValueEnumerator &) = delete; + void operator=(const ValueEnumerator &) = delete; +public: + explicit ValueEnumerator(const llvm::Module &M); + + void dump() const; + void print(llvm::raw_ostream &OS, const ValueMapType &Map, const char *Name) const; + void print(llvm::raw_ostream &OS, const MetadataMapType &Map, + const char *Name) const; + + unsigned getValueID(const llvm::Value *V) const; + unsigned getMetadataID(const llvm::Metadata *MD) const { + auto ID = getMetadataOrNullID(MD); + assert(ID != 0 && "Metadata not in slotcalculator!"); + return ID - 1; + } + unsigned getMetadataOrNullID(const llvm::Metadata *MD) const { + return MDValueMap.lookup(MD); + } + + bool hasMDString() const { return HasMDString; } + bool hasDILocation() const { return HasDILocation; } + + unsigned getTypeID(llvm::Type *T) const { + TypeMapType::const_iterator I = TypeMap.find(T); + assert(I != TypeMap.end() && "Type not in ValueEnumerator!"); + return I->second-1; + } + + unsigned getInstructionID(const llvm::Instruction *I) const; + void setInstructionID(const llvm::Instruction *I); + + unsigned getAttributeID(llvm::AttributeSet PAL) const { + if (PAL.isEmpty()) return 0; // Null maps to zero. + AttributeMapType::const_iterator I = AttributeMap.find(PAL); + assert(I != AttributeMap.end() && "Attribute not in ValueEnumerator!"); + return I->second; + } + + unsigned getAttributeGroupID(llvm::AttributeSet PAL) const { + if (PAL.isEmpty()) return 0; // Null maps to zero. + AttributeGroupMapType::const_iterator I = AttributeGroupMap.find(PAL); + assert(I != AttributeGroupMap.end() && "Attribute not in ValueEnumerator!"); + return I->second; + } + + /// getFunctionConstantRange - Return the range of values that corresponds to + /// function-local constants. + void getFunctionConstantRange(unsigned &Start, unsigned &End) const { + Start = FirstFuncConstantID; + End = FirstInstID; + } + + const ValueList &getValues() const { return Values; } + const std::vector<const llvm::Metadata *> &getMDs() const { return MDs; } + const llvm::SmallVectorImpl<const llvm::LocalAsMetadata *> &getFunctionLocalMDs() const { + return FunctionLocalMDs; + } + const TypeList &getTypes() const { return Types; } + const std::vector<const llvm::BasicBlock*> &getBasicBlocks() const { + return BasicBlocks; + } + const std::vector<llvm::AttributeSet> &getAttributes() const { + return Attribute; + } + const std::vector<llvm::AttributeSet> &getAttributeGroups() const { + return AttributeGroups; + } + + /// getGlobalBasicBlockID - This returns the function-specific ID for the + /// specified basic block. This is relatively expensive information, so it + /// should only be used by rare constructs such as address-of-label. + unsigned getGlobalBasicBlockID(const llvm::BasicBlock *BB) const; + + /// incorporateFunction/purgeFunction - If you'd like to deal with a function, + /// use these two methods to get its data into the ValueEnumerator! + /// + void incorporateFunction(const llvm::Function &F); + void purgeFunction(); + +private: + void OptimizeConstants(unsigned CstStart, unsigned CstEnd); + + void EnumerateMDNodeOperands(const llvm::MDNode *N); + void EnumerateMetadata(const llvm::Metadata *MD); + void EnumerateFunctionLocalMetadata(const llvm::LocalAsMetadata *Local); + void EnumerateNamedMDNode(const llvm::NamedMDNode *NMD); + void EnumerateValue(const llvm::Value *V); + void EnumerateType(llvm::Type *T); + void EnumerateOperandType(const llvm::Value *V); + void EnumerateAttributes(llvm::AttributeSet PAL); + + void EnumerateValueSymbolTable(const llvm::ValueSymbolTable &ST); + void EnumerateNamedMetadata(const llvm::Module &M); +}; + +} // End llvm_2_9_func namespace + +#endif
diff --git a/slang/BitWriter_3_2/Android.mk b/slang/BitWriter_3_2/Android.mk new file mode 100644 index 0000000..743aeaf --- /dev/null +++ b/slang/BitWriter_3_2/Android.mk
@@ -0,0 +1,45 @@ +LOCAL_PATH:= $(call my-dir) + +LLVM_ROOT_PATH := $(LOCAL_PATH)/../../../../external/llvm +include $(LLVM_ROOT_PATH)/llvm.mk + +bitcode_writer_3_2_SRC_FILES := \ + BitcodeWriter.cpp \ + BitcodeWriterPass.cpp \ + ValueEnumerator.cpp + +# For the host +# ===================================================== +include $(CLEAR_VARS) + +LOCAL_CFLAGS += $(local_cflags_for_slang) +LOCAL_C_INCLUDES += frameworks/compile/slang + +LOCAL_SRC_FILES := $(bitcode_writer_3_2_SRC_FILES) + +LOCAL_MODULE:= libLLVMBitWriter_3_2 + +LOCAL_MODULE_HOST_OS := darwin linux windows + +include $(LLVM_HOST_BUILD_MK) +include $(LLVM_GEN_ATTRIBUTES_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_HOST_STATIC_LIBRARY) + +# For the device +# ===================================================== +include $(CLEAR_VARS) + +LOCAL_CFLAGS += $(local_cflags_for_slang) +LOCAL_C_INCLUDES += frameworks/compile/slang + +LOCAL_SRC_FILES := $(bitcode_writer_3_2_SRC_FILES) + +LOCAL_MODULE:= libLLVMBitWriter_3_2 + +include $(LLVM_DEVICE_BUILD_MK) +include $(LLVM_GEN_ATTRIBUTES_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_STATIC_LIBRARY) + +
diff --git a/slang/BitWriter_3_2/BitcodeWriter.cpp b/slang/BitWriter_3_2/BitcodeWriter.cpp new file mode 100644 index 0000000..7618198 --- /dev/null +++ b/slang/BitWriter_3_2/BitcodeWriter.cpp
@@ -0,0 +1,1876 @@ +//===--- Bitcode/Writer/BitcodeWriter.cpp - Bitcode Writer ----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Bitcode writer implementation. +// +//===----------------------------------------------------------------------===// + +#include "ReaderWriter_3_2.h" +#include "legacy_bitcode.h" +#include "ValueEnumerator.h" +#include "llvm/ADT/Triple.h" +#include "llvm/Bitcode/BitstreamWriter.h" +#include "llvm/Bitcode/LLVMBitCodes.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DebugInfoMetadata.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/InlineAsm.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/Operator.h" +#include "llvm/IR/UseListOrder.h" +#include "llvm/IR/ValueSymbolTable.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/Support/Program.h" +#include "llvm/Support/raw_ostream.h" +#include <cctype> +#include <map> +using namespace llvm; + +/// These are manifest constants used by the bitcode writer. They do not need to +/// be kept in sync with the reader, but need to be consistent within this file. +enum { + // VALUE_SYMTAB_BLOCK abbrev id's. + VST_ENTRY_8_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + VST_ENTRY_7_ABBREV, + VST_ENTRY_6_ABBREV, + VST_BBENTRY_6_ABBREV, + + // CONSTANTS_BLOCK abbrev id's. + CONSTANTS_SETTYPE_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + CONSTANTS_INTEGER_ABBREV, + CONSTANTS_CE_CAST_Abbrev, + CONSTANTS_NULL_Abbrev, + + // FUNCTION_BLOCK abbrev id's. + FUNCTION_INST_LOAD_ABBREV = bitc::FIRST_APPLICATION_ABBREV, + FUNCTION_INST_BINOP_ABBREV, + FUNCTION_INST_BINOP_FLAGS_ABBREV, + FUNCTION_INST_CAST_ABBREV, + FUNCTION_INST_RET_VOID_ABBREV, + FUNCTION_INST_RET_VAL_ABBREV, + FUNCTION_INST_UNREACHABLE_ABBREV +}; + +static unsigned GetEncodedCastOpcode(unsigned Opcode) { + switch (Opcode) { + default: llvm_unreachable("Unknown cast instruction!"); + case Instruction::Trunc : return bitc::CAST_TRUNC; + case Instruction::ZExt : return bitc::CAST_ZEXT; + case Instruction::SExt : return bitc::CAST_SEXT; + case Instruction::FPToUI : return bitc::CAST_FPTOUI; + case Instruction::FPToSI : return bitc::CAST_FPTOSI; + case Instruction::UIToFP : return bitc::CAST_UITOFP; + case Instruction::SIToFP : return bitc::CAST_SITOFP; + case Instruction::FPTrunc : return bitc::CAST_FPTRUNC; + case Instruction::FPExt : return bitc::CAST_FPEXT; + case Instruction::PtrToInt: return bitc::CAST_PTRTOINT; + case Instruction::IntToPtr: return bitc::CAST_INTTOPTR; + case Instruction::BitCast : return bitc::CAST_BITCAST; + } +} + +static unsigned GetEncodedBinaryOpcode(unsigned Opcode) { + switch (Opcode) { + default: llvm_unreachable("Unknown binary instruction!"); + case Instruction::Add: + case Instruction::FAdd: return bitc::BINOP_ADD; + case Instruction::Sub: + case Instruction::FSub: return bitc::BINOP_SUB; + case Instruction::Mul: + case Instruction::FMul: return bitc::BINOP_MUL; + case Instruction::UDiv: return bitc::BINOP_UDIV; + case Instruction::FDiv: + case Instruction::SDiv: return bitc::BINOP_SDIV; + case Instruction::URem: return bitc::BINOP_UREM; + case Instruction::FRem: + case Instruction::SRem: return bitc::BINOP_SREM; + case Instruction::Shl: return bitc::BINOP_SHL; + case Instruction::LShr: return bitc::BINOP_LSHR; + case Instruction::AShr: return bitc::BINOP_ASHR; + case Instruction::And: return bitc::BINOP_AND; + case Instruction::Or: return bitc::BINOP_OR; + case Instruction::Xor: return bitc::BINOP_XOR; + } +} + +static unsigned GetEncodedRMWOperation(AtomicRMWInst::BinOp Op) { + switch (Op) { + default: llvm_unreachable("Unknown RMW operation!"); + case AtomicRMWInst::Xchg: return bitc::RMW_XCHG; + case AtomicRMWInst::Add: return bitc::RMW_ADD; + case AtomicRMWInst::Sub: return bitc::RMW_SUB; + case AtomicRMWInst::And: return bitc::RMW_AND; + case AtomicRMWInst::Nand: return bitc::RMW_NAND; + case AtomicRMWInst::Or: return bitc::RMW_OR; + case AtomicRMWInst::Xor: return bitc::RMW_XOR; + case AtomicRMWInst::Max: return bitc::RMW_MAX; + case AtomicRMWInst::Min: return bitc::RMW_MIN; + case AtomicRMWInst::UMax: return bitc::RMW_UMAX; + case AtomicRMWInst::UMin: return bitc::RMW_UMIN; + } +} + +static unsigned GetEncodedOrdering(AtomicOrdering Ordering) { + switch (Ordering) { + case NotAtomic: return bitc::ORDERING_NOTATOMIC; + case Unordered: return bitc::ORDERING_UNORDERED; + case Monotonic: return bitc::ORDERING_MONOTONIC; + case Acquire: return bitc::ORDERING_ACQUIRE; + case Release: return bitc::ORDERING_RELEASE; + case AcquireRelease: return bitc::ORDERING_ACQREL; + case SequentiallyConsistent: return bitc::ORDERING_SEQCST; + } + llvm_unreachable("Invalid ordering"); +} + +static unsigned GetEncodedSynchScope(SynchronizationScope SynchScope) { + switch (SynchScope) { + case SingleThread: return bitc::SYNCHSCOPE_SINGLETHREAD; + case CrossThread: return bitc::SYNCHSCOPE_CROSSTHREAD; + } + llvm_unreachable("Invalid synch scope"); +} + +static void WriteStringRecord(unsigned Code, StringRef Str, + unsigned AbbrevToUse, BitstreamWriter &Stream) { + SmallVector<unsigned, 64> Vals; + + // Code: [strchar x N] + for (unsigned i = 0, e = Str.size(); i != e; ++i) { + if (AbbrevToUse && !BitCodeAbbrevOp::isChar6(Str[i])) + AbbrevToUse = 0; + Vals.push_back(Str[i]); + } + + // Emit the finished record. + Stream.EmitRecord(Code, Vals, AbbrevToUse); +} + +// Emit information about parameter attributes. +static void WriteAttributeTable(const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const std::vector<AttributeSet> &Attrs = VE.getAttributes(); + if (Attrs.empty()) return; + + Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3); + + SmallVector<uint64_t, 64> Record; + for (unsigned i = 0, e = Attrs.size(); i != e; ++i) { + const AttributeSet &A = Attrs[i]; + for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) { + Record.push_back(A.getSlotIndex(i)); + Record.push_back(encodeLLVMAttributesForBitcode(A, A.getSlotIndex(i))); + } + + // This needs to use the 3.2 entry type + Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY_OLD, Record); + Record.clear(); + } + + Stream.ExitBlock(); +} + +/// WriteTypeTable - Write out the type table for a module. +static void WriteTypeTable(const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const llvm_3_2::ValueEnumerator::TypeList &TypeList = VE.getTypes(); + + Stream.EnterSubblock(bitc::TYPE_BLOCK_ID_NEW, 4 /*count from # abbrevs */); + SmallVector<uint64_t, 64> TypeVals; + + uint64_t NumBits = Log2_32_Ceil(VE.getTypes().size()+1); + + // Abbrev for TYPE_CODE_POINTER. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_POINTER)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0 + unsigned PtrAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_FUNCTION. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_FUNCTION)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isvararg + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + + unsigned FunctionAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_STRUCT_ANON. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_ANON)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ispacked + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + + unsigned StructAnonAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_STRUCT_NAME. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_NAME)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + unsigned StructNameAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_STRUCT_NAMED. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_STRUCT_NAMED)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ispacked + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + + unsigned StructNamedAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for TYPE_CODE_ARRAY. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_ARRAY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); // size + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); + + unsigned ArrayAbbrev = Stream.EmitAbbrev(Abbv); + + // Emit an entry count so the reader can reserve space. + TypeVals.push_back(TypeList.size()); + Stream.EmitRecord(bitc::TYPE_CODE_NUMENTRY, TypeVals); + TypeVals.clear(); + + // Loop over all of the types, emitting each in turn. + for (unsigned i = 0, e = TypeList.size(); i != e; ++i) { + Type *T = TypeList[i]; + int AbbrevToUse = 0; + unsigned Code = 0; + + switch (T->getTypeID()) { + default: llvm_unreachable("Unknown type!"); + case Type::VoidTyID: Code = bitc::TYPE_CODE_VOID; break; + case Type::HalfTyID: Code = bitc::TYPE_CODE_HALF; break; + case Type::FloatTyID: Code = bitc::TYPE_CODE_FLOAT; break; + case Type::DoubleTyID: Code = bitc::TYPE_CODE_DOUBLE; break; + case Type::X86_FP80TyID: Code = bitc::TYPE_CODE_X86_FP80; break; + case Type::FP128TyID: Code = bitc::TYPE_CODE_FP128; break; + case Type::PPC_FP128TyID: Code = bitc::TYPE_CODE_PPC_FP128; break; + case Type::LabelTyID: Code = bitc::TYPE_CODE_LABEL; break; + case Type::MetadataTyID: Code = bitc::TYPE_CODE_METADATA; break; + case Type::X86_MMXTyID: Code = bitc::TYPE_CODE_X86_MMX; break; + case Type::IntegerTyID: + // INTEGER: [width] + Code = bitc::TYPE_CODE_INTEGER; + TypeVals.push_back(cast<IntegerType>(T)->getBitWidth()); + break; + case Type::PointerTyID: { + PointerType *PTy = cast<PointerType>(T); + // POINTER: [pointee type, address space] + Code = bitc::TYPE_CODE_POINTER; + TypeVals.push_back(VE.getTypeID(PTy->getElementType())); + unsigned AddressSpace = PTy->getAddressSpace(); + TypeVals.push_back(AddressSpace); + if (AddressSpace == 0) AbbrevToUse = PtrAbbrev; + break; + } + case Type::FunctionTyID: { + FunctionType *FT = cast<FunctionType>(T); + // FUNCTION: [isvararg, retty, paramty x N] + Code = bitc::TYPE_CODE_FUNCTION; + TypeVals.push_back(FT->isVarArg()); + TypeVals.push_back(VE.getTypeID(FT->getReturnType())); + for (unsigned i = 0, e = FT->getNumParams(); i != e; ++i) + TypeVals.push_back(VE.getTypeID(FT->getParamType(i))); + AbbrevToUse = FunctionAbbrev; + break; + } + case Type::StructTyID: { + StructType *ST = cast<StructType>(T); + // STRUCT: [ispacked, eltty x N] + TypeVals.push_back(ST->isPacked()); + // Output all of the element types. + for (StructType::element_iterator I = ST->element_begin(), + E = ST->element_end(); I != E; ++I) + TypeVals.push_back(VE.getTypeID(*I)); + + if (ST->isLiteral()) { + Code = bitc::TYPE_CODE_STRUCT_ANON; + AbbrevToUse = StructAnonAbbrev; + } else { + if (ST->isOpaque()) { + Code = bitc::TYPE_CODE_OPAQUE; + } else { + Code = bitc::TYPE_CODE_STRUCT_NAMED; + AbbrevToUse = StructNamedAbbrev; + } + + // Emit the name if it is present. + if (!ST->getName().empty()) + WriteStringRecord(bitc::TYPE_CODE_STRUCT_NAME, ST->getName(), + StructNameAbbrev, Stream); + } + break; + } + case Type::ArrayTyID: { + ArrayType *AT = cast<ArrayType>(T); + // ARRAY: [numelts, eltty] + Code = bitc::TYPE_CODE_ARRAY; + TypeVals.push_back(AT->getNumElements()); + TypeVals.push_back(VE.getTypeID(AT->getElementType())); + AbbrevToUse = ArrayAbbrev; + break; + } + case Type::VectorTyID: { + VectorType *VT = cast<VectorType>(T); + // VECTOR [numelts, eltty] + Code = bitc::TYPE_CODE_VECTOR; + TypeVals.push_back(VT->getNumElements()); + TypeVals.push_back(VE.getTypeID(VT->getElementType())); + break; + } + } + + // Emit the finished record. + Stream.EmitRecord(Code, TypeVals, AbbrevToUse); + TypeVals.clear(); + } + + Stream.ExitBlock(); +} + +static unsigned getEncodedLinkage(const GlobalValue &GV) { + switch (GV.getLinkage()) { + case GlobalValue::ExternalLinkage: + return 0; + case GlobalValue::WeakAnyLinkage: + return 1; + case GlobalValue::AppendingLinkage: + return 2; + case GlobalValue::InternalLinkage: + return 3; + case GlobalValue::LinkOnceAnyLinkage: + return 4; + case GlobalValue::ExternalWeakLinkage: + return 7; + case GlobalValue::CommonLinkage: + return 8; + case GlobalValue::PrivateLinkage: + return 9; + case GlobalValue::WeakODRLinkage: + return 10; + case GlobalValue::LinkOnceODRLinkage: + return 11; + case GlobalValue::AvailableExternallyLinkage: + return 12; + } + llvm_unreachable("Invalid linkage"); +} + +static unsigned getEncodedVisibility(const GlobalValue &GV) { + switch (GV.getVisibility()) { + case GlobalValue::DefaultVisibility: return 0; + case GlobalValue::HiddenVisibility: return 1; + case GlobalValue::ProtectedVisibility: return 2; + } + llvm_unreachable("Invalid visibility"); +} + +static unsigned getEncodedThreadLocalMode(const GlobalVariable &GV) { + switch (GV.getThreadLocalMode()) { + case GlobalVariable::NotThreadLocal: return 0; + case GlobalVariable::GeneralDynamicTLSModel: return 1; + case GlobalVariable::LocalDynamicTLSModel: return 2; + case GlobalVariable::InitialExecTLSModel: return 3; + case GlobalVariable::LocalExecTLSModel: return 4; + } + llvm_unreachable("Invalid TLS model"); +} + +// Emit top-level description of module, including target triple, inline asm, +// descriptors for global variables, and function prototype info. +static void WriteModuleInfo(const Module *M, + const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + // Emit various pieces of data attached to a module. + if (!M->getTargetTriple().empty()) + WriteStringRecord(bitc::MODULE_CODE_TRIPLE, M->getTargetTriple(), + 0/*TODO*/, Stream); + const std::string &DL = M->getDataLayoutStr(); + if (!DL.empty()) + WriteStringRecord(bitc::MODULE_CODE_DATALAYOUT, DL, 0 /*TODO*/, Stream); + if (!M->getModuleInlineAsm().empty()) + WriteStringRecord(bitc::MODULE_CODE_ASM, M->getModuleInlineAsm(), + 0/*TODO*/, Stream); + + // Emit information about sections and GC, computing how many there are. Also + // compute the maximum alignment value. + std::map<std::string, unsigned> SectionMap; + std::map<std::string, unsigned> GCMap; + unsigned MaxAlignment = 0; + unsigned MaxGlobalType = 0; + for (const GlobalValue &GV : M->globals()) { + MaxAlignment = std::max(MaxAlignment, GV.getAlignment()); + MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV.getType())); + if (GV.hasSection()) { + // Give section names unique ID's. + unsigned &Entry = SectionMap[GV.getSection()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, GV.getSection(), + 0/*TODO*/, Stream); + Entry = SectionMap.size(); + } + } + } + for (const Function &F : *M) { + MaxAlignment = std::max(MaxAlignment, F.getAlignment()); + if (F.hasSection()) { + // Give section names unique ID's. + unsigned &Entry = SectionMap[F.getSection()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_SECTIONNAME, F.getSection(), + 0/*TODO*/, Stream); + Entry = SectionMap.size(); + } + } + if (F.hasGC()) { + // Same for GC names. + unsigned &Entry = GCMap[F.getGC()]; + if (!Entry) { + WriteStringRecord(bitc::MODULE_CODE_GCNAME, F.getGC(), + 0/*TODO*/, Stream); + Entry = GCMap.size(); + } + } + } + + // Emit abbrev for globals, now that we know # sections and max alignment. + unsigned SimpleGVarAbbrev = 0; + if (!M->global_empty()) { + // Add an abbrev for common globals with no visibility or thread localness. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::MODULE_CODE_GLOBALVAR)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(MaxGlobalType+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Constant. + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Initializer. + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // Linkage. + if (MaxAlignment == 0) // Alignment. + Abbv->Add(BitCodeAbbrevOp(0)); + else { + unsigned MaxEncAlignment = Log2_32(MaxAlignment)+1; + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(MaxEncAlignment+1))); + } + if (SectionMap.empty()) // Section. + Abbv->Add(BitCodeAbbrevOp(0)); + else + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(SectionMap.size()+1))); + // Don't bother emitting vis + thread local. + SimpleGVarAbbrev = Stream.EmitAbbrev(Abbv); + } + + // Emit the global variable information. + SmallVector<unsigned, 64> Vals; + for (const GlobalVariable &GV : M->globals()) { + unsigned AbbrevToUse = 0; + + // GLOBALVAR: [type, isconst, initid, + // linkage, alignment, section, visibility, threadlocal, + // unnamed_addr] + Vals.push_back(VE.getTypeID(GV.getType())); + Vals.push_back(GV.isConstant()); + Vals.push_back(GV.isDeclaration() ? 0 : + (VE.getValueID(GV.getInitializer()) + 1)); + Vals.push_back(getEncodedLinkage(GV)); + Vals.push_back(Log2_32(GV.getAlignment())+1); + Vals.push_back(GV.hasSection() ? SectionMap[GV.getSection()] : 0); + if (GV.isThreadLocal() || + GV.getVisibility() != GlobalValue::DefaultVisibility || + GV.hasUnnamedAddr() || GV.isExternallyInitialized()) { + Vals.push_back(getEncodedVisibility(GV)); + Vals.push_back(getEncodedThreadLocalMode(GV)); + Vals.push_back(GV.hasUnnamedAddr()); + Vals.push_back(GV.isExternallyInitialized()); + } else { + AbbrevToUse = SimpleGVarAbbrev; + } + + Stream.EmitRecord(bitc::MODULE_CODE_GLOBALVAR, Vals, AbbrevToUse); + Vals.clear(); + } + + // Emit the function proto information. + for (const Function &F : *M) { + // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment, + // section, visibility, gc, unnamed_addr] + Vals.push_back(VE.getTypeID(F.getType())); + Vals.push_back(F.getCallingConv()); + Vals.push_back(F.isDeclaration()); + Vals.push_back(getEncodedLinkage(F)); + Vals.push_back(VE.getAttributeID(F.getAttributes())); + Vals.push_back(Log2_32(F.getAlignment())+1); + Vals.push_back(F.hasSection() ? SectionMap[F.getSection()] : 0); + Vals.push_back(getEncodedVisibility(F)); + Vals.push_back(F.hasGC() ? GCMap[F.getGC()] : 0); + Vals.push_back(F.hasUnnamedAddr()); + + unsigned AbbrevToUse = 0; + Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse); + Vals.clear(); + } + + // Emit the alias information. + for (const GlobalAlias &A : M->aliases()) { + // ALIAS: [alias type, aliasee val#, linkage, visibility] + Vals.push_back(VE.getTypeID(A.getType())); + Vals.push_back(VE.getValueID(A.getAliasee())); + Vals.push_back(getEncodedLinkage(A)); + Vals.push_back(getEncodedVisibility(A)); + unsigned AbbrevToUse = 0; + Stream.EmitRecord(bitc::MODULE_CODE_ALIAS_OLD, Vals, AbbrevToUse); + Vals.clear(); + } +} + +static uint64_t GetOptimizationFlags(const Value *V) { + uint64_t Flags = 0; + + if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) { + if (OBO->hasNoSignedWrap()) + Flags |= 1 << bitc::OBO_NO_SIGNED_WRAP; + if (OBO->hasNoUnsignedWrap()) + Flags |= 1 << bitc::OBO_NO_UNSIGNED_WRAP; + } else if (const auto *PEO = dyn_cast<PossiblyExactOperator>(V)) { + if (PEO->isExact()) + Flags |= 1 << bitc::PEO_EXACT; + } else if (const auto *FPMO = dyn_cast<FPMathOperator>(V)) { + // FIXME(srhines): We don't handle fast math in llvm-rs-cc today. + if (false) { + if (FPMO->hasUnsafeAlgebra()) + Flags |= FastMathFlags::UnsafeAlgebra; + if (FPMO->hasNoNaNs()) + Flags |= FastMathFlags::NoNaNs; + if (FPMO->hasNoInfs()) + Flags |= FastMathFlags::NoInfs; + if (FPMO->hasNoSignedZeros()) + Flags |= FastMathFlags::NoSignedZeros; + if (FPMO->hasAllowReciprocal()) + Flags |= FastMathFlags::AllowReciprocal; + } + } + + return Flags; +} + +static void WriteValueAsMetadata(const ValueAsMetadata *MD, + const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record) { + // Mimic an MDNode with a value as one operand. + Value *V = MD->getValue(); + Record.push_back(VE.getTypeID(V->getType())); + Record.push_back(VE.getValueID(V)); + Stream.EmitRecord(bitc::METADATA_OLD_NODE, Record, 0); + Record.clear(); +} + +static void WriteMDTuple(const MDTuple *N, const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, unsigned Abbrev) { + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { + Metadata *MD = N->getOperand(i); + assert(!(MD && isa<LocalAsMetadata>(MD)) && + "Unexpected function-local metadata"); + if (!MD) { + // TODO(srhines): I don't believe this case can exist for RS. + Record.push_back(VE.getTypeID(llvm::Type::getVoidTy(N->getContext()))); + Record.push_back(0); + } else if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MD)) { + Record.push_back(VE.getTypeID(MDC->getType())); + Record.push_back(VE.getValueID(MDC->getValue())); + } else { + Record.push_back(VE.getTypeID( + llvm::Type::getMetadataTy(N->getContext()))); + Record.push_back(VE.getMetadataID(MD)); + } + } + Stream.EmitRecord(bitc::METADATA_OLD_NODE, Record, Abbrev); + Record.clear(); +} + +/*static void WriteMDLocation(const MDLocation *N, const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, + unsigned Abbrev) { + Record.push_back(N->isDistinct()); + Record.push_back(N->getLine()); + Record.push_back(N->getColumn()); + Record.push_back(VE.getMetadataID(N->getScope())); + Record.push_back(VE.getMetadataOrNullID(N->getInlinedAt())); + + Stream.EmitRecord(bitc::METADATA_LOCATION, Record, Abbrev); + Record.clear(); +} + +static void WriteGenericDebugNode(const GenericDebugNode *, + const llvm_3_2::ValueEnumerator &, BitstreamWriter &, + SmallVectorImpl<uint64_t> &, unsigned) { + llvm_unreachable("unimplemented"); +}*/ + +static void WriteModuleMetadata(const Module *M, + const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const auto &MDs = VE.getMDs(); + if (MDs.empty() && M->named_metadata_empty()) + return; + + // RenderScript files *ALWAYS* have metadata! + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + + unsigned MDSAbbrev = 0; + if (VE.hasMDString()) { + // Abbrev for METADATA_STRING. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_STRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + MDSAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned MDLocationAbbrev = 0; + if (VE.hasDILocation()) { + // TODO(srhines): Should be unreachable for RenderScript. + // Abbrev for METADATA_LOCATION. + // + // Assume the column is usually under 128, and always output the inlined-at + // location (it's never more expensive than building an array size 1). + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_LOCATION)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); + MDLocationAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned NameAbbrev = 0; + if (!M->named_metadata_empty()) { + // Abbrev for METADATA_NAME. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_NAME)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + NameAbbrev = Stream.EmitAbbrev(Abbv); + } + + unsigned MDTupleAbbrev = 0; + //unsigned GenericDebugNodeAbbrev = 0; + SmallVector<uint64_t, 64> Record; + for (const Metadata *MD : MDs) { + if (const MDNode *N = dyn_cast<MDNode>(MD)) { + switch (N->getMetadataID()) { + default: + llvm_unreachable("Invalid MDNode subclass"); +#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) +#define HANDLE_MDNODE_LEAF(CLASS) \ + case Metadata::CLASS##Kind: \ + Write##CLASS(cast<CLASS>(N), VE, Stream, Record, CLASS##Abbrev); \ + continue; +#include "llvm/IR/Metadata.def" + } + } + if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MD)) { + WriteValueAsMetadata(MDC, VE, Stream, Record); + continue; + } + const MDString *MDS = cast<MDString>(MD); + // Code: [strchar x N] + Record.append(MDS->bytes_begin(), MDS->bytes_end()); + + // Emit the finished record. + Stream.EmitRecord(bitc::METADATA_STRING, Record, MDSAbbrev); + Record.clear(); + } + + // Write named metadata. + for (const NamedMDNode &NMD : M->named_metadata()) { + // Write name. + StringRef Str = NMD.getName(); + Record.append(Str.bytes_begin(), Str.bytes_end()); + Stream.EmitRecord(bitc::METADATA_NAME, Record, NameAbbrev); + Record.clear(); + + // Write named metadata operands. + for (const MDNode *N : NMD.operands()) + Record.push_back(VE.getMetadataID(N)); + Stream.EmitRecord(bitc::METADATA_NAMED_NODE, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteFunctionLocalMetadata(const Function &F, + const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + bool StartedMetadataBlock = false; + SmallVector<uint64_t, 64> Record; + const SmallVectorImpl<const LocalAsMetadata *> &MDs = + VE.getFunctionLocalMDs(); + for (unsigned i = 0, e = MDs.size(); i != e; ++i) { + assert(MDs[i] && "Expected valid function-local metadata"); + if (!StartedMetadataBlock) { + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + StartedMetadataBlock = true; + } + WriteValueAsMetadata(MDs[i], VE, Stream, Record); + } + + if (StartedMetadataBlock) + Stream.ExitBlock(); +} + +static void WriteMetadataAttachment(const Function &F, + const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::METADATA_ATTACHMENT_ID, 3); + + SmallVector<uint64_t, 64> Record; + + // Write metadata attachments + // METADATA_ATTACHMENT - [m x [value, [n x [id, mdnode]]] + SmallVector<std::pair<unsigned, MDNode *>, 4> MDs; + + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); + I != E; ++I) { + MDs.clear(); + I->getAllMetadataOtherThanDebugLoc(MDs); + + // If no metadata, ignore instruction. + if (MDs.empty()) continue; + + Record.push_back(VE.getInstructionID(&*I)); + + for (unsigned i = 0, e = MDs.size(); i != e; ++i) { + Record.push_back(MDs[i].first); + Record.push_back(VE.getMetadataID(MDs[i].second)); + } + Stream.EmitRecord(bitc::METADATA_ATTACHMENT, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteModuleMetadataStore(const Module *M, BitstreamWriter &Stream) { + SmallVector<uint64_t, 64> Record; + + // Write metadata kinds + // METADATA_KIND - [n x [id, name]] + SmallVector<StringRef, 4> Names; + M->getMDKindNames(Names); + + if (Names.empty()) return; + + Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); + + for (unsigned MDKindID = 0, e = Names.size(); MDKindID != e; ++MDKindID) { + Record.push_back(MDKindID); + StringRef KName = Names[MDKindID]; + Record.append(KName.begin(), KName.end()); + + Stream.EmitRecord(bitc::METADATA_KIND, Record, 0); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void emitSignedInt64(SmallVectorImpl<uint64_t> &Vals, uint64_t V) { + if ((int64_t)V >= 0) + Vals.push_back(V << 1); + else + Vals.push_back((-V << 1) | 1); +} + +static void WriteConstants(unsigned FirstVal, unsigned LastVal, + const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream, bool isGlobal) { + if (FirstVal == LastVal) return; + + Stream.EnterSubblock(bitc::CONSTANTS_BLOCK_ID, 4); + + unsigned AggregateAbbrev = 0; + unsigned String8Abbrev = 0; + unsigned CString7Abbrev = 0; + unsigned CString6Abbrev = 0; + // If this is a constant pool for the module, emit module-specific abbrevs. + if (isGlobal) { + // Abbrev for CST_CODE_AGGREGATE. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_AGGREGATE)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, Log2_32_Ceil(LastVal+1))); + AggregateAbbrev = Stream.EmitAbbrev(Abbv); + + // Abbrev for CST_CODE_STRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_STRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + String8Abbrev = Stream.EmitAbbrev(Abbv); + // Abbrev for CST_CODE_CSTRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CSTRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); + CString7Abbrev = Stream.EmitAbbrev(Abbv); + // Abbrev for CST_CODE_CSTRING. + Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CSTRING)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + CString6Abbrev = Stream.EmitAbbrev(Abbv); + } + + SmallVector<uint64_t, 64> Record; + + const llvm_3_2::ValueEnumerator::ValueList &Vals = VE.getValues(); + Type *LastTy = nullptr; + for (unsigned i = FirstVal; i != LastVal; ++i) { + const Value *V = Vals[i].first; + // If we need to switch types, do so now. + if (V->getType() != LastTy) { + LastTy = V->getType(); + Record.push_back(VE.getTypeID(LastTy)); + Stream.EmitRecord(bitc::CST_CODE_SETTYPE, Record, + CONSTANTS_SETTYPE_ABBREV); + Record.clear(); + } + + if (const InlineAsm *IA = dyn_cast<InlineAsm>(V)) { + Record.push_back(unsigned(IA->hasSideEffects()) | + unsigned(IA->isAlignStack()) << 1 | + unsigned(IA->getDialect()&1) << 2); + + // Add the asm string. + const std::string &AsmStr = IA->getAsmString(); + Record.push_back(AsmStr.size()); + for (unsigned i = 0, e = AsmStr.size(); i != e; ++i) + Record.push_back(AsmStr[i]); + + // Add the constraint string. + const std::string &ConstraintStr = IA->getConstraintString(); + Record.push_back(ConstraintStr.size()); + for (unsigned i = 0, e = ConstraintStr.size(); i != e; ++i) + Record.push_back(ConstraintStr[i]); + Stream.EmitRecord(bitc::CST_CODE_INLINEASM, Record); + Record.clear(); + continue; + } + const Constant *C = cast<Constant>(V); + unsigned Code = -1U; + unsigned AbbrevToUse = 0; + if (C->isNullValue()) { + Code = bitc::CST_CODE_NULL; + } else if (isa<UndefValue>(C)) { + Code = bitc::CST_CODE_UNDEF; + } else if (const ConstantInt *IV = dyn_cast<ConstantInt>(C)) { + if (IV->getBitWidth() <= 64) { + uint64_t V = IV->getSExtValue(); + emitSignedInt64(Record, V); + Code = bitc::CST_CODE_INTEGER; + AbbrevToUse = CONSTANTS_INTEGER_ABBREV; + } else { // Wide integers, > 64 bits in size. + // We have an arbitrary precision integer value to write whose + // bit width is > 64. However, in canonical unsigned integer + // format it is likely that the high bits are going to be zero. + // So, we only write the number of active words. + unsigned NWords = IV->getValue().getActiveWords(); + const uint64_t *RawWords = IV->getValue().getRawData(); + for (unsigned i = 0; i != NWords; ++i) { + emitSignedInt64(Record, RawWords[i]); + } + Code = bitc::CST_CODE_WIDE_INTEGER; + } + } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) { + Code = bitc::CST_CODE_FLOAT; + Type *Ty = CFP->getType(); + if (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy()) { + Record.push_back(CFP->getValueAPF().bitcastToAPInt().getZExtValue()); + } else if (Ty->isX86_FP80Ty()) { + // api needed to prevent premature destruction + // bits are not in the same order as a normal i80 APInt, compensate. + APInt api = CFP->getValueAPF().bitcastToAPInt(); + const uint64_t *p = api.getRawData(); + Record.push_back((p[1] << 48) | (p[0] >> 16)); + Record.push_back(p[0] & 0xffffLL); + } else if (Ty->isFP128Ty() || Ty->isPPC_FP128Ty()) { + APInt api = CFP->getValueAPF().bitcastToAPInt(); + const uint64_t *p = api.getRawData(); + Record.push_back(p[0]); + Record.push_back(p[1]); + } else { + assert (0 && "Unknown FP type!"); + } + } else if (isa<ConstantDataSequential>(C) && + cast<ConstantDataSequential>(C)->isString()) { + const ConstantDataSequential *Str = cast<ConstantDataSequential>(C); + // Emit constant strings specially. + unsigned NumElts = Str->getNumElements(); + // If this is a null-terminated string, use the denser CSTRING encoding. + if (Str->isCString()) { + Code = bitc::CST_CODE_CSTRING; + --NumElts; // Don't encode the null, which isn't allowed by char6. + } else { + Code = bitc::CST_CODE_STRING; + AbbrevToUse = String8Abbrev; + } + bool isCStr7 = Code == bitc::CST_CODE_CSTRING; + bool isCStrChar6 = Code == bitc::CST_CODE_CSTRING; + for (unsigned i = 0; i != NumElts; ++i) { + unsigned char V = Str->getElementAsInteger(i); + Record.push_back(V); + isCStr7 &= (V & 128) == 0; + if (isCStrChar6) + isCStrChar6 = BitCodeAbbrevOp::isChar6(V); + } + + if (isCStrChar6) + AbbrevToUse = CString6Abbrev; + else if (isCStr7) + AbbrevToUse = CString7Abbrev; + } else if (const ConstantDataSequential *CDS = + dyn_cast<ConstantDataSequential>(C)) { + Code = bitc::CST_CODE_DATA; + Type *EltTy = CDS->getType()->getElementType(); + if (isa<IntegerType>(EltTy)) { + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) + Record.push_back(CDS->getElementAsInteger(i)); + } else { + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) + Record.push_back( + CDS->getElementAsAPFloat(i).bitcastToAPInt().getLimitedValue()); + } + } else if (isa<ConstantArray>(C) || isa<ConstantStruct>(C) || + isa<ConstantVector>(C)) { + Code = bitc::CST_CODE_AGGREGATE; + for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) + Record.push_back(VE.getValueID(C->getOperand(i))); + AbbrevToUse = AggregateAbbrev; + } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { + switch (CE->getOpcode()) { + default: + if (Instruction::isCast(CE->getOpcode())) { + Code = bitc::CST_CODE_CE_CAST; + Record.push_back(GetEncodedCastOpcode(CE->getOpcode())); + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + AbbrevToUse = CONSTANTS_CE_CAST_Abbrev; + } else { + assert(CE->getNumOperands() == 2 && "Unknown constant expr!"); + Code = bitc::CST_CODE_CE_BINOP; + Record.push_back(GetEncodedBinaryOpcode(CE->getOpcode())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + uint64_t Flags = GetOptimizationFlags(CE); + if (Flags != 0) + Record.push_back(Flags); + } + break; + case Instruction::GetElementPtr: + Code = bitc::CST_CODE_CE_GEP; + if (cast<GEPOperator>(C)->isInBounds()) + Code = bitc::CST_CODE_CE_INBOUNDS_GEP; + for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) { + Record.push_back(VE.getTypeID(C->getOperand(i)->getType())); + Record.push_back(VE.getValueID(C->getOperand(i))); + } + break; + case Instruction::Select: + Code = bitc::CST_CODE_CE_SELECT; + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ExtractElement: + Code = bitc::CST_CODE_CE_EXTRACTELT; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + break; + case Instruction::InsertElement: + Code = bitc::CST_CODE_CE_INSERTELT; + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ShuffleVector: + // If the return type and argument types are the same, this is a + // standard shufflevector instruction. If the types are different, + // then the shuffle is widening or truncating the input vectors, and + // the argument type must also be encoded. + if (C->getType() == C->getOperand(0)->getType()) { + Code = bitc::CST_CODE_CE_SHUFFLEVEC; + } else { + Code = bitc::CST_CODE_CE_SHUFVEC_EX; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + } + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(VE.getValueID(C->getOperand(2))); + break; + case Instruction::ICmp: + case Instruction::FCmp: + Code = bitc::CST_CODE_CE_CMP; + Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); + Record.push_back(VE.getValueID(C->getOperand(0))); + Record.push_back(VE.getValueID(C->getOperand(1))); + Record.push_back(CE->getPredicate()); + break; + } + } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) { + Code = bitc::CST_CODE_BLOCKADDRESS; + Record.push_back(VE.getTypeID(BA->getFunction()->getType())); + Record.push_back(VE.getValueID(BA->getFunction())); + Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock())); + } else { +#ifndef NDEBUG + C->dump(); +#endif + llvm_unreachable("Unknown constant!"); + } + Stream.EmitRecord(Code, Record, AbbrevToUse); + Record.clear(); + } + + Stream.ExitBlock(); +} + +static void WriteModuleConstants(const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + const llvm_3_2::ValueEnumerator::ValueList &Vals = VE.getValues(); + + // Find the first constant to emit, which is the first non-globalvalue value. + // We know globalvalues have been emitted by WriteModuleInfo. + for (unsigned i = 0, e = Vals.size(); i != e; ++i) { + if (!isa<GlobalValue>(Vals[i].first)) { + WriteConstants(i, Vals.size(), VE, Stream, true); + return; + } + } +} + +/// PushValueAndType - The file has to encode both the value and type id for +/// many values, because we need to know what type to create for forward +/// references. However, most operands are not forward references, so this type +/// field is not needed. +/// +/// This function adds V's value ID to Vals. If the value ID is higher than the +/// instruction ID, then it is a forward reference, and it also includes the +/// type ID. +static bool PushValueAndType(const Value *V, unsigned InstID, + SmallVector<unsigned, 64> &Vals, + llvm_3_2::ValueEnumerator &VE) { + unsigned ValID = VE.getValueID(V); + Vals.push_back(ValID); + if (ValID >= InstID) { + Vals.push_back(VE.getTypeID(V->getType())); + return true; + } + return false; +} + +/// WriteInstruction - Emit an instruction to the specified stream. +static void WriteInstruction(const Instruction &I, unsigned InstID, + llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVector<unsigned, 64> &Vals) { + unsigned Code = 0; + unsigned AbbrevToUse = 0; + VE.setInstructionID(&I); + switch (I.getOpcode()) { + default: + if (Instruction::isCast(I.getOpcode())) { + Code = bitc::FUNC_CODE_INST_CAST; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_CAST_ABBREV; + Vals.push_back(VE.getTypeID(I.getType())); + Vals.push_back(GetEncodedCastOpcode(I.getOpcode())); + } else { + assert(isa<BinaryOperator>(I) && "Unknown instruction!"); + Code = bitc::FUNC_CODE_INST_BINOP; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_BINOP_ABBREV; + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(GetEncodedBinaryOpcode(I.getOpcode())); + uint64_t Flags = GetOptimizationFlags(&I); + if (Flags != 0) { + if (AbbrevToUse == FUNCTION_INST_BINOP_ABBREV) + AbbrevToUse = FUNCTION_INST_BINOP_FLAGS_ABBREV; + Vals.push_back(Flags); + } + } + break; + + case Instruction::GetElementPtr: + Code = bitc::FUNC_CODE_INST_GEP_OLD; + if (cast<GEPOperator>(&I)->isInBounds()) + Code = bitc::FUNC_CODE_INST_INBOUNDS_GEP_OLD; + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + break; + case Instruction::ExtractValue: { + Code = bitc::FUNC_CODE_INST_EXTRACTVAL; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + const ExtractValueInst *EVI = cast<ExtractValueInst>(&I); + for (const unsigned *i = EVI->idx_begin(), *e = EVI->idx_end(); i != e; ++i) + Vals.push_back(*i); + break; + } + case Instruction::InsertValue: { + Code = bitc::FUNC_CODE_INST_INSERTVAL; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + PushValueAndType(I.getOperand(1), InstID, Vals, VE); + const InsertValueInst *IVI = cast<InsertValueInst>(&I); + for (const unsigned *i = IVI->idx_begin(), *e = IVI->idx_end(); i != e; ++i) + Vals.push_back(*i); + break; + } + case Instruction::Select: + Code = bitc::FUNC_CODE_INST_VSELECT; + PushValueAndType(I.getOperand(1), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(2))); + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + break; + case Instruction::ExtractElement: + Code = bitc::FUNC_CODE_INST_EXTRACTELT; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + break; + case Instruction::InsertElement: + Code = bitc::FUNC_CODE_INST_INSERTELT; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(VE.getValueID(I.getOperand(2))); + break; + case Instruction::ShuffleVector: + Code = bitc::FUNC_CODE_INST_SHUFFLEVEC; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(VE.getValueID(I.getOperand(2))); + break; + case Instruction::ICmp: + case Instruction::FCmp: + // compare returning Int1Ty or vector of Int1Ty + Code = bitc::FUNC_CODE_INST_CMP2; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + Vals.push_back(VE.getValueID(I.getOperand(1))); + Vals.push_back(cast<CmpInst>(I).getPredicate()); + break; + + case Instruction::Ret: + { + Code = bitc::FUNC_CODE_INST_RET; + unsigned NumOperands = I.getNumOperands(); + if (NumOperands == 0) + AbbrevToUse = FUNCTION_INST_RET_VOID_ABBREV; + else if (NumOperands == 1) { + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) + AbbrevToUse = FUNCTION_INST_RET_VAL_ABBREV; + } else { + for (unsigned i = 0, e = NumOperands; i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + } + } + break; + case Instruction::Br: + { + Code = bitc::FUNC_CODE_INST_BR; + const BranchInst &II = cast<BranchInst>(I); + Vals.push_back(VE.getValueID(II.getSuccessor(0))); + if (II.isConditional()) { + Vals.push_back(VE.getValueID(II.getSuccessor(1))); + Vals.push_back(VE.getValueID(II.getCondition())); + } + } + break; + case Instruction::Switch: + { + Code = bitc::FUNC_CODE_INST_SWITCH; + const SwitchInst &SI = cast<SwitchInst>(I); + Vals.push_back(VE.getTypeID(SI.getCondition()->getType())); + Vals.push_back(VE.getValueID(SI.getCondition())); + Vals.push_back(VE.getValueID(SI.getDefaultDest())); + for (SwitchInst::ConstCaseIt i = SI.case_begin(), e = SI.case_end(); + i != e; ++i) { + Vals.push_back(VE.getValueID(i.getCaseValue())); + Vals.push_back(VE.getValueID(i.getCaseSuccessor())); + } + } + break; + case Instruction::IndirectBr: + Code = bitc::FUNC_CODE_INST_INDIRECTBR; + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + Vals.push_back(VE.getValueID(I.getOperand(i))); + break; + + case Instruction::Invoke: { + const InvokeInst *II = cast<InvokeInst>(&I); + const Value *Callee(II->getCalledValue()); + PointerType *PTy = cast<PointerType>(Callee->getType()); + FunctionType *FTy = cast<FunctionType>(PTy->getElementType()); + Code = bitc::FUNC_CODE_INST_INVOKE; + + Vals.push_back(VE.getAttributeID(II->getAttributes())); + Vals.push_back(II->getCallingConv()); + Vals.push_back(VE.getValueID(II->getNormalDest())); + Vals.push_back(VE.getValueID(II->getUnwindDest())); + PushValueAndType(Callee, InstID, Vals, VE); + + // Emit value #'s for the fixed parameters. + for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) + Vals.push_back(VE.getValueID(I.getOperand(i))); // fixed param. + + // Emit type/value pairs for varargs params. + if (FTy->isVarArg()) { + for (unsigned i = FTy->getNumParams(), e = I.getNumOperands()-3; + i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); // vararg + } + break; + } + case Instruction::Resume: + Code = bitc::FUNC_CODE_INST_RESUME; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + break; + case Instruction::Unreachable: + Code = bitc::FUNC_CODE_INST_UNREACHABLE; + AbbrevToUse = FUNCTION_INST_UNREACHABLE_ABBREV; + break; + + case Instruction::PHI: { + const PHINode &PN = cast<PHINode>(I); + Code = bitc::FUNC_CODE_INST_PHI; + Vals.push_back(VE.getTypeID(PN.getType())); + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { + Vals.push_back(VE.getValueID(PN.getIncomingValue(i))); + Vals.push_back(VE.getValueID(PN.getIncomingBlock(i))); + } + break; + } + + case Instruction::LandingPad: { + const LandingPadInst &LP = cast<LandingPadInst>(I); + Code = bitc::FUNC_CODE_INST_LANDINGPAD_OLD; + Vals.push_back(VE.getTypeID(LP.getType())); + // TODO (rebase): is this fix enough? + // PushValueAndType(LP.getPersonalityFn(), InstID, Vals, VE); + Vals.push_back(LP.isCleanup()); + Vals.push_back(LP.getNumClauses()); + for (unsigned I = 0, E = LP.getNumClauses(); I != E; ++I) { + if (LP.isCatch(I)) + Vals.push_back(LandingPadInst::Catch); + else + Vals.push_back(LandingPadInst::Filter); + PushValueAndType(LP.getClause(I), InstID, Vals, VE); + } + break; + } + + case Instruction::Alloca: { + Code = bitc::FUNC_CODE_INST_ALLOCA; + Vals.push_back(VE.getTypeID(I.getType())); + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); + Vals.push_back(VE.getValueID(I.getOperand(0))); // size. + Vals.push_back(Log2_32(cast<AllocaInst>(I).getAlignment())+1); + break; + } + + case Instruction::Load: + if (cast<LoadInst>(I).isAtomic()) { + Code = bitc::FUNC_CODE_INST_LOADATOMIC; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); + } else { + Code = bitc::FUNC_CODE_INST_LOAD; + if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) // ptr + AbbrevToUse = FUNCTION_INST_LOAD_ABBREV; + } + Vals.push_back(Log2_32(cast<LoadInst>(I).getAlignment())+1); + Vals.push_back(cast<LoadInst>(I).isVolatile()); + if (cast<LoadInst>(I).isAtomic()) { + Vals.push_back(GetEncodedOrdering(cast<LoadInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope(cast<LoadInst>(I).getSynchScope())); + } + break; + case Instruction::Store: + if (cast<StoreInst>(I).isAtomic()) + Code = bitc::FUNC_CODE_INST_STOREATOMIC; + else + Code = bitc::FUNC_CODE_INST_STORE_OLD; + PushValueAndType(I.getOperand(1), InstID, Vals, VE); // ptrty + ptr + Vals.push_back(VE.getValueID(I.getOperand(0))); // val. + Vals.push_back(Log2_32(cast<StoreInst>(I).getAlignment())+1); + Vals.push_back(cast<StoreInst>(I).isVolatile()); + if (cast<StoreInst>(I).isAtomic()) { + Vals.push_back(GetEncodedOrdering(cast<StoreInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope(cast<StoreInst>(I).getSynchScope())); + } + break; + case Instruction::AtomicCmpXchg: + Code = bitc::FUNC_CODE_INST_CMPXCHG; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); // ptrty + ptr + Vals.push_back(VE.getValueID(I.getOperand(1))); // cmp. + Vals.push_back(VE.getValueID(I.getOperand(2))); // newval. + Vals.push_back(cast<AtomicCmpXchgInst>(I).isVolatile()); + Vals.push_back(GetEncodedOrdering( + cast<AtomicCmpXchgInst>(I).getSuccessOrdering())); + Vals.push_back(GetEncodedSynchScope( + cast<AtomicCmpXchgInst>(I).getSynchScope())); + break; + case Instruction::AtomicRMW: + Code = bitc::FUNC_CODE_INST_ATOMICRMW; + PushValueAndType(I.getOperand(0), InstID, Vals, VE); // ptrty + ptr + Vals.push_back(VE.getValueID(I.getOperand(1))); // val. + Vals.push_back(GetEncodedRMWOperation( + cast<AtomicRMWInst>(I).getOperation())); + Vals.push_back(cast<AtomicRMWInst>(I).isVolatile()); + Vals.push_back(GetEncodedOrdering(cast<AtomicRMWInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope( + cast<AtomicRMWInst>(I).getSynchScope())); + break; + case Instruction::Fence: + Code = bitc::FUNC_CODE_INST_FENCE; + Vals.push_back(GetEncodedOrdering(cast<FenceInst>(I).getOrdering())); + Vals.push_back(GetEncodedSynchScope(cast<FenceInst>(I).getSynchScope())); + break; + case Instruction::Call: { + const CallInst &CI = cast<CallInst>(I); + PointerType *PTy = cast<PointerType>(CI.getCalledValue()->getType()); + FunctionType *FTy = cast<FunctionType>(PTy->getElementType()); + + Code = bitc::FUNC_CODE_INST_CALL; + + Vals.push_back(VE.getAttributeID(CI.getAttributes())); + Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall())); + PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee + + // Emit value #'s for the fixed parameters. + for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) + Vals.push_back(VE.getValueID(CI.getArgOperand(i))); // fixed param. + + // Emit type/value pairs for varargs params. + if (FTy->isVarArg()) { + for (unsigned i = FTy->getNumParams(), e = CI.getNumArgOperands(); + i != e; ++i) + PushValueAndType(CI.getArgOperand(i), InstID, Vals, VE); // varargs + } + break; + } + case Instruction::VAArg: + Code = bitc::FUNC_CODE_INST_VAARG; + Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); // valistty + Vals.push_back(VE.getValueID(I.getOperand(0))); // valist. + Vals.push_back(VE.getTypeID(I.getType())); // restype. + break; + } + + Stream.EmitRecord(Code, Vals, AbbrevToUse); + Vals.clear(); +} + +// Emit names for globals/functions etc. +static void WriteValueSymbolTable(const ValueSymbolTable &VST, + const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + if (VST.empty()) return; + Stream.EnterSubblock(bitc::VALUE_SYMTAB_BLOCK_ID, 4); + + // FIXME: Set up the abbrev, we know how many values there are! + // FIXME: We know if the type names can use 7-bit ascii. + SmallVector<unsigned, 64> NameVals; + + for (ValueSymbolTable::const_iterator SI = VST.begin(), SE = VST.end(); + SI != SE; ++SI) { + + const ValueName &Name = *SI; + + // Figure out the encoding to use for the name. + bool is7Bit = true; + bool isChar6 = true; + for (const char *C = Name.getKeyData(), *E = C+Name.getKeyLength(); + C != E; ++C) { + if (isChar6) + isChar6 = BitCodeAbbrevOp::isChar6(*C); + if ((unsigned char)*C & 128) { + is7Bit = false; + break; // don't bother scanning the rest. + } + } + + unsigned AbbrevToUse = VST_ENTRY_8_ABBREV; + + // VST_ENTRY: [valueid, namechar x N] + // VST_BBENTRY: [bbid, namechar x N] + unsigned Code; + if (isa<BasicBlock>(SI->getValue())) { + Code = bitc::VST_CODE_BBENTRY; + if (isChar6) + AbbrevToUse = VST_BBENTRY_6_ABBREV; + } else { + Code = bitc::VST_CODE_ENTRY; + if (isChar6) + AbbrevToUse = VST_ENTRY_6_ABBREV; + else if (is7Bit) + AbbrevToUse = VST_ENTRY_7_ABBREV; + } + + NameVals.push_back(VE.getValueID(SI->getValue())); + for (const char *P = Name.getKeyData(), + *E = Name.getKeyData()+Name.getKeyLength(); P != E; ++P) + NameVals.push_back((unsigned char)*P); + + // Emit the finished record. + Stream.EmitRecord(Code, NameVals, AbbrevToUse); + NameVals.clear(); + } + Stream.ExitBlock(); +} + +static void WriteUseList(llvm_3_2::ValueEnumerator &VE, UseListOrder &&Order, + BitstreamWriter &Stream) { + assert(Order.Shuffle.size() >= 2 && "Shuffle too small"); + unsigned Code; + if (isa<BasicBlock>(Order.V)) + Code = bitc::USELIST_CODE_BB; + else + Code = bitc::USELIST_CODE_DEFAULT; + + SmallVector<uint64_t, 64> Record; + for (unsigned I : Order.Shuffle) + Record.push_back(I); + Record.push_back(VE.getValueID(Order.V)); + Stream.EmitRecord(Code, Record); +} + +static void WriteUseListBlock(const Function *F, llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + auto hasMore = [&]() { + return !VE.UseListOrders.empty() && VE.UseListOrders.back().F == F; + }; + if (!hasMore()) + // Nothing to do. + return; + + Stream.EnterSubblock(bitc::USELIST_BLOCK_ID, 3); + while (hasMore()) { + WriteUseList(VE, std::move(VE.UseListOrders.back()), Stream); + VE.UseListOrders.pop_back(); + } + Stream.ExitBlock(); +} + +/// WriteFunction - Emit a function body to the module stream. +static void WriteFunction(const Function &F, llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::FUNCTION_BLOCK_ID, 4); + VE.incorporateFunction(F); + + SmallVector<unsigned, 64> Vals; + + // Emit the number of basic blocks, so the reader can create them ahead of + // time. + Vals.push_back(VE.getBasicBlocks().size()); + Stream.EmitRecord(bitc::FUNC_CODE_DECLAREBLOCKS, Vals); + Vals.clear(); + + // If there are function-local constants, emit them now. + unsigned CstStart, CstEnd; + VE.getFunctionConstantRange(CstStart, CstEnd); + WriteConstants(CstStart, CstEnd, VE, Stream, false); + + // If there is function-local metadata, emit it now. + WriteFunctionLocalMetadata(F, VE, Stream); + + // Keep a running idea of what the instruction ID is. + unsigned InstID = CstEnd; + + bool NeedsMetadataAttachment = false; + + DILocation *LastDL = nullptr; + + // Finally, emit all the instructions, in order. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); + I != E; ++I) { + WriteInstruction(*I, InstID, VE, Stream, Vals); + + if (!I->getType()->isVoidTy()) + ++InstID; + + // If the instruction has metadata, write a metadata attachment later. + NeedsMetadataAttachment |= I->hasMetadataOtherThanDebugLoc(); + + // If the instruction has a debug location, emit it. + DILocation *DL = I->getDebugLoc(); + if (!DL) + continue; + + if (DL == LastDL) { + // Just repeat the same debug loc as last time. + Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC_AGAIN, Vals); + continue; + } + + Vals.push_back(DL->getLine()); + Vals.push_back(DL->getColumn()); + Vals.push_back(VE.getMetadataOrNullID(DL->getScope())); + Vals.push_back(VE.getMetadataOrNullID(DL->getInlinedAt())); + Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC, Vals); + Vals.clear(); + + // Fixme(pirama): The following line is missing from upstream + // https://llvm.org/bugs/show_bug.cgi?id=23436 + LastDL = DL; + } + + // Emit names for all the instructions etc. + WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream); + + if (NeedsMetadataAttachment) + WriteMetadataAttachment(F, VE, Stream); + if (false) + WriteUseListBlock(&F, VE, Stream); + VE.purgeFunction(); + Stream.ExitBlock(); +} + +// Emit blockinfo, which defines the standard abbreviations etc. +static void WriteBlockInfo(const llvm_3_2::ValueEnumerator &VE, + BitstreamWriter &Stream) { + // We only want to emit block info records for blocks that have multiple + // instances: CONSTANTS_BLOCK, FUNCTION_BLOCK and VALUE_SYMTAB_BLOCK. Other + // blocks can defined their abbrevs inline. + Stream.EnterBlockInfoBlock(2); + + { // 8-bit fixed-width VST_ENTRY/VST_BBENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_8_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // 7-bit fixed width VST_ENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_7_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // 6-bit char6 VST_ENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_ENTRY_6_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // 6-bit char6 VST_BBENTRY strings. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_BBENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Char6)); + if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, + Abbv) != VST_BBENTRY_6_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + + + { // SETTYPE abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_SETTYPE)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, + Log2_32_Ceil(VE.getTypes().size()+1))); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_SETTYPE_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // INTEGER abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_INTEGER)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_INTEGER_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // CE_CAST abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_CE_CAST)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // cast opc + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, // typeid + Log2_32_Ceil(VE.getTypes().size()+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); // value id + + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_CE_CAST_Abbrev) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // NULL abbrev for CONSTANTS_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_NULL)); + if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, + Abbv) != CONSTANTS_NULL_Abbrev) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + // FIXME: This should only use space for first class types! + + { // INST_LOAD abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_LOAD)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Ptr + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 4)); // Align + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // volatile + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_LOAD_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_BINOP abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_BINOP)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // RHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_BINOP_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_BINOP_FLAGS abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_BINOP)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // RHS + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7)); // flags + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_BINOP_FLAGS_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_CAST abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_CAST)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // OpVal + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, // dest ty + Log2_32_Ceil(VE.getTypes().size()+1))); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 4)); // opc + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_CAST_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + { // INST_RET abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_RET)); + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_RET_VOID_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_RET abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_RET)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // ValID + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_RET_VAL_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + { // INST_UNREACHABLE abbrev for FUNCTION_BLOCK. + BitCodeAbbrev *Abbv = new BitCodeAbbrev(); + Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_UNREACHABLE)); + if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, + Abbv) != FUNCTION_INST_UNREACHABLE_ABBREV) + llvm_unreachable("Unexpected abbrev ordering!"); + } + + Stream.ExitBlock(); +} + +/// WriteModule - Emit the specified module to the bitstream. +static void WriteModule(const Module *M, BitstreamWriter &Stream) { + Stream.EnterSubblock(bitc::MODULE_BLOCK_ID, 3); + + SmallVector<unsigned, 1> Vals; + // TODO(srhines): RenderScript is always version 0 for now. + unsigned CurVersion = 0; + if (CurVersion) { + Vals.push_back(CurVersion); + Stream.EmitRecord(bitc::MODULE_CODE_VERSION, Vals); + } + + // Analyze the module, enumerating globals, functions, etc. + llvm_3_2::ValueEnumerator VE(*M); + + // Emit blockinfo, which defines the standard abbreviations etc. + WriteBlockInfo(VE, Stream); + + // Emit information about parameter attributes. + WriteAttributeTable(VE, Stream); + + // Emit information describing all of the types in the module. + WriteTypeTable(VE, Stream); + + // Emit top-level description of module, including target triple, inline asm, + // descriptors for global variables, and function prototype info. + WriteModuleInfo(M, VE, Stream); + + // Emit constants. + WriteModuleConstants(VE, Stream); + + // Emit metadata. + WriteModuleMetadata(M, VE, Stream); + + // Emit metadata. + WriteModuleMetadataStore(M, Stream); + + // Emit names for globals/functions etc. + WriteValueSymbolTable(M->getValueSymbolTable(), VE, Stream); + + // Emit module-level use-lists. + if (false) + WriteUseListBlock(nullptr, VE, Stream); + + // Emit function bodies. + for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F) + if (!F->isDeclaration()) + WriteFunction(*F, VE, Stream); + + Stream.ExitBlock(); +} + +/// EmitDarwinBCHeader - If generating a bc file on darwin, we have to emit a +/// header and trailer to make it compatible with the system archiver. To do +/// this we emit the following header, and then emit a trailer that pads the +/// file out to be a multiple of 16 bytes. +/// +/// struct bc_header { +/// uint32_t Magic; // 0x0B17C0DE +/// uint32_t Version; // Version, currently always 0. +/// uint32_t BitcodeOffset; // Offset to traditional bitcode file. +/// uint32_t BitcodeSize; // Size of traditional bitcode file. +/// uint32_t CPUType; // CPU specifier. +/// ... potentially more later ... +/// }; +enum { + DarwinBCSizeFieldOffset = 3*4, // Offset to bitcode_size. + DarwinBCHeaderSize = 5*4 +}; + +static void WriteInt32ToBuffer(uint32_t Value, SmallVectorImpl<char> &Buffer, + uint32_t &Position) { + Buffer[Position + 0] = (unsigned char) (Value >> 0); + Buffer[Position + 1] = (unsigned char) (Value >> 8); + Buffer[Position + 2] = (unsigned char) (Value >> 16); + Buffer[Position + 3] = (unsigned char) (Value >> 24); + Position += 4; +} + +static void EmitDarwinBCHeaderAndTrailer(SmallVectorImpl<char> &Buffer, + const Triple &TT) { + unsigned CPUType = ~0U; + + // Match x86_64-*, i[3-9]86-*, powerpc-*, powerpc64-*, arm-*, thumb-*, + // armv[0-9]-*, thumbv[0-9]-*, armv5te-*, or armv6t2-*. The CPUType is a magic + // number from /usr/include/mach/machine.h. It is ok to reproduce the + // specific constants here because they are implicitly part of the Darwin ABI. + enum { + DARWIN_CPU_ARCH_ABI64 = 0x01000000, + DARWIN_CPU_TYPE_X86 = 7, + DARWIN_CPU_TYPE_ARM = 12, + DARWIN_CPU_TYPE_POWERPC = 18 + }; + + Triple::ArchType Arch = TT.getArch(); + if (Arch == Triple::x86_64) + CPUType = DARWIN_CPU_TYPE_X86 | DARWIN_CPU_ARCH_ABI64; + else if (Arch == Triple::x86) + CPUType = DARWIN_CPU_TYPE_X86; + else if (Arch == Triple::ppc) + CPUType = DARWIN_CPU_TYPE_POWERPC; + else if (Arch == Triple::ppc64) + CPUType = DARWIN_CPU_TYPE_POWERPC | DARWIN_CPU_ARCH_ABI64; + else if (Arch == Triple::arm || Arch == Triple::thumb) + CPUType = DARWIN_CPU_TYPE_ARM; + + // Traditional Bitcode starts after header. + assert(Buffer.size() >= DarwinBCHeaderSize && + "Expected header size to be reserved"); + unsigned BCOffset = DarwinBCHeaderSize; + unsigned BCSize = Buffer.size()-DarwinBCHeaderSize; + + // Write the magic and version. + unsigned Position = 0; + WriteInt32ToBuffer(0x0B17C0DE , Buffer, Position); + WriteInt32ToBuffer(0 , Buffer, Position); // Version. + WriteInt32ToBuffer(BCOffset , Buffer, Position); + WriteInt32ToBuffer(BCSize , Buffer, Position); + WriteInt32ToBuffer(CPUType , Buffer, Position); + + // If the file is not a multiple of 16 bytes, insert dummy padding. + while (Buffer.size() & 15) + Buffer.push_back(0); +} + +/// WriteBitcodeToFile - Write the specified module to the specified output +/// stream. +void llvm_3_2::WriteBitcodeToFile(const Module *M, raw_ostream &Out) { + SmallVector<char, 0> Buffer; + Buffer.reserve(256*1024); + + // If this is darwin or another generic macho target, reserve space for the + // header. + Triple TT(M->getTargetTriple()); + if (TT.isOSDarwin()) + Buffer.insert(Buffer.begin(), DarwinBCHeaderSize, 0); + + // Emit the module into the buffer. + { + BitstreamWriter Stream(Buffer); + + // Emit the file header. + Stream.Emit((unsigned)'B', 8); + Stream.Emit((unsigned)'C', 8); + Stream.Emit(0x0, 4); + Stream.Emit(0xC, 4); + Stream.Emit(0xE, 4); + Stream.Emit(0xD, 4); + + // Emit the module. + WriteModule(M, Stream); + } + + if (TT.isOSDarwin()) + EmitDarwinBCHeaderAndTrailer(Buffer, TT); + + // Write the generated bitstream to "Out". + Out.write((char*)&Buffer.front(), Buffer.size()); +}
diff --git a/slang/BitWriter_3_2/BitcodeWriterPass.cpp b/slang/BitWriter_3_2/BitcodeWriterPass.cpp new file mode 100644 index 0000000..cc105c9 --- /dev/null +++ b/slang/BitWriter_3_2/BitcodeWriterPass.cpp
@@ -0,0 +1,46 @@ +//===--- Bitcode/Writer/BitcodeWriterPass.cpp - Bitcode Writer ------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// BitcodeWriterPass implementation. +// +//===----------------------------------------------------------------------===// + +#include "ReaderWriter_3_2.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/Pass.h" +using namespace llvm; + +namespace { + class WriteBitcodePass : public ModulePass { + raw_ostream &OS; // raw_ostream to print on + + public: + static char ID; // Pass identification, replacement for typeid + explicit WriteBitcodePass(raw_ostream &o) + : ModulePass(ID), OS(o) {} + + const char *getPassName() const { return "Bitcode Writer"; } + + bool runOnModule(Module &M) { + bool Changed = false; + llvm_3_2::WriteBitcodeToFile(&M, OS); + return Changed; + } + }; +} + +char WriteBitcodePass::ID = 0; + +/// createBitcodeWriterPass - Create and return a pass that writes the module +/// to the specified ostream. +ModulePass *llvm_3_2::createBitcodeWriterPass(raw_ostream &Str) { + return new WriteBitcodePass(Str); +}
diff --git a/slang/BitWriter_3_2/ReaderWriter_3_2.h b/slang/BitWriter_3_2/ReaderWriter_3_2.h new file mode 100644 index 0000000..d192ad6 --- /dev/null +++ b/slang/BitWriter_3_2/ReaderWriter_3_2.h
@@ -0,0 +1,143 @@ +//===-- llvm/Bitcode/ReaderWriter.h - Bitcode reader/writers ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This header defines interfaces to read and write LLVM bitcode files/streams. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_BITCODE_3_2_H +#define LLVM_BITCODE_3_2_H + +#include <string> + +namespace llvm { + class Module; + class MemoryBuffer; + class ModulePass; + class BitstreamWriter; + class LLVMContext; + class raw_ostream; +} // End llvm namespace + +namespace llvm_3_2 { + /// getLazyBitcodeModule - Read the header of the specified bitcode buffer + /// and prepare for lazy deserialization of function bodies. If successful, + /// this takes ownership of 'buffer' and returns a non-null pointer. On + /// error, this returns null, *does not* take ownership of Buffer, and fills + /// in *ErrMsg with an error description if ErrMsg is non-null. + llvm::Module *getLazyBitcodeModule(llvm::MemoryBuffer *Buffer, + llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// getBitcodeTargetTriple - Read the header of the specified bitcode + /// buffer and extract just the triple information. If successful, + /// this returns a string and *does not* take ownership + /// of 'buffer'. On error, this returns "", and fills in *ErrMsg + /// if ErrMsg is non-null. + std::string getBitcodeTargetTriple(llvm::MemoryBuffer *Buffer, + llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// ParseBitcodeFile - Read the specified bitcode file, returning the module. + /// If an error occurs, this returns null and fills in *ErrMsg if it is + /// non-null. This method *never* takes ownership of Buffer. + llvm::Module *ParseBitcodeFile(llvm::MemoryBuffer *Buffer, llvm::LLVMContext& Context, + std::string *ErrMsg = 0); + + /// WriteBitcodeToFile - Write the specified module to the specified + /// raw output stream. For streams where it matters, the given stream + /// should be in "binary" mode. + void WriteBitcodeToFile(const llvm::Module *M, llvm::raw_ostream &Out); + + /// createBitcodeWriterPass - Create and return a pass that writes the module + /// to the specified ostream. + llvm::ModulePass *createBitcodeWriterPass(llvm::raw_ostream &Str); + + + /// isBitcodeWrapper - Return true if the given bytes are the magic bytes + /// for an LLVM IR bitcode wrapper. + /// + static inline bool isBitcodeWrapper(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + // See if you can find the hidden message in the magic bytes :-). + // (Hint: it's a little-endian encoding.) + return BufPtr != BufEnd && + BufPtr[0] == 0xDE && + BufPtr[1] == 0xC0 && + BufPtr[2] == 0x17 && + BufPtr[3] == 0x0B; + } + + /// isRawBitcode - Return true if the given bytes are the magic bytes for + /// raw LLVM IR bitcode (without a wrapper). + /// + static inline bool isRawBitcode(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + // These bytes sort of have a hidden message, but it's not in + // little-endian this time, and it's a little redundant. + return BufPtr != BufEnd && + BufPtr[0] == 'B' && + BufPtr[1] == 'C' && + BufPtr[2] == 0xc0 && + BufPtr[3] == 0xde; + } + + /// isBitcode - Return true if the given bytes are the magic bytes for + /// LLVM IR bitcode, either with or without a wrapper. + /// + static bool inline isBitcode(const unsigned char *BufPtr, + const unsigned char *BufEnd) { + return isBitcodeWrapper(BufPtr, BufEnd) || + isRawBitcode(BufPtr, BufEnd); + } + + /// SkipBitcodeWrapperHeader - Some systems wrap bc files with a special + /// header for padding or other reasons. The format of this header is: + /// + /// struct bc_header { + /// uint32_t Magic; // 0x0B17C0DE + /// uint32_t Version; // Version, currently always 0. + /// uint32_t BitcodeOffset; // Offset to traditional bitcode file. + /// uint32_t BitcodeSize; // Size of traditional bitcode file. + /// ... potentially other gunk ... + /// }; + /// + /// This function is called when we find a file with a matching magic number. + /// In this case, skip down to the subsection of the file that is actually a + /// BC file. + static inline bool SkipBitcodeWrapperHeader(unsigned char *&BufPtr, + unsigned char *&BufEnd) { + enum { + KnownHeaderSize = 4*4, // Size of header we read. + OffsetField = 2*4, // Offset in bytes to Offset field. + SizeField = 3*4 // Offset in bytes to Size field. + }; + + // Must contain the header! + if (BufEnd-BufPtr < KnownHeaderSize) return true; + + unsigned Offset = ( BufPtr[OffsetField ] | + (BufPtr[OffsetField+1] << 8) | + (BufPtr[OffsetField+2] << 16) | + (BufPtr[OffsetField+3] << 24)); + unsigned Size = ( BufPtr[SizeField ] | + (BufPtr[SizeField +1] << 8) | + (BufPtr[SizeField +2] << 16) | + (BufPtr[SizeField +3] << 24)); + + // Verify that Offset+Size fits in the file. + if (Offset+Size > unsigned(BufEnd-BufPtr)) + return true; + BufPtr += Offset; + BufEnd = BufPtr+Size; + return false; + } +} // End llvm_3_2 namespace + +#endif
diff --git a/slang/BitWriter_3_2/ValueEnumerator.cpp b/slang/BitWriter_3_2/ValueEnumerator.cpp new file mode 100644 index 0000000..4ce2ec6 --- /dev/null +++ b/slang/BitWriter_3_2/ValueEnumerator.cpp
@@ -0,0 +1,546 @@ +//===-- ValueEnumerator.cpp - Number values and types for bitcode writer --===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the ValueEnumerator class. +// +//===----------------------------------------------------------------------===// + +#include "ValueEnumerator.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DebugInfoMetadata.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/ValueSymbolTable.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" +#include <algorithm> +using namespace llvm; + +namespace llvm_3_2 { + +static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) { + return V.first->getType()->isIntOrIntVectorTy(); +} + +/// ValueEnumerator - Enumerate module-level information. +ValueEnumerator::ValueEnumerator(const llvm::Module &M) + : HasMDString(false), HasDILocation(false) { + // Enumerate the global variables. + for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) + EnumerateValue(&*I); + + // Enumerate the functions. + for (llvm::Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) { + EnumerateValue(&*I); + EnumerateAttributes(cast<Function>(I)->getAttributes()); + } + + // Enumerate the aliases. + for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); + I != E; ++I) + EnumerateValue(&*I); + + // Remember what is the cutoff between globalvalue's and other constants. + unsigned FirstConstant = Values.size(); + + // Enumerate the global variable initializers. + for (llvm::Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) + if (I->hasInitializer()) + EnumerateValue(I->getInitializer()); + + // Enumerate the aliasees. + for (llvm::Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end(); + I != E; ++I) + EnumerateValue(I->getAliasee()); + + // Enumerate the metadata type. + // + // TODO: Move this to ValueEnumerator::EnumerateOperandType() once bitcode + // only encodes the metadata type when it's used as a value. + EnumerateType(Type::getMetadataTy(M.getContext())); + + // Insert constants and metadata that are named at module level into the slot + // pool so that the module symbol table can refer to them... + EnumerateValueSymbolTable(M.getValueSymbolTable()); + EnumerateNamedMetadata(M); + + SmallVector<std::pair<unsigned, MDNode *>, 8> MDs; + + // Enumerate types used by function bodies and argument lists. + for (const Function &F : M) { + for (const Argument &A : F.args()) + EnumerateType(A.getType()); + + for (const BasicBlock &BB : F) + for (const Instruction &I : BB) { + for (const Use &Op : I.operands()) { + auto *MD = dyn_cast<MetadataAsValue>(&Op); + if (!MD) { + EnumerateOperandType(Op); + continue; + } + + // Local metadata is enumerated during function-incorporation. + if (isa<LocalAsMetadata>(MD->getMetadata())) + continue; + + EnumerateMetadata(MD->getMetadata()); + } + EnumerateType(I.getType()); + if (const CallInst *CI = dyn_cast<CallInst>(&I)) + EnumerateAttributes(CI->getAttributes()); + else if (const InvokeInst *II = dyn_cast<InvokeInst>(&I)) + EnumerateAttributes(II->getAttributes()); + + // Enumerate metadata attached with this instruction. + MDs.clear(); + I.getAllMetadataOtherThanDebugLoc(MDs); + for (unsigned i = 0, e = MDs.size(); i != e; ++i) + EnumerateMetadata(MDs[i].second); + + // Don't enumerate the location directly -- it has a special record + // type -- but enumerate its operands. + if (DILocation *L = I.getDebugLoc()) + EnumerateMDNodeOperands(L); + } + } + + // Optimize constant ordering. + OptimizeConstants(FirstConstant, Values.size()); +} + +unsigned ValueEnumerator::getInstructionID(const Instruction *Inst) const { + InstructionMapType::const_iterator I = InstructionMap.find(Inst); + assert(I != InstructionMap.end() && "Instruction is not mapped!"); + return I->second; +} + +void ValueEnumerator::setInstructionID(const Instruction *I) { + InstructionMap[I] = InstructionCount++; +} + +unsigned ValueEnumerator::getValueID(const Value *V) const { + if (auto *MD = dyn_cast<MetadataAsValue>(V)) + return getMetadataID(MD->getMetadata()); + + ValueMapType::const_iterator I = ValueMap.find(V); + assert(I != ValueMap.end() && "Value not in slotcalculator!"); + return I->second-1; +} + +void ValueEnumerator::dump() const { + print(dbgs(), ValueMap, "Default"); + dbgs() << '\n'; + print(dbgs(), MDValueMap, "MetaData"); + dbgs() << '\n'; +} + +void ValueEnumerator::print(raw_ostream &OS, const ValueMapType &Map, + const char *Name) const { + + OS << "Map Name: " << Name << "\n"; + OS << "Size: " << Map.size() << "\n"; + for (ValueMapType::const_iterator I = Map.begin(), + E = Map.end(); I != E; ++I) { + + const Value *V = I->first; + if (V->hasName()) + OS << "Value: " << V->getName(); + else + OS << "Value: [null]\n"; + V->dump(); + + OS << " Uses(" << std::distance(V->use_begin(),V->use_end()) << "):"; + for (const Use &U : V->uses()) { + if (&U != &*V->use_begin()) + OS << ","; + if(U->hasName()) + OS << " " << U->getName(); + else + OS << " [null]"; + + } + OS << "\n\n"; + } +} + +void ValueEnumerator::print(llvm::raw_ostream &OS, const MetadataMapType &Map, + const char *Name) const { + + OS << "Map Name: " << Name << "\n"; + OS << "Size: " << Map.size() << "\n"; + for (auto I = Map.begin(), E = Map.end(); I != E; ++I) { + const llvm::Metadata *MD = I->first; + OS << "Metadata: slot = " << I->second << "\n"; + MD->print(OS); + } +} + + +// Optimize constant ordering. +namespace { + struct CstSortPredicate { + ValueEnumerator &VE; + explicit CstSortPredicate(ValueEnumerator &ve) : VE(ve) {} + bool operator()(const std::pair<const Value*, unsigned> &LHS, + const std::pair<const Value*, unsigned> &RHS) { + // Sort by plane. + if (LHS.first->getType() != RHS.first->getType()) + return VE.getTypeID(LHS.first->getType()) < + VE.getTypeID(RHS.first->getType()); + // Then by frequency. + return LHS.second > RHS.second; + } + }; +} + +/// OptimizeConstants - Reorder constant pool for denser encoding. +void ValueEnumerator::OptimizeConstants(unsigned CstStart, unsigned CstEnd) { + if (CstStart == CstEnd || CstStart+1 == CstEnd) return; + + CstSortPredicate P(*this); + std::stable_sort(Values.begin()+CstStart, Values.begin()+CstEnd, P); + + // Ensure that integer and vector of integer constants are at the start of the + // constant pool. This is important so that GEP structure indices come before + // gep constant exprs. + std::partition(Values.begin()+CstStart, Values.begin()+CstEnd, + isIntOrIntVectorValue); + + // Rebuild the modified portion of ValueMap. + for (; CstStart != CstEnd; ++CstStart) + ValueMap[Values[CstStart].first] = CstStart+1; +} + + +/// EnumerateValueSymbolTable - Insert all of the values in the specified symbol +/// table into the values table. +void ValueEnumerator::EnumerateValueSymbolTable(const ValueSymbolTable &VST) { + for (ValueSymbolTable::const_iterator VI = VST.begin(), VE = VST.end(); + VI != VE; ++VI) + EnumerateValue(VI->getValue()); +} + +/// EnumerateNamedMetadata - Insert all of the values referenced by +/// named metadata in the specified module. +void ValueEnumerator::EnumerateNamedMetadata(const llvm::Module &M) { + for (llvm::Module::const_named_metadata_iterator I = M.named_metadata_begin(), + E = M.named_metadata_end(); + I != E; ++I) + EnumerateNamedMDNode(&*I); +} + +void ValueEnumerator::EnumerateNamedMDNode(const NamedMDNode *MD) { + for (unsigned i = 0, e = MD->getNumOperands(); i != e; ++i) + EnumerateMetadata(MD->getOperand(i)); +} + +/// EnumerateMDNodeOperands - Enumerate all non-function-local values +/// and types referenced by the given MDNode. +void ValueEnumerator::EnumerateMDNodeOperands(const MDNode *N) { + for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { + Metadata *MD = N->getOperand(i); + if (!MD) + continue; + assert(!isa<LocalAsMetadata>(MD) && "MDNodes cannot be function-local"); + EnumerateMetadata(MD); + } +} + +void ValueEnumerator::EnumerateMetadata(const llvm::Metadata *MD) { + assert( + (isa<MDNode>(MD) || isa<MDString>(MD) || isa<ConstantAsMetadata>(MD)) && + "Invalid metadata kind"); + + // Insert a dummy ID to block the co-recursive call to + // EnumerateMDNodeOperands() from re-visiting MD in a cyclic graph. + // + // Return early if there's already an ID. + if (!MDValueMap.insert(std::make_pair(MD, 0)).second) + return; + + // Visit operands first to minimize RAUW. + if (auto *N = dyn_cast<MDNode>(MD)) + EnumerateMDNodeOperands(N); + else if (auto *C = dyn_cast<ConstantAsMetadata>(MD)) + EnumerateValue(C->getValue()); + + HasMDString |= isa<MDString>(MD); + HasDILocation |= isa<DILocation>(MD); + + // Replace the dummy ID inserted above with the correct one. MDValueMap may + // have changed by inserting operands, so we need a fresh lookup here. + MDs.push_back(MD); + MDValueMap[MD] = MDs.size(); +} + +/// EnumerateFunctionLocalMetadataa - Incorporate function-local metadata +/// information reachable from the metadata. +void ValueEnumerator::EnumerateFunctionLocalMetadata( + const llvm::LocalAsMetadata *Local) { + // Check to see if it's already in! + unsigned &MDValueID = MDValueMap[Local]; + if (MDValueID) + return; + + MDs.push_back(Local); + MDValueID = MDs.size(); + + EnumerateValue(Local->getValue()); + + // Also, collect all function-local metadata for easy access. + FunctionLocalMDs.push_back(Local); +} + +void ValueEnumerator::EnumerateValue(const Value *V) { + assert(!V->getType()->isVoidTy() && "Can't insert void values!"); + assert(!isa<MetadataAsValue>(V) && "EnumerateValue doesn't handle Metadata!"); + + // Check to see if it's already in! + unsigned &ValueID = ValueMap[V]; + if (ValueID) { + // Increment use count. + Values[ValueID-1].second++; + return; + } + + // Enumerate the type of this value. + EnumerateType(V->getType()); + + if (const Constant *C = dyn_cast<Constant>(V)) { + if (isa<GlobalValue>(C)) { + // Initializers for globals are handled explicitly elsewhere. + } else if (C->getNumOperands()) { + // If a constant has operands, enumerate them. This makes sure that if a + // constant has uses (for example an array of const ints), that they are + // inserted also. + + // We prefer to enumerate them with values before we enumerate the user + // itself. This makes it more likely that we can avoid forward references + // in the reader. We know that there can be no cycles in the constants + // graph that don't go through a global variable. + for (User::const_op_iterator I = C->op_begin(), E = C->op_end(); + I != E; ++I) + if (!isa<BasicBlock>(*I)) // Don't enumerate BB operand to BlockAddress. + EnumerateValue(*I); + + // Finally, add the value. Doing this could make the ValueID reference be + // dangling, don't reuse it. + Values.push_back(std::make_pair(V, 1U)); + ValueMap[V] = Values.size(); + return; + } else if (const ConstantDataSequential *CDS = + dyn_cast<ConstantDataSequential>(C)) { + // For our legacy handling of the new ConstantDataSequential type, we + // need to enumerate the individual elements, as well as mark the + // outer constant as used. + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) + EnumerateValue(CDS->getElementAsConstant(i)); + Values.push_back(std::make_pair(V, 1U)); + ValueMap[V] = Values.size(); + return; + } + } + + // Add the value. + Values.push_back(std::make_pair(V, 1U)); + ValueID = Values.size(); +} + + +void ValueEnumerator::EnumerateType(Type *Ty) { + unsigned *TypeID = &TypeMap[Ty]; + + // We've already seen this type. + if (*TypeID) + return; + + // If it is a non-anonymous struct, mark the type as being visited so that we + // don't recursively visit it. This is safe because we allow forward + // references of these in the bitcode reader. + if (StructType *STy = dyn_cast<StructType>(Ty)) + if (!STy->isLiteral()) + *TypeID = ~0U; + + // Enumerate all of the subtypes before we enumerate this type. This ensures + // that the type will be enumerated in an order that can be directly built. + for (Type *SubTy : Ty->subtypes()) + EnumerateType(SubTy); + + // Refresh the TypeID pointer in case the table rehashed. + TypeID = &TypeMap[Ty]; + + // Check to see if we got the pointer another way. This can happen when + // enumerating recursive types that hit the base case deeper than they start. + // + // If this is actually a struct that we are treating as forward ref'able, + // then emit the definition now that all of its contents are available. + if (*TypeID && *TypeID != ~0U) + return; + + // Add this type now that its contents are all happily enumerated. + Types.push_back(Ty); + + *TypeID = Types.size(); +} + +// Enumerate the types for the specified value. If the value is a constant, +// walk through it, enumerating the types of the constant. +void ValueEnumerator::EnumerateOperandType(const Value *V) { + EnumerateType(V->getType()); + + if (auto *MD = dyn_cast<MetadataAsValue>(V)) { + assert(!isa<LocalAsMetadata>(MD->getMetadata()) && + "Function-local metadata should be left for later"); + + EnumerateMetadata(MD->getMetadata()); + return; + } + + const Constant *C = dyn_cast<Constant>(V); + if (!C) + return; + + // If this constant is already enumerated, ignore it, we know its type must + // be enumerated. + if (ValueMap.count(C)) + return; + + // This constant may have operands, make sure to enumerate the types in + // them. + for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) { + const Value *Op = C->getOperand(i); + + // Don't enumerate basic blocks here, this happens as operands to + // blockaddress. + if (isa<BasicBlock>(Op)) + continue; + + EnumerateOperandType(Op); + } +} + +void ValueEnumerator::EnumerateAttributes(AttributeSet PAL) { + if (PAL.isEmpty()) return; // null is always 0. + + // Do a lookup. + unsigned &Entry = AttributeMap[PAL]; + if (Entry == 0) { + // Never saw this before, add it. + Attribute.push_back(PAL); + Entry = Attribute.size(); + } + + // Do lookups for all attribute groups. + for (unsigned i = 0, e = PAL.getNumSlots(); i != e; ++i) { + AttributeSet AS = PAL.getSlotAttributes(i); + unsigned &Entry = AttributeGroupMap[AS]; + if (Entry == 0) { + AttributeGroups.push_back(AS); + Entry = AttributeGroups.size(); + } + } +} + +void ValueEnumerator::incorporateFunction(const Function &F) { + InstructionCount = 0; + NumModuleValues = Values.size(); + NumModuleMDs = MDs.size(); + + // Adding function arguments to the value table. + for (Function::const_arg_iterator I = F.arg_begin(), E = F.arg_end(); + I != E; ++I) + EnumerateValue(&*I); + + FirstFuncConstantID = Values.size(); + + // Add all function-level constants to the value table. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) + for (User::const_op_iterator OI = I->op_begin(), E = I->op_end(); + OI != E; ++OI) { + if ((isa<Constant>(*OI) && !isa<GlobalValue>(*OI)) || + isa<InlineAsm>(*OI)) + EnumerateValue(*OI); + } + BasicBlocks.push_back(&*BB); + ValueMap[&*BB] = BasicBlocks.size(); + } + + // Optimize the constant layout. + OptimizeConstants(FirstFuncConstantID, Values.size()); + + // Add the function's parameter attributes so they are available for use in + // the function's instruction. + EnumerateAttributes(F.getAttributes()); + + FirstInstID = Values.size(); + + SmallVector<llvm::LocalAsMetadata *, 8> FnLocalMDVector; + // Add all of the instructions. + for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { + for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) { + for (User::const_op_iterator OI = I->op_begin(), E = I->op_end(); + OI != E; ++OI) { + if (auto *MD = dyn_cast<llvm::MetadataAsValue>(&*OI)) + if (auto *Local = dyn_cast<LocalAsMetadata>(MD->getMetadata())) + // Enumerate metadata after the instructions they might refer to. + FnLocalMDVector.push_back(Local); + } + + if (!I->getType()->isVoidTy()) + EnumerateValue(&*I); + } + } + + // Add all of the function-local metadata. + for (unsigned i = 0, e = FnLocalMDVector.size(); i != e; ++i) + EnumerateFunctionLocalMetadata(FnLocalMDVector[i]); +} + +void ValueEnumerator::purgeFunction() { + /// Remove purged values from the ValueMap. + for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i) + ValueMap.erase(Values[i].first); + for (unsigned i = NumModuleMDs, e = MDs.size(); i != e; ++i) + MDValueMap.erase(MDs[i]); + for (unsigned i = 0, e = BasicBlocks.size(); i != e; ++i) + ValueMap.erase(BasicBlocks[i]); + + Values.resize(NumModuleValues); + MDs.resize(NumModuleMDs); + BasicBlocks.clear(); + FunctionLocalMDs.clear(); +} + +static void IncorporateFunctionInfoGlobalBBIDs(const Function *F, + DenseMap<const BasicBlock*, unsigned> &IDMap) { + unsigned Counter = 0; + for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB) + IDMap[&*BB] = ++Counter; +} + +/// getGlobalBasicBlockID - This returns the function-specific ID for the +/// specified basic block. This is relatively expensive information, so it +/// should only be used by rare constructs such as address-of-label. +unsigned ValueEnumerator::getGlobalBasicBlockID(const BasicBlock *BB) const { + unsigned &Idx = GlobalBasicBlockIDs[BB]; + if (Idx != 0) + return Idx-1; + + IncorporateFunctionInfoGlobalBBIDs(BB->getParent(), GlobalBasicBlockIDs); + return getGlobalBasicBlockID(BB); +} + +} // end llvm_3_2 namespace
diff --git a/slang/BitWriter_3_2/ValueEnumerator.h b/slang/BitWriter_3_2/ValueEnumerator.h new file mode 100644 index 0000000..124272f --- /dev/null +++ b/slang/BitWriter_3_2/ValueEnumerator.h
@@ -0,0 +1,198 @@ +//===-- Bitcode/Writer/ValueEnumerator.h - Number values --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This class gives values and types Unique ID's. +// +//===----------------------------------------------------------------------===// + +#ifndef VALUE_ENUMERATOR_H +#define VALUE_ENUMERATOR_H + +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/IR/Attributes.h" +#include "llvm/IR/UseListOrder.h" +#include <vector> + +namespace llvm { + +class Type; +class Value; +class Instruction; +class BasicBlock; +class Function; +class Module; +class Metadata; +class LocalAsMetadata; +class MDNode; +class NamedMDNode; +class AttributeSet; +class ValueSymbolTable; +class MDSymbolTable; +class raw_ostream; + +} // end llvm namespace + +namespace llvm_3_2 { + +class ValueEnumerator { +public: + typedef std::vector<llvm::Type*> TypeList; + + // For each value, we remember its Value* and occurrence frequency. + typedef std::vector<std::pair<const llvm::Value*, unsigned> > ValueList; + + llvm::UseListOrderStack UseListOrders; +private: + typedef llvm::DenseMap<llvm::Type*, unsigned> TypeMapType; + TypeMapType TypeMap; + TypeList Types; + + typedef llvm::DenseMap<const llvm::Value*, unsigned> ValueMapType; + ValueMapType ValueMap; + ValueList Values; + + + std::vector<const llvm::Metadata *> MDs; + llvm::SmallVector<const llvm::LocalAsMetadata *, 8> FunctionLocalMDs; + typedef llvm::DenseMap<const llvm::Metadata *, unsigned> MetadataMapType; + MetadataMapType MDValueMap; + bool HasMDString; + bool HasDILocation; + + typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeGroupMapType; + AttributeGroupMapType AttributeGroupMap; + std::vector<llvm::AttributeSet> AttributeGroups; + + typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeMapType; + AttributeMapType AttributeMap; + std::vector<llvm::AttributeSet> Attribute; + + /// GlobalBasicBlockIDs - This map memoizes the basic block ID's referenced by + /// the "getGlobalBasicBlockID" method. + mutable llvm::DenseMap<const llvm::BasicBlock*, unsigned> GlobalBasicBlockIDs; + + typedef llvm::DenseMap<const llvm::Instruction*, unsigned> InstructionMapType; + InstructionMapType InstructionMap; + unsigned InstructionCount; + + /// BasicBlocks - This contains all the basic blocks for the currently + /// incorporated function. Their reverse mapping is stored in ValueMap. + std::vector<const llvm::BasicBlock*> BasicBlocks; + + /// When a function is incorporated, this is the size of the Values list + /// before incorporation. + unsigned NumModuleValues; + + /// When a function is incorporated, this is the size of the MDValues list + /// before incorporation. + unsigned NumModuleMDs; + + unsigned FirstFuncConstantID; + unsigned FirstInstID; + + ValueEnumerator(const ValueEnumerator &) = delete; + void operator=(const ValueEnumerator &) = delete; +public: + explicit ValueEnumerator(const llvm::Module &M); + + void dump() const; + void print(llvm::raw_ostream &OS, const ValueMapType &Map, const char *Name) const; + void print(llvm::raw_ostream &OS, const MetadataMapType &Map, + const char *Name) const; + + unsigned getValueID(const llvm::Value *V) const; + unsigned getMetadataID(const llvm::Metadata *MD) const { + auto ID = getMetadataOrNullID(MD); + assert(ID != 0 && "Metadata not in slotcalculator!"); + return ID - 1; + } + unsigned getMetadataOrNullID(const llvm::Metadata *MD) const { + return MDValueMap.lookup(MD); + } + + bool hasMDString() const { return HasMDString; } + bool hasDILocation() const { return HasDILocation; } + + unsigned getTypeID(llvm::Type *T) const { + TypeMapType::const_iterator I = TypeMap.find(T); + assert(I != TypeMap.end() && "Type not in ValueEnumerator!"); + return I->second-1; + } + + unsigned getInstructionID(const llvm::Instruction *I) const; + void setInstructionID(const llvm::Instruction *I); + + unsigned getAttributeID(llvm::AttributeSet PAL) const { + if (PAL.isEmpty()) return 0; // Null maps to zero. + AttributeMapType::const_iterator I = AttributeMap.find(PAL); + assert(I != AttributeMap.end() && "Attribute not in ValueEnumerator!"); + return I->second; + } + + unsigned getAttributeGroupID(llvm::AttributeSet PAL) const { + if (PAL.isEmpty()) return 0; // Null maps to zero. + AttributeGroupMapType::const_iterator I = AttributeGroupMap.find(PAL); + assert(I != AttributeGroupMap.end() && "Attribute not in ValueEnumerator!"); + return I->second; + } + + /// getFunctionConstantRange - Return the range of values that corresponds to + /// function-local constants. + void getFunctionConstantRange(unsigned &Start, unsigned &End) const { + Start = FirstFuncConstantID; + End = FirstInstID; + } + + const ValueList &getValues() const { return Values; } + const std::vector<const llvm::Metadata *> &getMDs() const { return MDs; } + const llvm::SmallVectorImpl<const llvm::LocalAsMetadata *> &getFunctionLocalMDs() const { + return FunctionLocalMDs; + } + const TypeList &getTypes() const { return Types; } + const std::vector<const llvm::BasicBlock*> &getBasicBlocks() const { + return BasicBlocks; + } + const std::vector<llvm::AttributeSet> &getAttributes() const { + return Attribute; + } + const std::vector<llvm::AttributeSet> &getAttributeGroups() const { + return AttributeGroups; + } + + /// getGlobalBasicBlockID - This returns the function-specific ID for the + /// specified basic block. This is relatively expensive information, so it + /// should only be used by rare constructs such as address-of-label. + unsigned getGlobalBasicBlockID(const llvm::BasicBlock *BB) const; + + /// incorporateFunction/purgeFunction - If you'd like to deal with a function, + /// use these two methods to get its data into the ValueEnumerator! + /// + void incorporateFunction(const llvm::Function &F); + void purgeFunction(); + +private: + void OptimizeConstants(unsigned CstStart, unsigned CstEnd); + + void EnumerateMDNodeOperands(const llvm::MDNode *N); + void EnumerateMetadata(const llvm::Metadata *MD); + void EnumerateFunctionLocalMetadata(const llvm::LocalAsMetadata *Local); + void EnumerateNamedMDNode(const llvm::NamedMDNode *NMD); + void EnumerateValue(const llvm::Value *V); + void EnumerateType(llvm::Type *T); + void EnumerateOperandType(const llvm::Value *V); + void EnumerateAttributes(llvm::AttributeSet PAL); + + void EnumerateValueSymbolTable(const llvm::ValueSymbolTable &ST); + void EnumerateNamedMetadata(const llvm::Module &M); +}; + +} // End llvm_3_2 namespace + +#endif
diff --git a/slang/MODULE_LICENSE_APACHE2 b/slang/MODULE_LICENSE_APACHE2 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/MODULE_LICENSE_APACHE2
diff --git a/slang/NOTICE b/slang/NOTICE new file mode 100644 index 0000000..485fde9 --- /dev/null +++ b/slang/NOTICE
@@ -0,0 +1,339 @@ +========================= +NOTICE file for slang.git +========================= + + Copyright (c) 2005-2011, The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + + +=========================================== +NOTICE file for external/clang (clang.git). +Note: libclang*.a are statically linked. +=========================================== + +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2007-2011 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +<none yet> + + + +========================================= +NOTICE file for external/llvm (llvm.git). +Note: libLLVM*.a are statically linked. +========================================= + +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2011 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +Autoconf llvm/autoconf + llvm/projects/ModuleMaker/autoconf + llvm/projects/sample/autoconf +CellSPU backend llvm/lib/Target/CellSPU/README.txt +Google Test llvm/utils/unittest/googletest +OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex}
diff --git a/slang/README.html b/slang/README.html new file mode 100644 index 0000000..4ace7c6 --- /dev/null +++ b/slang/README.html
@@ -0,0 +1,626 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" /> +<title>llvm-rs-cc: Compiler for Renderscript language</title> +<style type="text/css"> + +/* +:Author: David Goodger (goodger@python.org) +:Id: $Id: html4css1.css 5951 2009-05-18 18:03:10Z milde $ +:Copyright: This stylesheet has been placed in the public domain. + +Default cascading style sheet for the HTML output of Docutils. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. +*/ + +/* used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0 } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 ! important } + +.first { + /* Override more specific margin styles with "! important". */ + margin-top: 0 ! important } + +.last, .with-subtitle { + margin-bottom: 0 ! important } + +.hidden { + display: none } + +a.toc-backref { + text-decoration: none ; + color: black } + +blockquote.epigraph { + margin: 2em 5em ; } + +dl.docutils dd { + margin-bottom: 0.5em } + +/* Uncomment (and remove this text!) to get bold-faced definition list terms +dl.docutils dt { + font-weight: bold } +*/ + +div.abstract { + margin: 2em 5em } + +div.abstract p.topic-title { + font-weight: bold ; + text-align: center } + +div.admonition, div.attention, div.caution, div.danger, div.error, +div.hint, div.important, div.note, div.tip, div.warning { + margin: 2em ; + border: medium outset ; + padding: 1em } + +div.admonition p.admonition-title, div.hint p.admonition-title, +div.important p.admonition-title, div.note p.admonition-title, +div.tip p.admonition-title { + font-weight: bold ; + font-family: sans-serif } + +div.attention p.admonition-title, div.caution p.admonition-title, +div.danger p.admonition-title, div.error p.admonition-title, +div.warning p.admonition-title { + color: red ; + font-weight: bold ; + font-family: sans-serif } + +/* Uncomment (and remove this text!) to get reduced vertical space in + compound paragraphs. +div.compound .compound-first, div.compound .compound-middle { + margin-bottom: 0.5em } + +div.compound .compound-last, div.compound .compound-middle { + margin-top: 0.5em } +*/ + +div.dedication { + margin: 2em 5em ; + text-align: center ; + font-style: italic } + +div.dedication p.topic-title { + font-weight: bold ; + font-style: normal } + +div.figure { + margin-left: 2em ; + margin-right: 2em } + +div.footer, div.header { + clear: both; + font-size: smaller } + +div.line-block { + display: block ; + margin-top: 1em ; + margin-bottom: 1em } + +div.line-block div.line-block { + margin-top: 0 ; + margin-bottom: 0 ; + margin-left: 1.5em } + +div.sidebar { + margin: 0 0 0.5em 1em ; + border: medium outset ; + padding: 1em ; + background-color: #ffffee ; + width: 40% ; + float: right ; + clear: right } + +div.sidebar p.rubric { + font-family: sans-serif ; + font-size: medium } + +div.system-messages { + margin: 5em } + +div.system-messages h1 { + color: red } + +div.system-message { + border: medium outset ; + padding: 1em } + +div.system-message p.system-message-title { + color: red ; + font-weight: bold } + +div.topic { + margin: 2em } + +h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, +h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { + margin-top: 0.4em } + +h1.title { + text-align: center } + +h2.subtitle { + text-align: center } + +hr.docutils { + width: 75% } + +img.align-left, .figure.align-left{ + clear: left ; + float: left ; + margin-right: 1em } + +img.align-right, .figure.align-right { + clear: right ; + float: right ; + margin-left: 1em } + +.align-left { + text-align: left } + +.align-center { + clear: both ; + text-align: center } + +.align-right { + text-align: right } + +/* reset inner alignment in figures */ +div.align-right { + text-align: left } + +/* div.align-center * { */ +/* text-align: left } */ + +ol.simple, ul.simple { + margin-bottom: 1em } + +ol.arabic { + list-style: decimal } + +ol.loweralpha { + list-style: lower-alpha } + +ol.upperalpha { + list-style: upper-alpha } + +ol.lowerroman { + list-style: lower-roman } + +ol.upperroman { + list-style: upper-roman } + +p.attribution { + text-align: right ; + margin-left: 50% } + +p.caption { + font-style: italic } + +p.credits { + font-style: italic ; + font-size: smaller } + +p.label { + white-space: nowrap } + +p.rubric { + font-weight: bold ; + font-size: larger ; + color: maroon ; + text-align: center } + +p.sidebar-title { + font-family: sans-serif ; + font-weight: bold ; + font-size: larger } + +p.sidebar-subtitle { + font-family: sans-serif ; + font-weight: bold } + +p.topic-title { + font-weight: bold } + +pre.address { + margin-bottom: 0 ; + margin-top: 0 ; + font: inherit } + +pre.literal-block, pre.doctest-block { + margin-left: 2em ; + margin-right: 2em } + +span.classifier { + font-family: sans-serif ; + font-style: oblique } + +span.classifier-delimiter { + font-family: sans-serif ; + font-weight: bold } + +span.interpreted { + font-family: sans-serif } + +span.option { + white-space: nowrap } + +span.pre { + white-space: pre } + +span.problematic { + color: red } + +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80% } + +table.citation { + border-left: solid 1px gray; + margin-left: 1px } + +table.docinfo { + margin: 2em 4em } + +table.docutils { + margin-top: 0.5em ; + margin-bottom: 0.5em } + +table.footnote { + border-left: solid 1px black; + margin-left: 1px } + +table.docutils td, table.docutils th, +table.docinfo td, table.docinfo th { + padding-left: 0.5em ; + padding-right: 0.5em ; + vertical-align: top } + +table.docutils th.field-name, table.docinfo th.docinfo-name { + font-weight: bold ; + text-align: left ; + white-space: nowrap ; + padding-left: 0 } + +h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, +h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { + font-size: 100% } + +ul.auto-toc { + list-style-type: none } + +</style> +</head> +<body> +<div class="document" id="llvm-rs-cc-compiler-for-renderscript-language"> +<h1 class="title">llvm-rs-cc: Compiler for Renderscript language</h1> + +<div class="section" id="introduction"> +<h1>Introduction</h1> +<p>llvm-rs-cc compiles a program in the Renderscript language to generate the +following files:</p> +<ul class="simple"> +<li>Bitcode file. Note that the bitcode here denotes the LLVM (Low-Level +Virtual Machine) bitcode representation, which will be consumed on +an Android device by libbcc (in +platform/frameworks/compile/libbcc.git) to generate device-specific +executables.</li> +<li>Reflected APIs for Java. As a result, Android's Java developers can +invoke those APIs from their code.</li> +</ul> +<p>Note that although Renderscript is C99-like, we enhance it with several +distinct, effective features for Android programming. We will use +some examples to illustrate these features.</p> +<p>llvm-rs-cc is run on the host and performs many aggressive optimizations. +As a result, libbcc on the device can be lightweight and focus on +machine-dependent code generation for some input bitcode.</p> +<p>llvm-rs-cc is a driver on top of libslang. The architecture of +libslang and libbcc is depicted in the following figure:</p> +<pre class="literal-block"> +libslang libbcc + | \ | + | \ | + clang llvm +</pre> +</div> +<div class="section" id="usage"> +<h1>Usage</h1> +<ul> +<li><p class="first"><em>-o $(PRIVATE_RS_OUTPUT_DIR)/res/raw</em></p> +<p>This option specifies the directory for outputting a .bc file.</p> +</li> +<li><p class="first"><em>-p $(PRIVATE_RS_OUTPUT_DIR)/src</em></p> +<p>The option <em>-p</em> denotes the directory for outputting the reflected Java files.</p> +</li> +<li><p class="first"><em>-d $(PRIVATE_RS_OUTPUT_DIR)</em></p> +<p>This option <em>-d</em> sets the directory for writing dependence information.</p> +</li> +<li><p class="first"><em>-MD</em></p> +<p>Note that <em>-MD</em> will tell llvm-rs-cc to output dependence information.</p> +</li> +<li><p class="first"><em>-a $(EXTRA_TARGETS)</em></p> +<p>Specifies additional target dependencies.</p> +</li> +</ul> +</div> +<div class="section" id="example-command"> +<h1>Example Command</h1> +<p>First:</p> +<pre class="literal-block"> +$ cd <Android_Root_Directory> +</pre> +<p>Using frameworks/base/tests/RenderScriptTests/Fountain as a simple app in both +Java and Renderscript, we can find the following command line in the build +log:</p> +<pre class="literal-block"> +$ out/host/linux-x86/bin/llvm-rs-cc \ + -o out/target/common/obj/APPS/Fountain_intermediates/src/renderscript/res/raw \ + -p out/target/common/obj/APPS/Fountain_intermediates/src/renderscript/src \ + -d out/target/common/obj/APPS/Fountain_intermediates/src/renderscript \ + -a out/target/common/obj/APPS/Fountain_intermediates/src/RenderScript.stamp \ + -MD \ + -I frameworks/base/libs/rs/scriptc \ + -I external/clang/lib/Headers \ + frameworks/base/libs/rs/java/Fountain/src/com/android/fountain/fountain.rs +</pre> +<p>This command will generate:</p> +<ul class="simple"> +<li><strong>fountain.bc</strong></li> +<li><strong>ScriptC_fountain.java</strong></li> +<li><strong>ScriptField_Point.java</strong></li> +</ul> +<p>The <strong>Script*.java</strong> files above will be documented below.</p> +</div> +<div class="section" id="example-program-fountain-rs"> +<h1>Example Program: fountain.rs</h1> +<p>fountain.rs is in the Renderscript language, which is based on the standard +C99. However, llvm-rs-cc goes beyond "clang -std=c99" and provides the +following important features:</p> +</div> +<div class="section" id="pragma"> +<h1>1. Pragma</h1> +<ul> +<li><p class="first"><em>#pragma rs java_package_name([PACKAGE_NAME])</em></p> +<p>The ScriptC_[SCRIPT_NAME].java has to be packaged so that Java +developers can invoke those APIs.</p> +<p>To do that, a Renderscript programmer should specify the package name, so +that llvm-rs-cc knows the package expression and hence the directory +for outputting ScriptC_[SCRIPT_NAME].java.</p> +<p>In fountain.rs, we have:</p> +<pre class="literal-block"> +#pragma rs java_package_name(com.android.fountain) +</pre> +<p>In ScriptC_fountain.java, we have:</p> +<pre class="literal-block"> +package com.android.fountain +</pre> +<p>Note that the ScriptC_fountain.java will be generated inside +./com/android/fountain/.</p> +</li> +<li><p class="first">#pragma version(1)</p> +<p>This pragma is for evolving the language. Currently we are at +version 1 of the language.</p> +</li> +</ul> +</div> +<div class="section" id="basic-reflection-export-variables-and-functions"> +<h1>2. Basic Reflection: Export Variables and Functions</h1> +<p>llvm-rs-cc automatically exports the "externalizable and defined" functions and +variables to Android's Java side. That is, scripts are accessible from +Java.</p> +<p>For instance, for:</p> +<pre class="literal-block"> +int foo = 0; +</pre> +<p>In ScriptC_fountain.java, llvm-rs-cc will reflect the following methods:</p> +<pre class="literal-block"> +void set_foo(int v)... + +int get_foo()... +</pre> +<p>This access takes the form of generated classes which provide access +to the functions and global variables within a script. In summary, +global variables and functions within a script that are not declared +static will generate get, set, or invoke methods. This provides a way +to set the data within a script and call its functions.</p> +<p>Take the addParticles function in fountain.rs as an example:</p> +<pre class="literal-block"> +void addParticles(int rate, float x, float y, int index, bool newColor) { + ... +} +</pre> +<p>llvm-rs-cc will genearte ScriptC_fountain.java as follows:</p> +<pre class="literal-block"> +void invoke_addParticles(int rate, float x, float y, + int index, bool newColor) { + ... +} +</pre> +</div> +<div class="section" id="export-user-defined-structs"> +<h1>3. Export User-Defined Structs</h1> +<p>In fountain.rs, we have:</p> +<pre class="literal-block"> +typedef struct __attribute__((packed, aligned(4))) Point { + float2 delta; + float2 position; + uchar4 color; +} Point_t; + +Point_t *point; +</pre> +<p>llvm-rs-cc generates one ScriptField*.java file for each user-defined +struct. In this case, llvm-rs-cc will reflect two files, +ScriptC_fountain.java and ScriptField_Point.java.</p> +<p>Note that when the type of an exportable variable is a structure, Renderscript +developers should avoid using anonymous structs. This is because llvm-rs-cc +uses the struct name to identify the file, instead of the typedef name.</p> +<p>For the generated Java files, using ScriptC_fountain.java as an +example we also have:</p> +<pre class="literal-block"> +void bind_point(ScriptField_Point v) +</pre> +<p>This binds your object with the allocated memory.</p> +<p>You can bind the struct(e.g., Point), using the setter and getter +methods in ScriptField_Point.java.</p> +<p>After binding, you can access the object with this method:</p> +<pre class="literal-block"> +ScriptField_Point get_point() +</pre> +<p>In ScriptField_Point_s.java:</p> +<pre class="literal-block"> +... +// Copying the Item, which is the object that stores every +// fields of struct, to the *index*\-th entry of byte array. +// +// In general, this method would not be invoked directly +// but is used to implement the setter. +void copyToArray(Item i, int index) + +// The setter of Item array, +// index: the index of the Item array +// copyNow: If true, it will be copied to the *index*\-th entry +// of byte array. +void set(Item i, int index, boolean copyNow) + +// The getter of Item array, which gets the *index*-th element +// of byte array. +Item get(int index) + +set_delta(int index, Float2 v, boolean copyNow) + +// The following is the individual setters and getters of +// each field of a struct. +public void set_delta(int index, Float2 v, boolean copyNow) +public void set_position(int index, Float2 v, boolean copyNow) +public void set_color(int index, Short4 v, boolean copyNow) +public Float2 get_delta(int index) +public Float2 get_position(int index) +public Short4 get_color(int index) + +// Copying all Item array to byte array (i.e., memory allocation). +void copyAll() +... +</pre> +</div> +<div class="section" id="summary-of-the-java-reflection-above"> +<h1>4. Summary of the Java Reflection above</h1> +<p>This section summarizes the high-level design of Renderscript's reflection.</p> +<ul> +<li><p class="first">In terms of a script's global functions, they can be called from Java. +These calls operate asynchronously and no assumptions should be made +on whether a function called will have actually completed operation. If it +is necessary to wait for a function to complete, the Java application +may call the runtime finish() method, which will wait for all the script +threads to complete pending operations. A few special functions can also +exist:</p> +<ul> +<li><p class="first">The function <strong>init</strong> (if present) will be called once after the script +is loaded. This is useful to initialize data or anything else the +script may need before it can be used. The init function may not depend +on globals initialized from Java as it will be called before these +can be initialized. The function signature for init must be:</p> +<pre class="literal-block"> +void init(void); +</pre> +</li> +<li><p class="first">The function <strong>root</strong> is a special function for graphics. This function +will be called when a script must redraw its contents. No +assumptions should be made as to when this function will be +called. It will only be called if the script is bound as a graphics root. +Calls to this function will be synchronized with data updates and +other invocations from Java. Thus the script will not change due +to external influence in the middle of running <strong>root</strong>. The return value +indicates to the runtime when the function should be called again to +redraw in the future. A return value of 0 indicates that no +redraw is necessary until something changes on the Java side. Any +positive integer indicates a time in milliseconds that the runtime should +wait before calling root again to render another frame. The function +signature for a graphics root functions is as follows:</p> +<pre class="literal-block"> +int root(void); +</pre> +</li> +<li><p class="first">It is also possible to create a purely compute-based <strong>root</strong> function. +Such a function has the following signature:</p> +<pre class="literal-block"> +void root(const T1 *in, T2 *out, const T3 *usrData, uint32_t x, uint32_t y); +</pre> +<p>T1, T2, and T3 represent any supported Renderscript type. Any parameters +above can be omitted, although at least one of in/out must be present. +If both in and out are present, root must only be invoked with types of +the same exact dimensionality (i.e. matching X and Y values for dimension). +This root function is accessible through the Renderscript language +construct <strong>forEach</strong>. We also reflect a Java version to access this +function as <strong>forEach_root</strong> (for API levels of 14+). An example of this +can be seen in the Android SDK sample for HelloCompute.</p> +</li> +<li><p class="first">The function <strong>.rs.dtor</strong> is a function that is sometimes generated by +llvm-rs-cc. This function cleans up any global variable that contains +(or is) a reference counted Renderscript object type (such as an +rs_allocation, rs_font, or rs_script). This function will be invoked +implicitly by the Renderscript runtime during script teardown.</p> +</li> +</ul> +</li> +<li><p class="first">In terms of a script's global data, global variables can be written +from Java. The Java instance will cache the value or object set and +provide return methods to retrieve this value. If a script updates +the value, this update will not propagate back to the Java class. +Initializers, if present, will also initialize the cached Java value. +This provides a convenient way to declare constants within a script and +make them accessible to the Java runtime. If the script declares a +variable const, only the get methods will be generated.</p> +<p>Globals within a script are considered local to the script. They +cannot be accessed by other scripts and are in effect always 'static' +in the traditional C sense. Static here is used to control if +accessors are generated. Static continues to mean <em>not +externally visible</em> and thus prevents the generation of +accessors. Globals are persistent across invocations of a script and +thus may be used to hold data from run to run.</p> +<p>Globals of two types may be reflected into the Java class. The first +type is basic non-pointer types. Types defined in rs_types.rsh may also be +used. For the non-pointer class, get and set methods are generated for +Java. Globals of single pointer types behave differently. These may +use more complex types. Simple structures composed of the types in +rs_types.rsh may also be used. These globals generate bind points in +Java. If the type is a structure they also generate an appropriate +<strong>Field</strong> class that is used to pack and unpack the contents of the +structure. Binding an allocation in Java effectively sets the +pointer in the script. Bind points marked const indicate to the +runtime that the script will not modify the contents of an allocation. +This may allow the runtime to make more effective use of threads.</p> +</li> +</ul> +</div> +<div class="section" id="vector-types"> +<h1>5. Vector Types</h1> +<p>Vector types such as float2, float4, and uint4 are included to support +vector processing in environments where the processors provide vector +instructions.</p> +<p>On non-vector systems the same code will continue to run but without +the performance advantage. Function overloading is also supported. +This allows the runtime to support vector version of the basic math +routines without the need for special naming. For instance,</p> +<ul class="simple"> +<li><em>float sin(float);</em></li> +<li><em>float2 sin(float2);</em></li> +<li><em>float3 sin(float3);</em></li> +<li><em>float4 sin(float4);</em></li> +</ul> +</div> +</div> +</body> +</html>
diff --git a/slang/README.rst b/slang/README.rst new file mode 100644 index 0000000..972292e --- /dev/null +++ b/slang/README.rst
@@ -0,0 +1,343 @@ +============================================== +llvm-rs-cc: Compiler for Renderscript language +============================================== + + +Introduction +------------ + +llvm-rs-cc compiles a program in the Renderscript language to generate the +following files: + +* Bitcode file. Note that the bitcode here denotes the LLVM (Low-Level + Virtual Machine) bitcode representation, which will be consumed on + an Android device by libbcc (in + platform/frameworks/compile/libbcc.git) to generate device-specific + executables. + +* Reflected APIs for Java. As a result, Android's Java developers can + invoke those APIs from their code. + +Note that although Renderscript is C99-like, we enhance it with several +distinct, effective features for Android programming. We will use +some examples to illustrate these features. + +llvm-rs-cc is run on the host and performs many aggressive optimizations. +As a result, libbcc on the device can be lightweight and focus on +machine-dependent code generation for some input bitcode. + +llvm-rs-cc is a driver on top of libslang. The architecture of +libslang and libbcc is depicted in the following figure:: + + libslang libbcc + | \ | + | \ | + clang llvm + + +Usage +----- + +* *-o $(PRIVATE_RS_OUTPUT_DIR)/res/raw* + + This option specifies the directory for outputting a .bc file. + +* *-p $(PRIVATE_RS_OUTPUT_DIR)/src* + + The option *-p* denotes the directory for outputting the reflected Java files. + +* *-d $(PRIVATE_RS_OUTPUT_DIR)* + + This option *-d* sets the directory for writing dependence information. + +* *-MD* + + Note that *-MD* will tell llvm-rs-cc to output dependence information. + +* *-a $(EXTRA_TARGETS)* + + Specifies additional target dependencies. + +Example Command +--------------- + +First:: + + $ cd <Android_Root_Directory> + +Using frameworks/base/tests/RenderScriptTests/Fountain as a simple app in both +Java and Renderscript, we can find the following command line in the build +log:: + + $ out/host/linux-x86/bin/llvm-rs-cc \ + -o out/target/common/obj/APPS/Fountain_intermediates/src/renderscript/res/raw \ + -p out/target/common/obj/APPS/Fountain_intermediates/src/renderscript/src \ + -d out/target/common/obj/APPS/Fountain_intermediates/src/renderscript \ + -a out/target/common/obj/APPS/Fountain_intermediates/src/RenderScript.stamp \ + -MD \ + -I frameworks/base/libs/rs/scriptc \ + -I external/clang/lib/Headers \ + frameworks/base/libs/rs/java/Fountain/src/com/android/fountain/fountain.rs + +This command will generate: + +* **fountain.bc** + +* **ScriptC_fountain.java** + +* **ScriptField_Point.java** + +The **Script\*.java** files above will be documented below. + + +Example Program: fountain.rs +---------------------------- + +fountain.rs is in the Renderscript language, which is based on the standard +C99. However, llvm-rs-cc goes beyond "clang -std=c99" and provides the +following important features: + +1. Pragma +--------- + +* *#pragma rs java_package_name([PACKAGE_NAME])* + + The ScriptC_[SCRIPT_NAME].java has to be packaged so that Java + developers can invoke those APIs. + + To do that, a Renderscript programmer should specify the package name, so + that llvm-rs-cc knows the package expression and hence the directory + for outputting ScriptC_[SCRIPT_NAME].java. + + In fountain.rs, we have:: + + #pragma rs java_package_name(com.android.fountain) + + In ScriptC_fountain.java, we have:: + + package com.android.fountain + + Note that the ScriptC_fountain.java will be generated inside + ./com/android/fountain/. + +* #pragma version(1) + + This pragma is for evolving the language. Currently we are at + version 1 of the language. + + +2. Basic Reflection: Export Variables and Functions +--------------------------------------------------- + +llvm-rs-cc automatically exports the "externalizable and defined" functions and +variables to Android's Java side. That is, scripts are accessible from +Java. + +For instance, for:: + + int foo = 0; + +In ScriptC_fountain.java, llvm-rs-cc will reflect the following methods:: + + void set_foo(int v)... + + int get_foo()... + +This access takes the form of generated classes which provide access +to the functions and global variables within a script. In summary, +global variables and functions within a script that are not declared +static will generate get, set, or invoke methods. This provides a way +to set the data within a script and call its functions. + +Take the addParticles function in fountain.rs as an example:: + + void addParticles(int rate, float x, float y, int index, bool newColor) { + ... + } + +llvm-rs-cc will genearte ScriptC_fountain.java as follows:: + + void invoke_addParticles(int rate, float x, float y, + int index, bool newColor) { + ... + } + + +3. Export User-Defined Structs +------------------------------ + +In fountain.rs, we have:: + + typedef struct __attribute__((packed, aligned(4))) Point { + float2 delta; + float2 position; + uchar4 color; + } Point_t; + + Point_t *point; + +llvm-rs-cc generates one ScriptField*.java file for each user-defined +struct. In this case, llvm-rs-cc will reflect two files, +ScriptC_fountain.java and ScriptField_Point.java. + +Note that when the type of an exportable variable is a structure, Renderscript +developers should avoid using anonymous structs. This is because llvm-rs-cc +uses the struct name to identify the file, instead of the typedef name. + +For the generated Java files, using ScriptC_fountain.java as an +example we also have:: + + void bind_point(ScriptField_Point v) + +This binds your object with the allocated memory. + +You can bind the struct(e.g., Point), using the setter and getter +methods in ScriptField_Point.java. + +After binding, you can access the object with this method:: + + ScriptField_Point get_point() + +In ScriptField_Point_s.java:: + + ... + // Copying the Item, which is the object that stores every + // fields of struct, to the *index*\-th entry of byte array. + // + // In general, this method would not be invoked directly + // but is used to implement the setter. + void copyToArray(Item i, int index) + + // The setter of Item array, + // index: the index of the Item array + // copyNow: If true, it will be copied to the *index*\-th entry + // of byte array. + void set(Item i, int index, boolean copyNow) + + // The getter of Item array, which gets the *index*-th element + // of byte array. + Item get(int index) + + set_delta(int index, Float2 v, boolean copyNow) + + // The following is the individual setters and getters of + // each field of a struct. + public void set_delta(int index, Float2 v, boolean copyNow) + public void set_position(int index, Float2 v, boolean copyNow) + public void set_color(int index, Short4 v, boolean copyNow) + public Float2 get_delta(int index) + public Float2 get_position(int index) + public Short4 get_color(int index) + + // Copying all Item array to byte array (i.e., memory allocation). + void copyAll() + ... + + +4. Summary of the Java Reflection above +--------------------------------------- + +This section summarizes the high-level design of Renderscript's reflection. + +* In terms of a script's global functions, they can be called from Java. + These calls operate asynchronously and no assumptions should be made + on whether a function called will have actually completed operation. If it + is necessary to wait for a function to complete, the Java application + may call the runtime finish() method, which will wait for all the script + threads to complete pending operations. A few special functions can also + exist: + + * The function **init** (if present) will be called once after the script + is loaded. This is useful to initialize data or anything else the + script may need before it can be used. The init function may not depend + on globals initialized from Java as it will be called before these + can be initialized. The function signature for init must be:: + + void init(void); + + * The function **root** is a special function for graphics. This function + will be called when a script must redraw its contents. No + assumptions should be made as to when this function will be + called. It will only be called if the script is bound as a graphics root. + Calls to this function will be synchronized with data updates and + other invocations from Java. Thus the script will not change due + to external influence in the middle of running **root**. The return value + indicates to the runtime when the function should be called again to + redraw in the future. A return value of 0 indicates that no + redraw is necessary until something changes on the Java side. Any + positive integer indicates a time in milliseconds that the runtime should + wait before calling root again to render another frame. The function + signature for a graphics root functions is as follows:: + + int root(void); + + * It is also possible to create a purely compute-based **root** function. + Such a function has the following signature:: + + void root(const T1 *in, T2 *out, const T3 *usrData, uint32_t x, uint32_t y); + + T1, T2, and T3 represent any supported Renderscript type. Any parameters + above can be omitted, although at least one of in/out must be present. + If both in and out are present, root must only be invoked with types of + the same exact dimensionality (i.e. matching X and Y values for dimension). + This root function is accessible through the Renderscript language + construct **forEach**. We also reflect a Java version to access this + function as **forEach_root** (for API levels of 14+). An example of this + can be seen in the Android SDK sample for HelloCompute. + + * The function **.rs.dtor** is a function that is sometimes generated by + llvm-rs-cc. This function cleans up any global variable that contains + (or is) a reference counted Renderscript object type (such as an + rs_allocation, rs_font, or rs_script). This function will be invoked + implicitly by the Renderscript runtime during script teardown. + +* In terms of a script's global data, global variables can be written + from Java. The Java instance will cache the value or object set and + provide return methods to retrieve this value. If a script updates + the value, this update will not propagate back to the Java class. + Initializers, if present, will also initialize the cached Java value. + This provides a convenient way to declare constants within a script and + make them accessible to the Java runtime. If the script declares a + variable const, only the get methods will be generated. + + Globals within a script are considered local to the script. They + cannot be accessed by other scripts and are in effect always 'static' + in the traditional C sense. Static here is used to control if + accessors are generated. Static continues to mean *not + externally visible* and thus prevents the generation of + accessors. Globals are persistent across invocations of a script and + thus may be used to hold data from run to run. + + Globals of two types may be reflected into the Java class. The first + type is basic non-pointer types. Types defined in rs_types.rsh may also be + used. For the non-pointer class, get and set methods are generated for + Java. Globals of single pointer types behave differently. These may + use more complex types. Simple structures composed of the types in + rs_types.rsh may also be used. These globals generate bind points in + Java. If the type is a structure they also generate an appropriate + **Field** class that is used to pack and unpack the contents of the + structure. Binding an allocation in Java effectively sets the + pointer in the script. Bind points marked const indicate to the + runtime that the script will not modify the contents of an allocation. + This may allow the runtime to make more effective use of threads. + + +5. Vector Types +--------------- + +Vector types such as float2, float4, and uint4 are included to support +vector processing in environments where the processors provide vector +instructions. + +On non-vector systems the same code will continue to run but without +the performance advantage. Function overloading is also supported. +This allows the runtime to support vector version of the basic math +routines without the need for special naming. For instance, + +* *float sin(float);* + +* *float2 sin(float2);* + +* *float3 sin(float3);* + +* *float4 sin(float4);*
diff --git a/slang/RSCCOptions.td b/slang/RSCCOptions.td new file mode 100644 index 0000000..2339cd7 --- /dev/null +++ b/slang/RSCCOptions.td
@@ -0,0 +1,160 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//===----------------------------------------------------------------------===// +// +// This file defines the options accepted by llvm-rs-cc. +// +//===----------------------------------------------------------------------===// + +// Include the common option parsing interfaces. +include "llvm/Option/OptParser.td" + +//===----------------------------------------------------------------------===// +// Target Options +//===----------------------------------------------------------------------===// + +def target_api : Separate<["-"], "target-api">, + HelpText<"Specify target API level (e.g. 14)">; +def target_api_EQ : Joined<["-"], "target-api=">, Alias<target_api>; + +//===----------------------------------------------------------------------===// +// Header Search Options +//===----------------------------------------------------------------------===// + +def I : JoinedOrSeparate<["-"], "I">, MetaVarName<"<directory>">, + HelpText<"Add directory to include search path">; +def _I : Separate<["-", "--"], "include-path">, MetaVarName<"<directory>">, Alias<I>; + +//===----------------------------------------------------------------------===// +// Frontend Options +//===----------------------------------------------------------------------===// + +def o : Separate<["-"], "o">, MetaVarName<"<directory>">, + HelpText<"Specify output directory">; + +def Output_Type_Group : OptionGroup<"<output type group>">; +let Group = Output_Type_Group in { + +def emit_asm : Flag<["-"], "emit-asm">, + HelpText<"Emit target assembly files">; +def _emit_asm : Flag<["-"], "S">, Alias<emit_asm>; +def emit_llvm : Flag<["-"], "emit-llvm">, + HelpText<"Build ASTs then convert to LLVM, emit .ll file">; +def emit_bc : Flag<["-"], "emit-bc">, + HelpText<"Build ASTs then convert to LLVM, emit .bc file">; +def emit_nothing : Flag<["-"], "emit-nothing">, + HelpText<"Build ASTs then convert to LLVM, but emit nothing">; +} + +def m32 : Flag<["-"], "m32">, HelpText<"Emit 32-bit code (only for C++, unless eng build)">; +def m64 : Flag<["-"], "m64">, HelpText<"Emit 64-bit code (only for C++, unless eng build)">; + +def emit_g : Flag<["-"], "g">, + HelpText<"Emit LLVM Debug Metadata">; + +def optimization_level : JoinedOrSeparate<["-"], "O">, MetaVarName<"<optimization-level>">, + HelpText<"<optimization-level> can be one of '0' or '3' (default)">; + +def allow_rs_prefix : Flag<["-"], "allow-rs-prefix">, + HelpText<"Allow user-defined function prefixed with 'rs'">; + +def java_reflection_path_base : Separate<["-"], "java-reflection-path-base">, + MetaVarName<"<directory>">, + HelpText<"Base directory for output reflected Java files">; +def _java_reflection_path_base : Separate<["-"], "p">, + Alias<java_reflection_path_base>; +def java_reflection_package_name : Separate<["-"], "java-reflection-package-name">, + HelpText<"Specify the package name that reflected Java files belong to">; +def _java_reflection_package_name : Separate<["-"], "j">, + Alias<java_reflection_package_name>; + +def bitcode_storage : Separate<["-"], "bitcode-storage">, + MetaVarName<"<value>">, HelpText<"<value> should be 'ar' or 'jc'">; +def _bitcode_storage : Separate<["-"], "s">, Alias<bitcode_storage>; + +def rs_package_name : Separate<["-"], "rs-package-name">, + MetaVarName<"<package_name>">, + HelpText<"package name for referencing RS classes">; +def rs_package_name_EQ : Joined<["-"], "rs-package-name=">, Alias<rs_package_name>; + +def W : Joined<["-"], "W">, HelpText<"Enable the specified warning">; +def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">; + +//===----------------------------------------------------------------------===// +// Dependency Output Options +//===----------------------------------------------------------------------===// + +def M_Group : OptionGroup<"M group>">; +let Group = M_Group in { + + def MD : Flag<["-"], "MD">, HelpText<"Emit .d dependency files">; + def MP : Flag<["-"], "MP">, HelpText<"Also emit phony target for dependency files">; + + def M : Flag<["-"], "M">; + def emit_dep : Flag<["-"], "emit-dep">, Alias<M>; +} + +def output_dep_dir : Separate<["-"], "output-dep-dir">, MetaVarName<"<directory>">, + HelpText<"Specify output directory for dependencies output">; +def _output_dep_dir : Separate<["-"], "d">, Alias<output_dep_dir>; + +def additional_dep_target: Separate<["-"], "additional-dep-target">, + HelpText<"Additional targets to show up in dependencies output">; +def _additional_dep_target : Separate<["-"], "a">, Alias<additional_dep_target>; + +//===----------------------------------------------------------------------===// +// Reflection Options +//===----------------------------------------------------------------------===// + +def reflect_cpp : Flag<["-"], "reflect-c++">, + HelpText<"Reflect C++ classes">; + +//===----------------------------------------------------------------------===// +// Diagnostic Options +//===----------------------------------------------------------------------===// + +def ast_print : Flag<["-"], "ast-print">, + HelpText<"Print clang AST prior to llvm IR generation">; + +def debug : Flag<["-"], "debug">, + HelpText<"Enable debug output">; + +def print_after_all : Flag<["-"], "print-after-all">, + HelpText<"Print llvm IR after each pass">; +def print_before_all : Flag<["-"], "print-before-all">, + HelpText<"Print llvm IR before each pass">; + +//===----------------------------------------------------------------------===// +// Misc Options +//===----------------------------------------------------------------------===// + +def verbose : Flag<["-"], "v">, + HelpText<"Display verbose information during the compilation">; +def _verbose : Flag<["-"], "verbose">, Alias<verbose>; +def __verbose : Flag<["--"], "verbose">, Alias<verbose>; + +def help : Flag<["-"], "help">, + HelpText<"Print this help text">; +def _help : Flag<["--"], "help">, Alias<help>; +def __help : Flag<["-"], "h">, Alias<help>; + +def version : Flag<["-"], "version">, + HelpText<"Print the assembler version">; +def _version : Flag<["--"], "version">, Alias<version>; + +// Compatible with old slang +def no_link : Flag<["-"], "no-link">; // currently no effect
diff --git a/slang/legacy_bitcode.h b/slang/legacy_bitcode.h new file mode 100644 index 0000000..5d45a1b --- /dev/null +++ b/slang/legacy_bitcode.h
@@ -0,0 +1,32 @@ +/* + * Copyright 2013, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "llvm/IR/Attributes.h" + +// Shared functionality for legacy function attribute encoding. +static inline uint64_t encodeLLVMAttributesForBitcode(llvm::AttributeSet A, + unsigned i) { + uint64_t EncodedAttrs = A.Raw(i) & 0xffff; + if (A.hasAttribute(i, llvm::Attribute::Alignment)) { + // The alignment is stored as an actual power of 2 value (instead of the + // compressed log2 form). It occupies bits 31-16 inclusive. + EncodedAttrs |= (A.getParamAlignment(i) << 16); + } + // There are only 12 remaining attributes (bits 21-32), hence our 0xfff mask. + EncodedAttrs |= (A.Raw(i) & (0xfffull << 21)) << 11; + return EncodedAttrs; +} +
diff --git a/slang/lit-tests/P_alloc_in_struct/alloc_in_struct.rs b/slang/lit-tests/P_alloc_in_struct/alloc_in_struct.rs new file mode 100644 index 0000000..24742fb --- /dev/null +++ b/slang/lit-tests/P_alloc_in_struct/alloc_in_struct.rs
@@ -0,0 +1,11 @@ +// RUN: %Slang %s +// RUN: %rs-filecheck-wrapper %s +// CHECK: define void @.rs.dtor() + +#pragma version(1) +#pragma rs java_package_name(alloc_in_struct) + +struct s { + rs_allocation a; +} myStruct; +
diff --git a/slang/lit-tests/P_array_init/array_init.rs b/slang/lit-tests/P_array_init/array_init.rs new file mode 100644 index 0000000..f4465db --- /dev/null +++ b/slang/lit-tests/P_array_init/array_init.rs
@@ -0,0 +1,30 @@ +// RUN: %Slang %s +// RUN: %rs-filecheck-wrapper %s +// CHECK: @ic = constant i32 99, align 4 +// CHECK: @ica = global [2 x i32] [i32 99, i32 1000], align 4 +// CHECK: @fa = global [4 x float] [float 1.000000e+00, float 0x4023FFF2E0000000, float 0.000000e+00, float 0.000000e+00], align 4 +// CHECK: @da = global [2 x double] [double 7.000000e+00, double 8.888880e+00], align 8 +// CHECK: @ca = global [4 x i8] c"a\07bc", align 1 +// CHECK: @sa = global [4 x i16] [i16 1, i16 1, i16 2, i16 3], align 2 +// CHECK: @ia = global [4 x i32] [i32 5, i32 8, i32 0, i32 0], align 4 +// CHECK: @la = global [2 x i64] [i64 13, i64 21], align 8 +// CHECK: @lla = global [4 x i64] [i64 34, i64 0, i64 0, i64 0], align 8 +// CHECK: @ba = global [3 x i8] c"\01\00\00", align 1 + + +#pragma version(1) +#pragma rs java_package_name(array_init) + +const int ic = 99; + +int ica[2] = {ic, 1000}; + +float fa[4] = {1.0, 9.9999f}; +double da[2] = {7.0, 8.88888}; +char ca[4] = {'a', 7, 'b', 'c'}; +short sa[4] = {1, 1, 2, 3}; +int ia[4] = {5, 8}; +long la[2] = {13, 21}; +long long lla[4] = {34}; +bool ba[3] = {true, false}; +
diff --git a/slang/lit-tests/P_compute/compute.rs b/slang/lit-tests/P_compute/compute.rs new file mode 100644 index 0000000..49405b8 --- /dev/null +++ b/slang/lit-tests/P_compute/compute.rs
@@ -0,0 +1,18 @@ +// RUN: %Slang %s +// RUN: %rs-filecheck-wrapper %s +// CHECK: define void @root( +// CHECK: define void @foo( +// CHECK: define void @.helper_bar( + +#pragma version(1) +#pragma rs java_package_name(compute) + +void root(const int *ain, int *aout, const void *usrData, + uint32_t x, uint32_t y) { +} + +void bar(int i, float f) { +} + +void foo (int *p) { +}
diff --git a/slang/lit-tests/P_ref_count/ref_count.rs b/slang/lit-tests/P_ref_count/ref_count.rs new file mode 100644 index 0000000..0f5d612 --- /dev/null +++ b/slang/lit-tests/P_ref_count/ref_count.rs
@@ -0,0 +1,21 @@ +// RUN: %Slang %s +// RUN: %rs-filecheck-wrapper %s +// CHECK: call void @_Z13rsClearObjectP10rs_element(%struct.rs_element{{.*}}* nonnull %.rs.tmp{{[0-9]+}}) +// CHECK: call void @_Z11rsSetObjectP10rs_elementS_(%struct.rs_element{{.*}}* nonnull %.rs.retval{{[0-9]+}}, {{.*}}) + +#pragma version(1) +#pragma rs java_package_name(ref_count) + +static rs_element bar() { + rs_element x = {0}; + return x; +} + +void entrypoint() { + rs_element e = bar(); + if (rsIsObject(e)) { + rsDebug("good object", 0); + } +} + +
diff --git a/slang/lit-tests/README b/slang/lit-tests/README new file mode 100644 index 0000000..78fea67 --- /dev/null +++ b/slang/lit-tests/README
@@ -0,0 +1,42 @@ + +Summary +======= +This directory contains tests for Slang that use the 'llvm-lit' testing tool. +Each testcase is a separate .rs file, and comments inside the testcase are +used to verify certain strings are present in the output bitcode files. + +Prerequisites +============= +To run the tests, you must have the android build environment variables +set (i.e. source build/envsetup.sh; lunch). You must also have on your path: +- Android version of llvm-lit (currently in libbcc/tests/debuginfo) +- FileCheck (utility from llvm) +- llvm-rs-cc (slang frontend compiler) + +If you are unable to run the tests, try using the "--debug" option to llvm-lit. + +When debugging failures, the "-v" option will print to stdout the details of +the failure. Note that tests marked as "Expected Fail" (XFAIL) will not print +failure information, even with -v. + +Customizing +=========== +The tools lit and FileCheck are fairly flexible, and could be used to validate +more than just emitted bitcode. For example, with some changes to the testcases +and the helper shell-script rs-filecheck-wrapper.sh, it should be possible to +write tests that verify the emitted Java code. + +Running +======= +To execute all the tests from this directory, use the Android llvm-lit tool +from libbcc: +$ ../../libbcc/tests/debuginfo/llvm-lit . + +The tool can be run from any directory. +-j controls the number of parallel test executions +-v enables additional verbosity (useful when examining unexpected failures) + +Adding new tests +================ +To add new tests, just add .rs files to a test directory with similar +RUN/CHECK directives in comments as the existing tests.
diff --git a/slang/lit-tests/bitcode_wrapper/bitcode_wrapper_test.ll b/slang/lit-tests/bitcode_wrapper/bitcode_wrapper_test.ll new file mode 100644 index 0000000..77e32c0 --- /dev/null +++ b/slang/lit-tests/bitcode_wrapper/bitcode_wrapper_test.ll
@@ -0,0 +1,51 @@ +; This test assembles this file to bitcode with all supported target +; API versions, then checks that the bitcode file was generated and +; has the right magic number. + +; RUN: %llvm-rs-as -target-api 11 %s -o %t11 +; RUN: xxd -ps -l 4 %t11 | FileCheck %s +; RUN: %llvm-rs-as -target-api 12 %s -o %t12 +; RUN: xxd -ps -l 4 %t12 | FileCheck %s +; RUN: %llvm-rs-as -target-api 13 %s -o %t13 +; RUN: xxd -ps -l 4 %t13 | FileCheck %s +; RUN: %llvm-rs-as -target-api 14 %s -o %t14 +; RUN: xxd -ps -l 4 %t14 | FileCheck %s +; RUN: %llvm-rs-as -target-api 15 %s -o %t15 +; RUN: xxd -ps -l 4 %t15 | FileCheck %s +; RUN: %llvm-rs-as -target-api 16 %s -o %t16 +; RUN: xxd -ps -l 4 %t16 | FileCheck %s +; RUN: %llvm-rs-as -target-api 17 %s -o %t17 +; RUN: xxd -ps -l 4 %t17 | FileCheck %s +; RUN: %llvm-rs-as -target-api 18 %s -o %t18 +; RUN: xxd -ps -l 4 %t18 | FileCheck %s +; RUN: %llvm-rs-as -target-api 19 %s -o %t19 +; RUN: xxd -ps -l 4 %t19 | FileCheck %s +; RUN: %llvm-rs-as -target-api 20 %s -o %t20 +; RUN: xxd -ps -l 4 %t20 | FileCheck %s +; RUN: %llvm-rs-as -target-api 21 %s -o %t21 +; RUN: xxd -ps -l 4 %t21 | FileCheck %s +; RUN: %llvm-rs-as -target-api 22 %s -o %t22 +; RUN: xxd -ps -l 4 %t22 | FileCheck %s +; RUN: %llvm-rs-as -target-api 23 %s -o %t23 +; RUN: xxd -ps -l 4 %t23 | FileCheck %s + +; RUN: %llvm-rs-as -target-api 0 %s -o %t0 +; RUN: xxd -ps -l 4 %t0 | FileCheck %s + +; Check for the magic number. + +; CHECK: dec0170b + +; ModuleID = 'kernel.bc' +target datalayout = "e-p:32:32-i64:64-v128:64:128-n32-S64" +target triple = "armv7-none-linux-gnueabi" + +!llvm.module.flags = !{!0, !1} +!llvm.ident = !{!2} +!\23pragma = !{!3, !4} + +!0 = !{i32 1, !"wchar_size", i32 4} +!1 = !{i32 1, !"min_enum_size", i32 4} +!2 = !{!"clang version 3.6 "} +!3 = !{!"version", !"1"} +!4 = !{!"java_package_name", !"foo"}
diff --git a/slang/lit-tests/debug/debug_disabled.rs b/slang/lit-tests/debug/debug_disabled.rs new file mode 100644 index 0000000..d3ddd57 --- /dev/null +++ b/slang/lit-tests/debug/debug_disabled.rs
@@ -0,0 +1,10 @@ +// RUN: %Slang %s +// RUN: %rs-filecheck-wrapper %s +// CHECK-NOT: DILocation + +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const void *usrData, + uint32_t x, uint32_t y) { +}
diff --git a/slang/lit-tests/debug/debug_enabled.rs b/slang/lit-tests/debug/debug_enabled.rs new file mode 100644 index 0000000..7f2856a --- /dev/null +++ b/slang/lit-tests/debug/debug_enabled.rs
@@ -0,0 +1,10 @@ +// RUN: %Slang -g %s +// RUN: %rs-filecheck-wrapper %s +// CHECK: DILocation + +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const void *usrData, + uint32_t x, uint32_t y) { +}
diff --git a/slang/lit-tests/lit.cfg b/slang/lit-tests/lit.cfg new file mode 100644 index 0000000..7d14bc8 --- /dev/null +++ b/slang/lit-tests/lit.cfg
@@ -0,0 +1,74 @@ +# -*- Python -*- + +# Configuration file for the 'lit' test runner. + +# name: The name of this test suite. +config.name = 'slang_lit_tests' + +# suffixes: A list of file extensions to treat as test files. +config.suffixes = ['.rs', '.ll'] + +# testFormat: The test format to use to interpret tests. +import lit.formats +config.test_format = lit.formats.ShTest() + +# Get the base build directory for the android source tree from environment. +config.base_path = os.getenv('ANDROID_BUILD_TOP') + +# test_source_root: The path where tests are located (default is the test suite +# root). +config.test_source_root = None + +# test_exec_root: The path where tests are located (default is the test suite +# root). +config.test_exec_root = os.path.join(config.base_path, 'out', 'tests', 'slang', 'lit-tests') + +# target_triple: Used by ShTest and TclTest formats for XFAIL checks. +config.target_triple = 'slang' + +def inferTool(binary_name, env_var, PATH): + # Determine which tool to use. + tool = os.getenv(env_var) + + # If the user set the overriding environment variable, use it + if tool and os.path.isfile(tool): + return tool + + # Otherwise look in the path. + import lit.util + tool = lit.util.which(binary_name, PATH) + + if not tool: + lit_config.fatal("couldn't find " + binary_name + " program in " + PATH + " , try setting " + + env_var + " in your environment") + + return os.path.abspath(tool) + +config.slang = inferTool('llvm-rs-cc', 'SLANG', os.path.join(os.getenv('ANDROID_HOST_OUT'), 'bin')).replace('\\', '/') +config.llvm_rs_as = inferTool('llvm-rs-as', 'LLVM_RS_AS', os.path.join(os.getenv('ANDROID_HOST_OUT'), 'bin')).replace('\\', '/') + +config.filecheck = inferTool('FileCheck', 'FILECHECK', config.environment['PATH']) +config.rs_filecheck_wrapper = inferTool('rs-filecheck-wrapper.sh', 'RS_FILECHECK_WRAPPER', os.path.join(config.base_path, 'frameworks', 'compile', 'slang', 'lit-tests')) +config.scriptc_filecheck_wrapper = inferTool('scriptc-filecheck-wrapper.sh', 'SCRIPTC_FILECHECK_WRAPPER', os.path.join(config.base_path, 'frameworks', 'compile', 'slang', 'lit-tests')) + +# Use most up-to-date headers for includes. +config.slang_includes = "-I " + os.path.join(config.base_path, 'frameworks', 'rs', 'scriptc') + " " \ + + "-I " + os.path.join(config.base_path, 'external', 'clang', 'lib', 'Headers') + +config.slang_options = "-emit-llvm -o " + config.test_exec_root \ + + " -output-dep-dir " + config.test_exec_root \ + + " -java-reflection-path-base " + config.test_exec_root + +if not lit_config.quiet: + lit_config.note('using slang: %r' % config.slang) + lit_config.note('using llvm-rs-as: %r' % config.llvm_rs_as) + lit_config.note('using FileCheck: %r' % config.filecheck) + lit_config.note('using rs-filecheck-wrapper.sh: %r' % config.rs_filecheck_wrapper) + lit_config.note('using output directory: %r' % config.test_exec_root) + +# Tools configuration substitutions +config.substitutions.append( ('%Slang', ' ' + config.slang + ' ' + config.slang_includes + ' ' + config.slang_options ) ) +config.substitutions.append( ('%llvm-rs-as', config.llvm_rs_as) ) +config.substitutions.append( ('%rs-filecheck-wrapper', ' ' + config.rs_filecheck_wrapper + ' ' + config.test_exec_root + ' ' + config.filecheck + ' ') ) +config.substitutions.append( ('%scriptc-filecheck-wrapper', ' ' + config.scriptc_filecheck_wrapper + ' --output=' + config.test_exec_root + ' --filecheck=' + config.filecheck + ' ') ) +lit_config.note(config.substitutions)
diff --git a/slang/lit-tests/opt/locals_opt_0.rs b/slang/lit-tests/opt/locals_opt_0.rs new file mode 100644 index 0000000..1c1f7de --- /dev/null +++ b/slang/lit-tests/opt/locals_opt_0.rs
@@ -0,0 +1,45 @@ +// RUN: %Slang -O 0 %s +// RUN: %rs-filecheck-wrapper %s +// CHECK: define internal i32 @main( +// CHECK: %f = alloca float, +// CHECK: %pf = alloca float*, +// CHECK: %ppn = alloca i32**, + +struct float_struct { + float f; + float f2[2]; +} compound_float; + +static +int main(int argc, char* argv[]) +{ + float f = 0.f; + float *pf = &f; + + double d[2][2] = {{0, 1}, {2, 3.0}}; + struct float_struct s; + + unsigned short us = -1; + const unsigned long l = (unsigned long) -1.0e8f; + + { + int** ppn = 0; + if (ppn) { + return -1; + } + } + + s.f = 10e-4f; + s.f2[0] = 1e4f; + s.f2[1] = 100.5f; + + double result = pf[0] * d[1][1] * s.f * us * l; + return (result == 0 ? 0 : -1); +} + +void the_main() { + main(0, 0); +} + +#pragma version(1) +#pragma rs java_package_name(foo)
diff --git a/slang/lit-tests/opt/locals_opt_3.rs b/slang/lit-tests/opt/locals_opt_3.rs new file mode 100644 index 0000000..e90a538 --- /dev/null +++ b/slang/lit-tests/opt/locals_opt_3.rs
@@ -0,0 +1,45 @@ +// RUN: %Slang -O 3 %s +// RUN: %rs-filecheck-wrapper %s +// CHECK-NOT: define internal i32 @main( +// CHECK-NOT: %f = alloca float, +// CHECK-NOT: %pf = alloca float*, +// CHECK-NOT: %ppn = alloca i32**, + +struct float_struct { + float f; + float f2[2]; +} compound_float; + +static +int main(int argc, char* argv[]) +{ + float f = 0.f; + float *pf = &f; + + double d[2][2] = {{0, 1}, {2, 3.0}}; + struct float_struct s; + + unsigned short us = -1; + const unsigned long l = (unsigned long) -1.0e8f; + + { + int** ppn = 0; + if (ppn) { + return -1; + } + } + + s.f = 10e-4f; + s.f2[0] = 1e4f; + s.f2[1] = 100.5f; + + double result = pf[0] * d[1][1] * s.f * us * l; + return (result == 0 ? 0 : -1); +} + +void the_main() { + main(0, 0); +} + +#pragma version(1) +#pragma rs java_package_name(foo)
diff --git a/slang/lit-tests/opt/locals_opt_default.rs b/slang/lit-tests/opt/locals_opt_default.rs new file mode 100644 index 0000000..f491956 --- /dev/null +++ b/slang/lit-tests/opt/locals_opt_default.rs
@@ -0,0 +1,48 @@ +// RUN: %Slang %s +// RUN: %rs-filecheck-wrapper %s +// CHECK-NOT: define internal i32 @main( +// CHECK-NOT: %f = alloca float, +// CHECK-NOT: %pf = alloca float*, +// CHECK-NOT: %ppn = alloca i32**, + +// This test case should behave identically to locals_opt_3.rs. + +struct float_struct { + float f; + float f2[2]; +} compound_float; + + +static +int main(int argc, char* argv[]) +{ + float f = 0.f; + float *pf = &f; + + double d[2][2] = {{0, 1}, {2, 3.0}}; + struct float_struct s; + + unsigned short us = -1; + const unsigned long l = (unsigned long) -1.0e8f; + + { + int** ppn = 0; + if (ppn) { + return -1; + } + } + + s.f = 10e-4f; + s.f2[0] = 1e4f; + s.f2[1] = 100.5f; + + double result = pf[0] * d[1][1] * s.f * us * l; + return (result == 0 ? 0 : -1); +} + +void the_main() { + main(0, 0); +} + +#pragma version(1) +#pragma rs java_package_name(foo)
diff --git a/slang/lit-tests/rs-filecheck-wrapper.sh b/slang/lit-tests/rs-filecheck-wrapper.sh new file mode 100755 index 0000000..8f6d718 --- /dev/null +++ b/slang/lit-tests/rs-filecheck-wrapper.sh
@@ -0,0 +1,14 @@ +#!/bin/bash -e + +# RS Invocation script to FileCheck +# Usage: rs-filecheck-wrapper.sh <output-directory> <path-to-FileCheck> <source> + +OUTDIR=$1 +FILECHECK=$2 +SOURCEFILE=$3 + +FILECHECK_INPUTFILE=`basename $SOURCEFILE | sed 's/\.rs\$/.ll/'` + +# This runs FileCheck on both the 32 bit and the 64 bit bitcode files. +$FILECHECK -input-file $OUTDIR/bc32/$FILECHECK_INPUTFILE $SOURCEFILE +$FILECHECK -input-file $OUTDIR/bc64/$FILECHECK_INPUTFILE $SOURCEFILE
diff --git a/slang/lit-tests/run-lit-tests.sh b/slang/lit-tests/run-lit-tests.sh new file mode 100755 index 0000000..28a9696 --- /dev/null +++ b/slang/lit-tests/run-lit-tests.sh
@@ -0,0 +1,6 @@ +#!/bin/bash -e + +LIT_PATH=$ANDROID_BUILD_TOP/frameworks/compile/libbcc/tests/debuginfo/llvm-lit +TESTS=$ANDROID_BUILD_TOP/frameworks/compile/slang/lit-tests + +$LIT_PATH $TESTS $@
diff --git a/slang/lit-tests/scriptc-filecheck-wrapper.sh b/slang/lit-tests/scriptc-filecheck-wrapper.sh new file mode 100755 index 0000000..7e16872 --- /dev/null +++ b/slang/lit-tests/scriptc-filecheck-wrapper.sh
@@ -0,0 +1,76 @@ +#!/bin/bash -e + +# RS Invocation script to FileCheck, used to check generated Java +# files or C++ files. This assumes that the .rs source file has the +# Java package name "foo". + +print_help() { + help_str="Usage: %s --output=<output-dir> \ +--filecheck=<path-to-filecheck> \ +--lang=[Java/C++] \ +<.rs file>\n" + + printf "$help_str" $0 +} + +for arg in "$@" +do + case $arg in + --output=*) + outdir="${arg#*=}" + ;; + --filecheck*) + filecheck="${arg#*=}" + ;; + --lang*) + lang="${arg#*=}" + ;; + --help) + print_help + exit 0 + ;; + *) + rsfile="$arg" + ;; + esac +done + +if [[ (-z $outdir) || (-z $filecheck) || (-z $rsfile) ]] +then + print_help + exit 1 +fi + +if [[ ! -f $rsfile ]] +then + echo "Input file $rsfile doesn't exist" + exit 1 +fi + +rsfile_basename=$(basename "$rsfile") + +if [[ $lang == "Java" ]] +then + filecheck_inputfile=foo/ScriptC_${rsfile_basename%.*}.java +elif [[ $lang == "C++" ]] +then + filecheck_inputfile=ScriptC_${rsfile_basename%.*}.h +else + echo Unknown language "$lang" + print_help + exit 1 +fi + +if [[ ! -f $filecheck ]] +then + echo "No file at supplied FileCheck path $filecheck" + exit 1 +fi + +if [[ ! -f $outdir/$filecheck_inputfile ]] +then + echo "Input file $outdir/$filecheck_inputfile doesn't exist" + exit 1 +fi + +"$filecheck" -input-file "$outdir"/$filecheck_inputfile "$rsfile"
diff --git a/slang/llvm-rs-as.cpp b/slang/llvm-rs-as.cpp new file mode 100644 index 0000000..5f3a901 --- /dev/null +++ b/slang/llvm-rs-as.cpp
@@ -0,0 +1,149 @@ +//===--- llvm-as.cpp - The low-level LLVM assembler -----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This utility may be invoked in the following manner: +// llvm-as --help - Output information about command line switches +// llvm-as [options] - Read LLVM asm from stdin, write bitcode to stdout +// llvm-as [options] x.ll - Read LLVM asm from the x.ll file, write bitcode +// to the x.bc file. +// +//===----------------------------------------------------------------------===// + +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Verifier.h" +#include "llvm/AsmParser/Parser.h" +#include "llvm/Bitcode/ReaderWriter.h" +#include "llvm/IR/Module.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/PrettyStackTrace.h" +#include "llvm/Support/Signals.h" +#include "llvm/Support/SourceMgr.h" +#include "llvm/Support/SystemUtils.h" +#include "llvm/Support/ToolOutputFile.h" + +#include "slang_bitcode_gen.h" +#include "slang_version.h" + +#include <memory> +using namespace llvm; + +static cl::opt<std::string> +InputFilename(cl::Positional, cl::desc("<input .llvm file>"), cl::init("-")); + +static cl::opt<std::string> +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt<bool> +Force("f", cl::desc("Enable binary output on terminals")); + +static cl::opt<bool> +DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false)); + +static cl::opt<uint32_t> +TargetAPI("target-api", cl::desc("Specify RenderScript target API version " + "(0 = development API) (default is 0)"), + cl::init(0)); + +static cl::opt<bool> +DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); + +static cl::opt<bool> +DisableVerify("disable-verify", cl::Hidden, + cl::desc("Do not run verifier on input LLVM (dangerous!)")); + + +static void WriteOutputFile(const Module *M, uint32_t ModuleTargetAPI) { + // Infer the output filename if needed. + if (OutputFilename.empty()) { + if (InputFilename == "-") { + OutputFilename = "-"; + } else { + std::string IFN = InputFilename; + int Len = IFN.length(); + if (IFN[Len-3] == '.' && IFN[Len-2] == 'l' && IFN[Len-1] == 'l') { + // Source ends in .ll + OutputFilename = std::string(IFN.begin(), IFN.end()-3); + } else { + OutputFilename = IFN; // Append a .bc to it + } + OutputFilename += ".bc"; + } + } + + std::error_code EC; + std::unique_ptr<tool_output_file> Out + (new tool_output_file(OutputFilename.c_str(), EC, llvm::sys::fs::F_None)); + if (EC) { + // TODO(srhines): This isn't actually very specific and needs cleanup. + errs() << EC.message() << '\n'; + exit(1); + } + + if (Force || !CheckBitcodeOutputToConsole(Out->os(), true)) { + slang::writeBitcode(Out->os(), *M, + /* TargetAPI = */ ModuleTargetAPI, + /* OptimizationLevel = */ 3, + /* GenerateDebugInfo = */ false); + + if (!Out->os().has_error()) { + // Declare success. + Out->keep(); + } + } +} + +int main(int argc, char **argv) { + // Print a stack trace if we signal out. + sys::PrintStackTraceOnErrorSignal(); + PrettyStackTraceProgram X(argc, argv); + LLVMContext &Context = getGlobalContext(); + llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n"); + + // Check target API. + uint32_t ActualTargetAPI = (TargetAPI == 0) ? RS_DEVELOPMENT_API : TargetAPI; + + if (ActualTargetAPI != RS_DEVELOPMENT_API && + (ActualTargetAPI < SLANG_MINIMUM_TARGET_API || + ActualTargetAPI > SLANG_MAXIMUM_TARGET_API)) { + errs() << "target API level '" << ActualTargetAPI << "' is out of range " + << "('" << SLANG_MINIMUM_TARGET_API << "' - '" + << SLANG_MAXIMUM_TARGET_API << "')\n"; + return 1; + } + + // Parse the file now... + SMDiagnostic Err; + std::unique_ptr<Module> M(parseAssemblyFile(InputFilename, Err, Context)); + if (M.get() == 0) { + Err.print(argv[0], errs()); + return 1; + } + + if (!DisableVerify) { + std::string Err; + raw_string_ostream stream(Err); + if (verifyModule(*M.get(), &stream)) { + errs() << argv[0] + << ": assembly parsed, but does not verify as correct!\n"; + errs() << Err; + return 1; + } + } + + if (DumpAsm) errs() << "Here's the assembly:\n" << *M.get(); + + if (!DisableOutput) + WriteOutputFile(M.get(), ActualTargetAPI); + + return 0; +}
diff --git a/slang/llvm-rs-cc.cpp b/slang/llvm-rs-cc.cpp new file mode 100644 index 0000000..5da6315 --- /dev/null +++ b/slang/llvm-rs-cc.cpp
@@ -0,0 +1,302 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Driver/DriverDiagnostic.h" +#include "clang/Driver/Options.h" +#include "clang/Frontend/CompilerInvocation.h" +#include "clang/Frontend/FrontendDiagnostic.h" +#include "clang/Frontend/TextDiagnosticPrinter.h" +#include "clang/Frontend/Utils.h" + +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" + +#include "llvm/Option/OptTable.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Signals.h" +#include "llvm/Support/StringSaver.h" +#include "llvm/Target/TargetMachine.h" + +#include "os_sep.h" +#include "rs_cc_options.h" +#include "slang.h" +#include "slang_assert.h" +#include "slang_diagnostic_buffer.h" +#include "slang_rs_reflect_utils.h" + +#include <list> +#include <set> +#include <string> + +namespace { +class StringSet { +public: + const char *save(const char *Str) { + return Strings.save(Str); + } + + StringSet() : Strings(A), A() {} + + llvm::StringSaver & getStringSaver() { return Strings; } + +private: + llvm::StringSaver Strings; + llvm::BumpPtrAllocator A; +}; +} + +static const char *DetermineOutputFile(const std::string &OutputDir, + const std::string &PathSuffix, + const char *InputFile, + slang::Slang::OutputType OutputType, + StringSet *SavedStrings) { + if (OutputType == slang::Slang::OT_Nothing) + return "/dev/null"; + + std::string OutputFile(OutputDir); + + // Append '/' to Opts.mBitcodeOutputDir if not presents + if (!OutputFile.empty() && + (OutputFile[OutputFile.size() - 1]) != OS_PATH_SEPARATOR) + OutputFile.append(1, OS_PATH_SEPARATOR); + + if (!PathSuffix.empty()) { + OutputFile.append(PathSuffix); + OutputFile.append(1, OS_PATH_SEPARATOR); + } + + if (OutputType == slang::Slang::OT_Dependency) { + // The build system wants the .d file name stem to be exactly the same as + // the source .rs file, instead of the .bc file. + OutputFile.append(slang::RSSlangReflectUtils::GetFileNameStem(InputFile)); + } else { + OutputFile.append( + slang::RSSlangReflectUtils::BCFileNameFromRSFileName(InputFile)); + } + + switch (OutputType) { + case slang::Slang::OT_Dependency: { + OutputFile.append(".d"); + break; + } + case slang::Slang::OT_Assembly: { + OutputFile.append(".S"); + break; + } + case slang::Slang::OT_LLVMAssembly: { + OutputFile.append(".ll"); + break; + } + case slang::Slang::OT_Object: { + OutputFile.append(".o"); + break; + } + case slang::Slang::OT_Bitcode: { + OutputFile.append(".bc"); + break; + } + case slang::Slang::OT_Nothing: + default: { + slangAssert(false && "Invalid output type!"); + } + } + + return SavedStrings->save(OutputFile.c_str()); +} + +typedef std::list<std::pair<const char*, const char*> > NamePairList; + +/* + * Compile the Inputs. + * + * Returns 0 on success and nonzero on failure. + * + * IOFiles - list of (foo.rs, foo.bc) pairs of input/output files. + * IOFiles32 - list of input/output pairs for 32-bit compilation. + * Inputs - input filenames. + * Opts - options controlling compilation. + * DiagEngine - Clang diagnostic engine (for creating diagnostics). + * DiagClient - Slang diagnostic consumer (collects and displays diagnostics). + * SavedStrings - expanded strings copied from argv source input files. + * + * We populate IOFiles dynamically while working through the list of Inputs. + * On any 64-bit compilation, we pass back in the 32-bit pairs of files as + * IOFiles32. This allows the 64-bit compiler to later bundle up both the + * 32-bit and 64-bit bitcode outputs to be included in the final reflected + * source code that is emitted. + */ +static void makeFileList(NamePairList *IOFiles, NamePairList *DepFiles, + const llvm::SmallVector<const char*, 16> &Inputs, slang::RSCCOptions &Opts, + StringSet *SavedStrings) { + std::string PathSuffix = ""; + // In our mixed 32/64-bit path, we need to suffix our files differently for + // both 32-bit and 64-bit versions. + if (Opts.mEmit3264) { + if (Opts.mBitWidth == 64) { + PathSuffix = "bc64"; + } else { + PathSuffix = "bc32"; + } + } + + for (int i = 0, e = Inputs.size(); i != e; i++) { + const char *InputFile = Inputs[i]; + + const char *BCOutputFile = DetermineOutputFile(Opts.mBitcodeOutputDir, + PathSuffix, InputFile, + Opts.mOutputType, + SavedStrings); + const char *OutputFile = BCOutputFile; + + if (Opts.mEmitDependency) { + // The dependency file is always emitted without a PathSuffix. + // Collisions between 32-bit and 64-bit files don't make a difference, + // because they share the same sources/dependencies. + const char *DepOutputFile = + DetermineOutputFile(Opts.mDependencyOutputDir, "", InputFile, + slang::Slang::OT_Dependency, SavedStrings); + if (Opts.mOutputType == slang::Slang::OT_Dependency) { + OutputFile = DepOutputFile; + } + + DepFiles->push_back(std::make_pair(BCOutputFile, DepOutputFile)); + } + + IOFiles->push_back(std::make_pair(InputFile, OutputFile)); + } +} + +#define str(s) #s +#define wrap_str(s) str(s) +static void llvm_rs_cc_VersionPrinter() { + llvm::raw_ostream &OS = llvm::outs(); + OS << "llvm-rs-cc: Renderscript compiler\n" + << " (http://developer.android.com/guide/topics/renderscript)\n" + << " based on LLVM (http://llvm.org):\n"; + OS << " Target APIs: " << SLANG_MINIMUM_TARGET_API << " - " + << SLANG_MAXIMUM_TARGET_API; + OS << "\n Build type: " << wrap_str(TARGET_BUILD_VARIANT); +#ifndef __DISABLE_ASSERTS + OS << " with assertions"; +#endif + OS << ".\n"; +} +#undef wrap_str +#undef str + +static void LLVMErrorHandler(void *UserData, const std::string &Message, + bool GenCrashDialog) { + clang::DiagnosticsEngine *DiagEngine = + static_cast<clang::DiagnosticsEngine *>(UserData); + + DiagEngine->Report(clang::diag::err_fe_error_backend) << Message; + + // Run the interrupt handlers to make sure any special cleanups get done, in + // particular that we remove files registered with RemoveFileOnSignal. + llvm::sys::RunInterruptHandlers(); + + exit(1); +} + +int main(int argc, const char **argv) { + llvm::llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + LLVMInitializeARMTargetInfo(); + LLVMInitializeARMTarget(); + LLVMInitializeARMAsmPrinter(); + + StringSet SavedStrings; // Keeps track of strings to be destroyed at the end. + + // Parse the command line arguments and respond to show help & version + // commands. + llvm::SmallVector<const char *, 16> Inputs; + slang::RSCCOptions Opts; + llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts = + new clang::DiagnosticOptions(); + if (!slang::ParseArguments(llvm::makeArrayRef(argv, argc), Inputs, Opts, + *DiagOpts, SavedStrings.getStringSaver())) { + // Exits when there's any error occurred during parsing the arguments + return 1; + } + if (Opts.mShowHelp) { + std::unique_ptr<llvm::opt::OptTable> OptTbl(slang::createRSCCOptTable()); + const std::string Argv0 = llvm::sys::path::stem(argv[0]); + OptTbl->PrintHelp(llvm::outs(), Argv0.c_str(), + "Renderscript source compiler"); + return 0; + } + if (Opts.mShowVersion) { + llvm_rs_cc_VersionPrinter(); + return 0; + } + + // Initialize the diagnostic objects + llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> DiagIDs( + new clang::DiagnosticIDs()); + slang::DiagnosticBuffer DiagsBuffer; + clang::DiagnosticsEngine DiagEngine(DiagIDs, &*DiagOpts, &DiagsBuffer, false); + clang::ProcessWarningOptions(DiagEngine, *DiagOpts); + (void)DiagEngine.setSeverityForGroup(clang::diag::Flavor::WarningOrError, + "implicit-function-declaration", + clang::diag::Severity::Error); + + // Report error if no input file + if (Inputs.empty()) { + DiagEngine.Report(clang::diag::err_drv_no_input_files); + llvm::errs() << DiagsBuffer.str(); + return 1; + } + + llvm::install_fatal_error_handler(LLVMErrorHandler, &DiagEngine); + + // Compile the 32 bit version + NamePairList IOFiles32; + NamePairList DepFiles32; + makeFileList(&IOFiles32, &DepFiles32, Inputs, Opts, &SavedStrings); + + int CompileFailed = 0; + // Handle 32-bit case for Java and C++ reflection. + // For Java, both 32bit and 64bit will be generated. + // For C++, either 64bit or 32bit will be generated based on the target. + if (Opts.mEmit3264 || Opts.mBitWidth == 32) { + std::unique_ptr<slang::Slang> Compiler( + new slang::Slang(32, &DiagEngine, &DiagsBuffer)); + CompileFailed = + !Compiler->compile(IOFiles32, IOFiles32, DepFiles32, Opts, *DiagOpts); + } + + // Handle the 64-bit case too! + bool needEmit64 = Opts.mEmit3264 || Opts.mBitWidth == 64; + if (needEmit64 && !CompileFailed) { + Opts.mBitWidth = 64; + NamePairList IOFiles64; + NamePairList DepFiles64; + makeFileList(&IOFiles64, &DepFiles64, Inputs, Opts, &SavedStrings); + + std::unique_ptr<slang::Slang> Compiler( + new slang::Slang(64, &DiagEngine, &DiagsBuffer)); + CompileFailed = + !Compiler->compile(IOFiles64, IOFiles32, DepFiles64, Opts, *DiagOpts); + } + + llvm::errs() << DiagsBuffer.str(); + llvm::remove_fatal_error_handler(); + return CompileFailed; +}
diff --git a/slang/os_sep.h b/slang/os_sep.h new file mode 100644 index 0000000..832e8fe --- /dev/null +++ b/slang/os_sep.h
@@ -0,0 +1,33 @@ +/* + * Copyright 2011, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_OS_SEP_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_OS_SEP_H_ + +#ifdef USE_MINGW +/* Define the default path separator for the platform. */ +#define OS_PATH_SEPARATOR '\\' +#define OS_PATH_SEPARATOR_STR "\\" + +#else /* not USE_MINGW */ + +/* Define the default path separator for the platform. */ +#define OS_PATH_SEPARATOR '/' +#define OS_PATH_SEPARATOR_STR "/" + +#endif + +#endif // _FRAMEWORKS_COMPILE_SLANG_NO_SEP_H_ NOLINT
diff --git a/slang/rs_cc_options.cpp b/slang/rs_cc_options.cpp new file mode 100644 index 0000000..8c8ae58 --- /dev/null +++ b/slang/rs_cc_options.cpp
@@ -0,0 +1,307 @@ +/* + * Copyright 2014, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Driver/DriverDiagnostic.h" +#include "clang/Driver/Options.h" +#include "clang/Frontend/Utils.h" + +#include "llvm/Option/Arg.h" +#include "llvm/Option/ArgList.h" +#include "llvm/Option/Option.h" +#include "llvm/Option/OptTable.h" +#include "llvm/Support/CommandLine.h" + +#include "rs_cc_options.h" +#include "slang.h" +#include "slang_assert.h" + +#include <cstdlib> +#include <string> +#include <utility> +#include <vector> + +enum { + OPT_INVALID = 0, // This is not an option ID. +#define PREFIX(NAME, VALUE) +#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ + HELPTEXT, METAVAR) \ + OPT_##ID, +#include "RSCCOptions.inc" + LastOption +#undef OPTION +#undef PREFIX +}; + +#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE; +#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ + HELPTEXT, METAVAR) +#include "RSCCOptions.inc" +#undef OPTION +#undef PREFIX + +static const llvm::opt::OptTable::Info RSCCInfoTable[] = { +#define PREFIX(NAME, VALUE) +#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ + HELPTEXT, METAVAR) \ + { \ + PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, llvm::opt::Option::KIND##Class, \ + PARAM, FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS \ + } \ + , +#include "RSCCOptions.inc" +#undef OPTION +#undef PREFIX +}; + +namespace { + +class RSCCOptTable : public llvm::opt::OptTable { + public: + RSCCOptTable() + : OptTable(llvm::makeArrayRef(RSCCInfoTable)) {} +}; +} + +namespace slang { + +llvm::opt::OptTable *createRSCCOptTable() { return new RSCCOptTable(); } + +// This function is similar to +// clang/lib/Frontend/CompilerInvocation::CreateFromArgs. +bool ParseArguments(const llvm::ArrayRef<const char *> &ArgsIn, + llvm::SmallVectorImpl<const char *> &Inputs, + RSCCOptions &Opts, clang::DiagnosticOptions &DiagOpts, + llvm::StringSaver &StringSaver) { + // We use a different diagnostic engine for argument parsing from the rest of + // the work. This mimics what's done in clang. I believe it is so the + // argument parsing errors are well formatted while the full errors can be + // influenced by command line arguments. + llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> ArgumentParseDiagOpts( + new clang::DiagnosticOptions()); + llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> DiagIDs( + new clang::DiagnosticIDs()); + DiagnosticBuffer DiagsBuffer; + clang::DiagnosticsEngine DiagEngine(DiagIDs, &*ArgumentParseDiagOpts, + &DiagsBuffer, false); + + // Populate a vector with the command line arguments, expanding command files + // that have been included via the '@' argument. + llvm::SmallVector<const char *, 256> ArgVector; + // Skip over the command name, or we will mistakenly process it as a source file. + ArgVector.append(ArgsIn.slice(1).begin(), ArgsIn.end()); + llvm::cl::ExpandResponseFiles(StringSaver, llvm::cl::TokenizeGNUCommandLine, + ArgVector, false); + + std::unique_ptr<llvm::opt::OptTable> OptParser(createRSCCOptTable()); + unsigned MissingArgIndex = 0; + unsigned MissingArgCount = 0; + llvm::opt::InputArgList Args = + OptParser->ParseArgs(ArgVector, MissingArgIndex, MissingArgCount); + + // Check for missing argument error. + if (MissingArgCount) { + DiagEngine.Report(clang::diag::err_drv_missing_argument) + << Args.getArgString(MissingArgIndex) << MissingArgCount; + } + + // Issue errors on unknown arguments. + for (llvm::opt::arg_iterator it = Args.filtered_begin(OPT_UNKNOWN), + ie = Args.filtered_end(); + it != ie; ++it) { + DiagEngine.Report(clang::diag::err_drv_unknown_argument) + << (*it)->getAsString(Args); + } + + DiagOpts.IgnoreWarnings = Args.hasArg(OPT_w); + DiagOpts.Warnings = Args.getAllArgValues(OPT_W); + + // Always turn off warnings for empty initializers, since we really want to + // employ/encourage this extension for zero-initialization of structures. + DiagOpts.Warnings.push_back("no-gnu-empty-initializer"); + + for (llvm::opt::ArgList::const_iterator it = Args.begin(), ie = Args.end(); + it != ie; ++it) { + const llvm::opt::Arg *A = *it; + if (A->getOption().getKind() == llvm::opt::Option::InputClass) + Inputs.push_back(A->getValue()); + } + + Opts.mIncludePaths = Args.getAllArgValues(OPT_I); + + Opts.mBitcodeOutputDir = Args.getLastArgValue(OPT_o); + + if (const llvm::opt::Arg *A = Args.getLastArg(OPT_M_Group)) { + switch (A->getOption().getID()) { + case OPT_M: { + Opts.mEmitDependency = true; + Opts.mOutputType = Slang::OT_Dependency; + break; + } + case OPT_MD: { + Opts.mEmitDependency = true; + Opts.mOutputType = Slang::OT_Bitcode; + break; + } + case OPT_MP: { + Opts.mEmitDependency = true; + Opts.mOutputType = Slang::OT_Bitcode; + Opts.mEmitPhonyDependency = true; + break; + } + default: { slangAssert(false && "Invalid option in M group!"); } + } + } + + if (const llvm::opt::Arg *A = Args.getLastArg(OPT_Output_Type_Group)) { + switch (A->getOption().getID()) { + case OPT_emit_asm: { + Opts.mOutputType = Slang::OT_Assembly; + break; + } + case OPT_emit_llvm: { + Opts.mOutputType = Slang::OT_LLVMAssembly; + break; + } + case OPT_emit_bc: { + Opts.mOutputType = Slang::OT_Bitcode; + break; + } + case OPT_emit_nothing: { + Opts.mOutputType = Slang::OT_Nothing; + break; + } + default: { slangAssert(false && "Invalid option in output type group!"); } + } + } + + if (Opts.mEmitDependency && ((Opts.mOutputType != Slang::OT_Bitcode) && + (Opts.mOutputType != Slang::OT_Dependency))) + DiagEngine.Report(clang::diag::err_drv_argument_not_allowed_with) + << Args.getLastArg(OPT_M_Group)->getAsString(Args) + << Args.getLastArg(OPT_Output_Type_Group)->getAsString(Args); + + Opts.mAllowRSPrefix = Args.hasArg(OPT_allow_rs_prefix); + + Opts.mJavaReflectionPathBase = + Args.getLastArgValue(OPT_java_reflection_path_base); + Opts.mJavaReflectionPackageName = + Args.getLastArgValue(OPT_java_reflection_package_name); + + Opts.mRSPackageName = Args.getLastArgValue(OPT_rs_package_name); + + llvm::StringRef BitcodeStorageValue = + Args.getLastArgValue(OPT_bitcode_storage); + if (BitcodeStorageValue == "ar") + Opts.mBitcodeStorage = BCST_APK_RESOURCE; + else if (BitcodeStorageValue == "jc") + Opts.mBitcodeStorage = BCST_JAVA_CODE; + else if (!BitcodeStorageValue.empty()) + DiagEngine.Report(clang::diag::err_drv_invalid_value) + << OptParser->getOptionName(OPT_bitcode_storage) << BitcodeStorageValue; + + llvm::opt::Arg *lastBitwidthArg = Args.getLastArg(OPT_m32, OPT_m64); + if (Args.hasArg(OPT_reflect_cpp)) { + Opts.mBitcodeStorage = BCST_CPP_CODE; + // mJavaReflectionPathBase can be set for C++ reflected builds. + // Set it to the standard mBitcodeOutputDir (via -o) by default. + if (Opts.mJavaReflectionPathBase.empty()) { + Opts.mJavaReflectionPathBase = Opts.mBitcodeOutputDir; + } + + // Check for bitwidth arguments. + if (lastBitwidthArg) { + if (lastBitwidthArg->getOption().matches(OPT_m32)) { + Opts.mBitWidth = 32; + } else { + Opts.mBitWidth = 64; + } + } + } else if (lastBitwidthArg) { + // -m32/-m64 are forbidden for non-C++ reflection paths for non-eng builds + // (they would make it too easy for a developer to accidentally create and + // release an APK that has 32-bit or 64-bit bitcode but not both). +#ifdef __ENABLE_INTERNAL_OPTIONS + if (lastBitwidthArg->getOption().matches(OPT_m32)) { + Opts.mBitWidth = 32; + } else { + Opts.mBitWidth = 64; + } + Opts.mEmit3264 = false; +#else + DiagEngine.Report( + DiagEngine.getCustomDiagID(clang::DiagnosticsEngine::Error, + "cannot use -m32/-m64 without specifying " + "C++ reflection (-reflect-c++)")); +#endif + } + + Opts.mDependencyOutputDir = + Args.getLastArgValue(OPT_output_dep_dir, Opts.mBitcodeOutputDir); + Opts.mAdditionalDepTargets = Args.getAllArgValues(OPT_additional_dep_target); + + Opts.mShowHelp = Args.hasArg(OPT_help); + Opts.mShowVersion = Args.hasArg(OPT_version); + Opts.mDebugEmission = Args.hasArg(OPT_emit_g); + Opts.mVerbose = Args.hasArg(OPT_verbose); + Opts.mASTPrint = Args.hasArg(OPT_ast_print); + + // Delegate options + + std::vector<std::string> DelegatedStrings; + for (int Opt : std::vector<unsigned>{OPT_debug, OPT_print_after_all, OPT_print_before_all}) { + if (Args.hasArg(Opt)) { + // TODO: Don't assume that the option begins with "-"; determine this programmatically instead. + DelegatedStrings.push_back(std::string("-") + std::string(OptParser->getOptionName(Opt))); + slangAssert(OptParser->getOptionKind(Opt) == llvm::opt::Option::FlagClass); + } + } + if (DelegatedStrings.size()) { + std::vector<const char *> DelegatedCStrs; + DelegatedCStrs.push_back(*ArgVector.data()); // program name + std::for_each(DelegatedStrings.cbegin(), DelegatedStrings.cend(), + [&DelegatedCStrs](const std::string &String) { DelegatedCStrs.push_back(String.c_str()); }); + llvm::cl::ParseCommandLineOptions(DelegatedCStrs.size(), DelegatedCStrs.data()); + } + + // If we are emitting both 32-bit and 64-bit bitcode, we must embed it. + + size_t OptLevel = + clang::getLastArgIntValue(Args, OPT_optimization_level, 3, DiagEngine); + + Opts.mOptimizationLevel = + OptLevel == 0 ? llvm::CodeGenOpt::None : llvm::CodeGenOpt::Aggressive; + + Opts.mTargetAPI = + clang::getLastArgIntValue(Args, OPT_target_api, RS_VERSION, DiagEngine); + + if (Opts.mTargetAPI == 0) { + Opts.mTargetAPI = UINT_MAX; + } + + if ((Opts.mTargetAPI < 21) || (Opts.mBitcodeStorage == BCST_CPP_CODE)) + Opts.mEmit3264 = false; + if (Opts.mEmit3264) + Opts.mBitcodeStorage = BCST_JAVA_CODE; + + if (DiagEngine.hasErrorOccurred()) { + llvm::errs() << DiagsBuffer.str(); + return false; + } + + return true; +} +}
diff --git a/slang/rs_cc_options.h b/slang/rs_cc_options.h new file mode 100644 index 0000000..cc60560 --- /dev/null +++ b/slang/rs_cc_options.h
@@ -0,0 +1,148 @@ +/* + * Copyright 2014, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_RS_CC_OPTIONS_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_RS_CC_OPTIONS_H_ + +#include "llvm/Option/ArgList.h" +#include "llvm/Option/Option.h" +#include "llvm/Option/OptTable.h" + +#include "slang.h" +#include "slang_rs_reflect_utils.h" + +#include <string> +#include <vector> + +namespace llvm { +namespace cl { +class StringSaver; +} +namespace opt { +class OptTable; +} +} + +namespace slang { + +// Options for the RenderScript compiler llvm-rs-cc +class RSCCOptions { + public: + // User-defined include paths. + std::vector<std::string> mIncludePaths; + + // The output directory for writing the bitcode files + // (i.e. out/target/common/obj/APPS/.../src/renderscript/res/raw). + std::string mBitcodeOutputDir; + + // Type of file to emit (bitcode, dependency, ...). + slang::Slang::OutputType mOutputType; + + // Allow user-defined functions prefixed with 'rs'. + bool mAllowRSPrefix; + + // 32-bit or 64-bit target + uint32_t mBitWidth; + + // The path for storing reflected Java source files + // (i.e. out/target/common/obj/APPS/.../src/renderscript/src). + std::string mJavaReflectionPathBase; + + // Force package name. This may override the package name specified by a + // #pragma in the .rs file. + std::string mJavaReflectionPackageName; + + // Force the RS package name to use. This can override the default value of + // "android.renderscript" used for the standard RS APIs. + std::string mRSPackageName; + + // Where to store the generated bitcode (resource, Java source, C++ source). + slang::BitCodeStorageType mBitcodeStorage; + + // Emit output dependency file for each input file. + bool mEmitDependency; + + // Emit phony targets for each header dependency, which can avoid make errors + // when the header gets deleted. See -MP option of cc. + bool mEmitPhonyDependency; + + // The output directory for writing dependency files + // (i.e. out/target/common/obj/APPS/.../src/renderscript). + std::string mDependencyOutputDir; + + // User-defined files added to the dependencies (i.e. for adding fake + // dependency files like RenderScript.stamp). + std::vector<std::string> mAdditionalDepTargets; + + bool mShowHelp; // Show the -help text. + bool mShowVersion; // Show the -version text. + + // The target API we are generating code for (see slang_version.h). + unsigned int mTargetAPI; + + // Enable emission of debugging symbols. + bool mDebugEmission; + + // The optimization level used in CodeGen, and encoded in emitted bitcode. + llvm::CodeGenOpt::Level mOptimizationLevel; + + // Display verbose information about the compilation on stdout. + bool mVerbose; + + // Display AST. + bool mASTPrint; + + // Emit both 32-bit and 64-bit bitcode (embedded in the reflected sources). + bool mEmit3264; + + RSCCOptions() { + mOutputType = slang::Slang::OT_Bitcode; + mBitWidth = 32; + mBitcodeStorage = slang::BCST_APK_RESOURCE; + mEmitDependency = 0; + mEmitPhonyDependency = 0; + mShowHelp = 0; + mShowVersion = 0; + mTargetAPI = RS_VERSION; + mDebugEmission = 0; + mOptimizationLevel = llvm::CodeGenOpt::Aggressive; + mVerbose = false; + mASTPrint = false; + mEmit3264 = true; + } +}; + +/* Return a valid OptTable (useful for dumping help information) + */ +llvm::opt::OptTable *createRSCCOptTable(); + +/* Parse ArgVector and return a list of Inputs (source files) and Opts + * (options affecting the compilation of those source files). + * + * \param ArgVector - the input arguments to llvm-rs-cc + * \param Inputs - returned list of actual input source filenames + * \param Opts - returned options after command line has been processed + * \param DiagEngine - input for issuing warnings/errors on arguments + */ + +bool ParseArguments(const llvm::ArrayRef<const char *> &ArgsIn, + llvm::SmallVectorImpl<const char *> &Inputs, + RSCCOptions &Opts, clang::DiagnosticOptions &DiagOpts, + llvm::StringSaver &StringSaver); + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_RS_CC_OPTIONS_H_
diff --git a/slang/rs_version.mk b/slang/rs_version.mk new file mode 100644 index 0000000..63b8822 --- /dev/null +++ b/slang/rs_version.mk
@@ -0,0 +1,22 @@ +# +# Copyright (C) 2014 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +RS_VERSION := 24 +RS_VERSION_DEFINE := -DRS_VERSION=$(RS_VERSION) + +# Use RS_VERSION_DEFINE as part of your LOCAL_CFLAGS to have the proper value. +# LOCAL_CFLAGS += $(RS_VERSION_DEFINE) +
diff --git a/slang/slang.cpp b/slang/slang.cpp new file mode 100644 index 0000000..164fd3d --- /dev/null +++ b/slang/slang.cpp
@@ -0,0 +1,789 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang.h" + +#include <stdlib.h> + +#include <cstring> +#include <list> +#include <sstream> +#include <string> +#include <utility> +#include <vector> + +#include "clang/AST/ASTConsumer.h" +#include "clang/AST/ASTContext.h" + +#include "clang/Basic/DiagnosticIDs.h" +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/FileManager.h" +#include "clang/Basic/FileSystemOptions.h" +#include "clang/Basic/SourceLocation.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Basic/TargetInfo.h" +#include "clang/Basic/TargetOptions.h" + +#include "clang/Frontend/DependencyOutputOptions.h" +#include "clang/Frontend/FrontendDiagnostic.h" +#include "clang/Frontend/FrontendOptions.h" +#include "clang/Frontend/PCHContainerOperations.h" +#include "clang/Frontend/TextDiagnosticPrinter.h" +#include "clang/Frontend/Utils.h" + +#include "clang/Lex/HeaderSearch.h" +#include "clang/Lex/HeaderSearchOptions.h" +#include "clang/Lex/Preprocessor.h" +#include "clang/Lex/PreprocessorOptions.h" + +#include "clang/Parse/ParseAST.h" + +#include "clang/Sema/SemaDiagnostic.h" + +#include "llvm/ADT/IntrusiveRefCntPtr.h" + +#include "llvm/Bitcode/ReaderWriter.h" + +// More force linking +#include "llvm/Linker/Linker.h" + +// Force linking all passes/vmcore stuffs to libslang.so +#include "llvm/LinkAllIR.h" +#include "llvm/LinkAllPasses.h" + +#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/TargetSelect.h" +#include "llvm/Support/ToolOutputFile.h" + +#include "os_sep.h" +#include "rs_cc_options.h" +#include "slang_assert.h" +#include "slang_backend.h" + +#include "slang_rs_context.h" +#include "slang_rs_export_type.h" + +#include "slang_rs_reflection.h" +#include "slang_rs_reflection_cpp.h" + + +namespace { + +static const char *kRSTriple32 = "armv7-none-linux-gnueabi"; +static const char *kRSTriple64 = "aarch64-none-linux-gnueabi"; + +} // namespace + +namespace slang { + + +#define FS_SUFFIX "fs" + +#define RS_HEADER_SUFFIX "rsh" + +/* RS_HEADER_ENTRY(name) */ +#define ENUM_RS_HEADER() \ + RS_HEADER_ENTRY(rs_allocation_create) \ + RS_HEADER_ENTRY(rs_allocation_data) \ + RS_HEADER_ENTRY(rs_atomic) \ + RS_HEADER_ENTRY(rs_convert) \ + RS_HEADER_ENTRY(rs_core) \ + RS_HEADER_ENTRY(rs_debug) \ + RS_HEADER_ENTRY(rs_for_each) \ + RS_HEADER_ENTRY(rs_graphics) \ + RS_HEADER_ENTRY(rs_graphics_types) \ + RS_HEADER_ENTRY(rs_io) \ + RS_HEADER_ENTRY(rs_math) \ + RS_HEADER_ENTRY(rs_matrix) \ + RS_HEADER_ENTRY(rs_object_info) \ + RS_HEADER_ENTRY(rs_object_types) \ + RS_HEADER_ENTRY(rs_quaternion) \ + RS_HEADER_ENTRY(rs_time) \ + RS_HEADER_ENTRY(rs_value_types) \ + RS_HEADER_ENTRY(rs_vector_math) \ + + +// The named of metadata node that pragma resides (should be synced with +// bcc.cpp) +const llvm::StringRef Slang::PragmaMetadataName = "#pragma"; + +static inline llvm::tool_output_file * +OpenOutputFile(const char *OutputFile, + llvm::sys::fs::OpenFlags Flags, + std::error_code &EC, + clang::DiagnosticsEngine *DiagEngine) { + slangAssert((OutputFile != nullptr) && + (DiagEngine != nullptr) && "Invalid parameter!"); + + EC = llvm::sys::fs::create_directories( + llvm::sys::path::parent_path(OutputFile)); + if (!EC) { + llvm::tool_output_file *F = + new llvm::tool_output_file(OutputFile, EC, Flags); + if (F != nullptr) + return F; + } + + // Report error here. + DiagEngine->Report(clang::diag::err_fe_error_opening) + << OutputFile << EC.message(); + + return nullptr; +} + +void Slang::createTarget(uint32_t BitWidth) { + std::vector<std::string> features; + + if (BitWidth == 64) { + mTargetOpts->Triple = kRSTriple64; + } else { + mTargetOpts->Triple = kRSTriple32; + // Treat long as a 64-bit type for our 32-bit RS code. + features.push_back("+long64"); + mTargetOpts->FeaturesAsWritten = features; + } + + mTarget.reset(clang::TargetInfo::CreateTargetInfo(*mDiagEngine, + mTargetOpts)); +} + +void Slang::createFileManager() { + mFileSysOpt.reset(new clang::FileSystemOptions()); + mFileMgr.reset(new clang::FileManager(*mFileSysOpt)); +} + +void Slang::createSourceManager() { + mSourceMgr.reset(new clang::SourceManager(*mDiagEngine, *mFileMgr)); +} + +void Slang::createPreprocessor() { + // Default only search header file in current dir + clang::HeaderSearch *HeaderInfo = new clang::HeaderSearch(&getHeaderSearchOpts(), + *mSourceMgr, + *mDiagEngine, + LangOpts, + mTarget.get()); + + mPP.reset(new clang::Preprocessor(&getPreprocessorOpts(), + *mDiagEngine, + LangOpts, + *mSourceMgr, + *HeaderInfo, + *this, + nullptr, + /* OwnsHeaderSearch = */true)); + // Initialize the preprocessor + mPP->Initialize(getTargetInfo()); + clang::FrontendOptions FEOpts; + + auto *Reader = mPCHContainerOperations->getReaderOrNull( + getHeaderSearchOpts().ModuleFormat); + clang::InitializePreprocessor(*mPP, getPreprocessorOpts(), *Reader, FEOpts); + + clang::ApplyHeaderSearchOptions(*HeaderInfo, getHeaderSearchOpts(), LangOpts, + mPP->getTargetInfo().getTriple()); + + mPragmas.clear(); + + std::vector<clang::DirectoryLookup> SearchList; + for (unsigned i = 0, e = mIncludePaths.size(); i != e; i++) { + if (const clang::DirectoryEntry *DE = + mFileMgr->getDirectory(mIncludePaths[i])) { + SearchList.push_back(clang::DirectoryLookup(DE, + clang::SrcMgr::C_System, + false)); + } + } + + HeaderInfo->SetSearchPaths(SearchList, + /* angledDirIdx = */1, + /* systemDixIdx = */1, + /* noCurDirSearch = */false); + + initPreprocessor(); +} + +void Slang::createASTContext() { + mASTContext.reset( + new clang::ASTContext(LangOpts, *mSourceMgr, mPP->getIdentifierTable(), + mPP->getSelectorTable(), mPP->getBuiltinInfo())); + mASTContext->InitBuiltinTypes(getTargetInfo()); + initASTContext(); +} + +clang::ASTConsumer * +Slang::createBackend(const RSCCOptions &Opts, const clang::CodeGenOptions &CodeGenOpts, + llvm::raw_ostream *OS, OutputType OT) { + auto *B = new Backend(mRSContext, &getDiagnostics(), Opts, + getHeaderSearchOpts(), getPreprocessorOpts(), + CodeGenOpts, getTargetOptions(), &mPragmas, OS, OT, + getSourceManager(), mAllowRSPrefix, mIsFilterscript); + B->Initialize(getASTContext()); + return B; +} + +Slang::Slang(uint32_t BitWidth, clang::DiagnosticsEngine *DiagEngine, + DiagnosticBuffer *DiagClient) + : mDiagEngine(DiagEngine), mDiagClient(DiagClient), + mTargetOpts(new clang::TargetOptions()), + mHSOpts(new clang::HeaderSearchOptions()), + mPPOpts(new clang::PreprocessorOptions()), + mPCHContainerOperations(std::make_shared<clang::PCHContainerOperations>()), + mOT(OT_Default), mRSContext(nullptr), mAllowRSPrefix(false), mTargetAPI(0), + mVerbose(false), mIsFilterscript(false) { + // Please refer to include/clang/Basic/LangOptions.h to setup + // the options. + LangOpts.RTTI = 0; // Turn off the RTTI information support + LangOpts.LineComment = 1; + LangOpts.C99 = 1; + LangOpts.Renderscript = 1; + LangOpts.LaxVectorConversions = 0; // Do not bitcast vectors! + LangOpts.CharIsSigned = 1; // Signed char is our default. + + CodeGenOpts.OptimizationLevel = 3; + + // We must set StackRealignment, because the default is for the actual + // Clang driver to pass this option (-mstackrealign) directly to cc1. + // Since we don't use Clang's driver, we need to similarly supply it. + // If StackRealignment is zero (i.e. the option wasn't set), then the + // backend assumes that it can't adjust the stack in any way, which breaks + // alignment for vector loads/stores. + CodeGenOpts.StackRealignment = 1; + + createTarget(BitWidth); + createFileManager(); + createSourceManager(); +} + +Slang::~Slang() { + delete mRSContext; + for (ReflectedDefinitionListTy::iterator I = ReflectedDefinitions.begin(), + E = ReflectedDefinitions.end(); + I != E; I++) { + delete I->getValue().first; + } +} + +clang::ModuleLoadResult Slang::loadModule( + clang::SourceLocation ImportLoc, + clang::ModuleIdPath Path, + clang::Module::NameVisibilityKind Visibility, + bool IsInclusionDirective) { + slangAssert(0 && "Not implemented"); + return clang::ModuleLoadResult(); +} + +bool Slang::setInputSource(llvm::StringRef InputFile) { + mInputFileName = InputFile.str(); + + mSourceMgr->clearIDTables(); + + const clang::FileEntry *File = mFileMgr->getFile(InputFile); + if (File) { + mSourceMgr->setMainFileID(mSourceMgr->createFileID(File, + clang::SourceLocation(), clang::SrcMgr::C_User)); + } + + if (mSourceMgr->getMainFileID().isInvalid()) { + mDiagEngine->Report(clang::diag::err_fe_error_reading) << InputFile; + return false; + } + + return true; +} + +bool Slang::setOutput(const char *OutputFile) { + std::error_code EC; + llvm::tool_output_file *OS = nullptr; + + switch (mOT) { + case OT_Dependency: + case OT_Assembly: + case OT_LLVMAssembly: { + OS = OpenOutputFile(OutputFile, llvm::sys::fs::F_Text, EC, mDiagEngine); + break; + } + case OT_Nothing: { + break; + } + case OT_Object: + case OT_Bitcode: { + OS = OpenOutputFile(OutputFile, llvm::sys::fs::F_None, EC, mDiagEngine); + break; + } + default: { + llvm_unreachable("Unknown compiler output type"); + } + } + + if (EC) + return false; + + mOS.reset(OS); + + mOutputFileName = OutputFile; + + return true; +} + +bool Slang::setDepOutput(const char *OutputFile) { + std::error_code EC; + + mDOS.reset( + OpenOutputFile(OutputFile, llvm::sys::fs::F_Text, EC, mDiagEngine)); + if (EC || (mDOS.get() == nullptr)) + return false; + + mDepOutputFileName = OutputFile; + + return true; +} + +int Slang::generateDepFile(bool PhonyTarget) { + if (mDiagEngine->hasErrorOccurred()) + return 1; + if (mDOS.get() == nullptr) + return 1; + + // Initialize options for generating dependency file + clang::DependencyOutputOptions DepOpts; + DepOpts.IncludeSystemHeaders = 1; + if (PhonyTarget) + DepOpts.UsePhonyTargets = 1; + DepOpts.OutputFile = mDepOutputFileName; + DepOpts.Targets = mAdditionalDepTargets; + DepOpts.Targets.push_back(mDepTargetBCFileName); + for (std::vector<std::string>::const_iterator + I = mGeneratedFileNames.begin(), E = mGeneratedFileNames.end(); + I != E; + I++) { + DepOpts.Targets.push_back(*I); + } + mGeneratedFileNames.clear(); + + // Per-compilation needed initialization + createPreprocessor(); + clang::DependencyFileGenerator::CreateAndAttachToPreprocessor(*mPP.get(), DepOpts); + + // Inform the diagnostic client we are processing a source file + mDiagClient->BeginSourceFile(LangOpts, mPP.get()); + + // Go through the source file (no operations necessary) + clang::Token Tok; + mPP->EnterMainSourceFile(); + do { + mPP->Lex(Tok); + } while (Tok.isNot(clang::tok::eof)); + + mPP->EndSourceFile(); + + // Declare success if no error + if (!mDiagEngine->hasErrorOccurred()) + mDOS->keep(); + + // Clean up after compilation + mPP.reset(); + mDOS.reset(); + + return mDiagEngine->hasErrorOccurred() ? 1 : 0; +} + +int Slang::compile(const RSCCOptions &Opts) { + if (mDiagEngine->hasErrorOccurred()) + return 1; + if (mOS.get() == nullptr) + return 1; + + // Here is per-compilation needed initialization + createPreprocessor(); + createASTContext(); + + mBackend.reset(createBackend(Opts, CodeGenOpts, &mOS->os(), mOT)); + + // Inform the diagnostic client we are processing a source file + mDiagClient->BeginSourceFile(LangOpts, mPP.get()); + + // The core of the slang compiler + ParseAST(*mPP, mBackend.get(), *mASTContext); + + // Inform the diagnostic client we are done with previous source file + mDiagClient->EndSourceFile(); + + // Declare success if no error + if (!mDiagEngine->hasErrorOccurred()) + mOS->keep(); + + // The compilation ended, clear + mBackend.reset(); + mOS.reset(); + + return mDiagEngine->hasErrorOccurred() ? 1 : 0; +} + +void Slang::setDebugMetadataEmission(bool EmitDebug) { + if (EmitDebug) + CodeGenOpts.setDebugInfo(clang::CodeGenOptions::FullDebugInfo); + else + CodeGenOpts.setDebugInfo(clang::CodeGenOptions::NoDebugInfo); +} + +void Slang::setOptimizationLevel(llvm::CodeGenOpt::Level OptimizationLevel) { + CodeGenOpts.OptimizationLevel = OptimizationLevel; +} + +bool Slang::isFilterscript(const char *Filename) { + const char *c = strrchr(Filename, '.'); + if (c && !strncmp(FS_SUFFIX, c + 1, strlen(FS_SUFFIX) + 1)) { + return true; + } else { + return false; + } +} + +bool Slang::generateJavaBitcodeAccessor(const std::string &OutputPathBase, + const std::string &PackageName, + const std::string *LicenseNote) { + RSSlangReflectUtils::BitCodeAccessorContext BCAccessorContext; + + BCAccessorContext.rsFileName = getInputFileName().c_str(); + BCAccessorContext.bc32FileName = mOutput32FileName.c_str(); + BCAccessorContext.bc64FileName = mOutputFileName.c_str(); + BCAccessorContext.reflectPath = OutputPathBase.c_str(); + BCAccessorContext.packageName = PackageName.c_str(); + BCAccessorContext.licenseNote = LicenseNote; + BCAccessorContext.bcStorage = BCST_JAVA_CODE; // Must be BCST_JAVA_CODE + BCAccessorContext.verbose = false; + + return RSSlangReflectUtils::GenerateJavaBitCodeAccessor(BCAccessorContext); +} + +bool Slang::checkODR(const char *CurInputFile) { + for (RSContext::ExportableList::iterator I = mRSContext->exportable_begin(), + E = mRSContext->exportable_end(); + I != E; + I++) { + RSExportable *RSE = *I; + if (RSE->getKind() != RSExportable::EX_TYPE) + continue; + + RSExportType *ET = static_cast<RSExportType *>(RSE); + if (ET->getClass() != RSExportType::ExportClassRecord) + continue; + + RSExportRecordType *ERT = static_cast<RSExportRecordType *>(ET); + + // Artificial record types (create by us not by user in the source) always + // conforms the ODR. + if (ERT->isArtificial()) + continue; + + // Key to lookup ERT in ReflectedDefinitions + llvm::StringRef RDKey(ERT->getName()); + ReflectedDefinitionListTy::const_iterator RD = + ReflectedDefinitions.find(RDKey); + + if (RD != ReflectedDefinitions.end()) { + const RSExportRecordType *Reflected = RD->getValue().first; + // There's a record (struct) with the same name reflected before. Enforce + // ODR checking - the Reflected must hold *exactly* the same "definition" + // as the one defined previously. We say two record types A and B have the + // same definition iff: + // + // struct A { struct B { + // Type(a1) a1, Type(b1) b1, + // Type(a2) a2, Type(b1) b2, + // ... ... + // Type(aN) aN Type(b3) b3, + // }; } + // Cond. #1. They have same number of fields, i.e., N = M; + // Cond. #2. for (i := 1 to N) + // Type(ai) = Type(bi) must hold; + // Cond. #3. for (i := 1 to N) + // Name(ai) = Name(bi) must hold; + // + // where, + // Type(F) = the type of field F and + // Name(F) = the field name. + + bool PassODR = false; + // Cond. #1 and Cond. #2 + if (Reflected->equals(ERT)) { + // Cond #3. + RSExportRecordType::const_field_iterator AI = Reflected->fields_begin(), + BI = ERT->fields_begin(); + + for (unsigned i = 0, e = Reflected->getFields().size(); i != e; i++) { + if ((*AI)->getName() != (*BI)->getName()) + break; + AI++; + BI++; + } + PassODR = (AI == (Reflected->fields_end())); + } + + if (!PassODR) { + unsigned DiagID = mDiagEngine->getCustomDiagID( + clang::DiagnosticsEngine::Error, + "type '%0' in different translation unit (%1 v.s. %2) " + "has incompatible type definition"); + getDiagnostics().Report(DiagID) << Reflected->getName() + << getInputFileName() + << RD->getValue().second; + return false; + } + } else { + llvm::StringMapEntry<ReflectedDefinitionTy> *ME = + llvm::StringMapEntry<ReflectedDefinitionTy>::Create(RDKey); + ME->setValue(std::make_pair(ERT, CurInputFile)); + + if (!ReflectedDefinitions.insert(ME)) { + slangAssert(false && "Type shouldn't be in map yet!"); + } + + // Take the ownership of ERT such that it won't be freed in ~RSContext(). + ERT->keep(); + } + } + return true; +} + +void Slang::initPreprocessor() { + clang::Preprocessor &PP = getPreprocessor(); + + std::stringstream RSH; + RSH << PP.getPredefines(); + RSH << "#define RS_VERSION " << mTargetAPI << "\n"; + RSH << "#include \"rs_core." RS_HEADER_SUFFIX "\"\n"; + PP.setPredefines(RSH.str()); +} + +void Slang::initASTContext() { + mRSContext = new RSContext(getPreprocessor(), + getASTContext(), + getTargetInfo(), + &mPragmas, + mTargetAPI, + mVerbose); +} + +bool Slang::IsRSHeaderFile(const char *File) { +#define RS_HEADER_ENTRY(name) \ + if (::strcmp(File, #name "." RS_HEADER_SUFFIX) == 0) \ + return true; +ENUM_RS_HEADER() +#undef RS_HEADER_ENTRY + return false; +} + +bool Slang::IsLocInRSHeaderFile(const clang::SourceLocation &Loc, + const clang::SourceManager &SourceMgr) { + clang::FullSourceLoc FSL(Loc, SourceMgr); + clang::PresumedLoc PLoc = SourceMgr.getPresumedLoc(FSL); + + const char *Filename = PLoc.getFilename(); + if (!Filename) { + return false; + } else { + return IsRSHeaderFile(llvm::sys::path::filename(Filename).data()); + } +} + +bool Slang::compile( + const std::list<std::pair<const char*, const char*> > &IOFiles64, + const std::list<std::pair<const char*, const char*> > &IOFiles32, + const std::list<std::pair<const char*, const char*> > &DepFiles, + const RSCCOptions &Opts, + clang::DiagnosticOptions &DiagOpts) { + if (IOFiles32.empty()) + return true; + + if (Opts.mEmitDependency && (DepFiles.size() != IOFiles32.size())) { + unsigned DiagID = mDiagEngine->getCustomDiagID( + clang::DiagnosticsEngine::Error, + "invalid parameter for output dependencies files."); + getDiagnostics().Report(DiagID); + return false; + } + + if (Opts.mEmit3264 && (IOFiles64.size() != IOFiles32.size())) { + slangAssert(false && "Should have equal number of 32/64-bit files"); + return false; + } + + std::string RealPackageName; + + const char *InputFile, *Output64File, *Output32File, *BCOutputFile, + *DepOutputFile; + + setIncludePaths(Opts.mIncludePaths); + setOutputType(Opts.mOutputType); + if (Opts.mEmitDependency) { + setAdditionalDepTargets(Opts.mAdditionalDepTargets); + } + + setDebugMetadataEmission(Opts.mDebugEmission); + + setOptimizationLevel(Opts.mOptimizationLevel); + + mAllowRSPrefix = Opts.mAllowRSPrefix; + + mTargetAPI = Opts.mTargetAPI; + if (mTargetAPI != SLANG_DEVELOPMENT_TARGET_API && + (mTargetAPI < SLANG_MINIMUM_TARGET_API || + mTargetAPI > SLANG_MAXIMUM_TARGET_API)) { + unsigned DiagID = mDiagEngine->getCustomDiagID( + clang::DiagnosticsEngine::Error, + "target API level '%0' is out of range ('%1' - '%2')"); + getDiagnostics().Report(DiagID) << mTargetAPI << SLANG_MINIMUM_TARGET_API + << SLANG_MAXIMUM_TARGET_API; + return false; + } + + if (mTargetAPI >= SLANG_M_TARGET_API) { + LangOpts.NativeHalfArgsAndReturns = 1; + LangOpts.NativeHalfType = 1; + LangOpts.HalfArgsAndReturns = 1; + } + + mVerbose = Opts.mVerbose; + + // Skip generation of warnings a second time if we are doing more than just + // a single pass over the input file. + bool SuppressAllWarnings = (Opts.mOutputType != Slang::OT_Dependency); + + std::list<std::pair<const char*, const char*> >::const_iterator + IOFile64Iter = IOFiles64.begin(), + IOFile32Iter = IOFiles32.begin(), + DepFileIter = DepFiles.begin(); + + for (unsigned i = 0, e = IOFiles32.size(); i != e; i++) { + InputFile = IOFile64Iter->first; + Output64File = IOFile64Iter->second; + Output32File = IOFile32Iter->second; + + if (!setInputSource(InputFile)) + return false; + + if (!setOutput(Output64File)) + return false; + + // For use with 64-bit compilation/reflection. This only sets the filename of + // the 32-bit bitcode file, and doesn't actually verify it already exists. + mOutput32FileName = Output32File; + + mIsFilterscript = isFilterscript(InputFile); + + CodeGenOpts.MainFileName = mInputFileName; + + if (Slang::compile(Opts) > 0) + return false; + + if (!Opts.mJavaReflectionPackageName.empty()) { + mRSContext->setReflectJavaPackageName(Opts.mJavaReflectionPackageName); + } + const std::string &RealPackageName = + mRSContext->getReflectJavaPackageName(); + + bool doReflection = true; + if (Opts.mEmit3264 && (Opts.mBitWidth == 32)) { + // Skip reflection on the 32-bit path if we are going to emit it on the + // 64-bit path. + doReflection = false; + } + if (Opts.mOutputType != Slang::OT_Dependency && doReflection) { + + if (Opts.mBitcodeStorage == BCST_CPP_CODE) { + const std::string &outputFileName = (Opts.mBitWidth == 64) ? + mOutputFileName : mOutput32FileName; + RSReflectionCpp R(mRSContext, Opts.mJavaReflectionPathBase, + getInputFileName(), outputFileName); + if (!R.reflect()) { + return false; + } + } else { + if (!Opts.mRSPackageName.empty()) { + mRSContext->setRSPackageName(Opts.mRSPackageName); + } + + std::vector<std::string> generatedFileNames; + RSReflectionJava R(mRSContext, &generatedFileNames, + Opts.mJavaReflectionPathBase, getInputFileName(), + mOutputFileName, + Opts.mBitcodeStorage == BCST_JAVA_CODE); + if (!R.reflect()) { + // TODO Is this needed or will the error message have been printed + // already? and why not for the C++ case? + fprintf(stderr, "RSContext::reflectToJava : failed to do reflection " + "(%s)\n", + R.getLastError()); + return false; + } + + for (std::vector<std::string>::const_iterator + I = generatedFileNames.begin(), E = generatedFileNames.end(); + I != E; + I++) { + std::string ReflectedName = RSSlangReflectUtils::ComputePackagedPath( + Opts.mJavaReflectionPathBase.c_str(), + (RealPackageName + OS_PATH_SEPARATOR_STR + *I).c_str()); + appendGeneratedFileName(ReflectedName + ".java"); + } + + if ((Opts.mOutputType == Slang::OT_Bitcode) && + (Opts.mBitcodeStorage == BCST_JAVA_CODE) && + !generateJavaBitcodeAccessor(Opts.mJavaReflectionPathBase, + RealPackageName.c_str(), + mRSContext->getLicenseNote())) { + return false; + } + } + } + + if (Opts.mEmitDependency) { + BCOutputFile = DepFileIter->first; + DepOutputFile = DepFileIter->second; + + setDepTargetBC(BCOutputFile); + + if (!setDepOutput(DepOutputFile)) + return false; + + if (SuppressAllWarnings) { + getDiagnostics().setSuppressAllDiagnostics(true); + } + if (generateDepFile(Opts.mEmitPhonyDependency) > 0) + return false; + if (SuppressAllWarnings) { + getDiagnostics().setSuppressAllDiagnostics(false); + } + + DepFileIter++; + } + + if (!checkODR(InputFile)) + return false; + + IOFile64Iter++; + IOFile32Iter++; + } + return true; +} + +} // namespace slang
diff --git a/slang/slang.h b/slang/slang.h new file mode 100644 index 0000000..faf6f8a --- /dev/null +++ b/slang/slang.h
@@ -0,0 +1,307 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_H_ + +#include <cstdio> +#include <list> +#include <string> +#include <utility> +#include <vector> + +#include "llvm/ADT/StringMap.h" + +#include "slang_rs_reflect_utils.h" +#include "slang_version.h" + +// Terrible workaround for TargetOptions.h not using llvm::RefCountedBase! +#include "llvm/ADT/IntrusiveRefCntPtr.h" +using llvm::RefCountedBase; + +#include "clang/Basic/LangOptions.h" +#include "clang/Basic/TargetOptions.h" +#include "clang/Frontend/CodeGenOptions.h" +#include "clang/Lex/ModuleLoader.h" + +#include "llvm/ADT/StringRef.h" + +#include "llvm/Target/TargetMachine.h" + +#include "slang_diagnostic_buffer.h" +#include "slang_pragma_list.h" + +namespace llvm { + class tool_output_file; +} + +namespace clang { + class ASTConsumer; + class ASTContext; + class Backend; + class CodeGenOptions; + class Diagnostic; + class DiagnosticsEngine; + class FileManager; + class FileSystemOptions; + class HeaderSearchOptions; + class LangOptions; + class PCHContainerOperations; + class Preprocessor; + class PreprocessorOptions; + class SourceManager; + class TargetInfo; +} // namespace clang + +namespace slang { + +class RSCCOptions; +class RSContext; +class RSExportRecordType; + +class Slang : public clang::ModuleLoader { + public: + enum OutputType { + OT_Dependency, + OT_Assembly, + OT_LLVMAssembly, + OT_Bitcode, + OT_Nothing, + OT_Object, + + OT_Default = OT_Bitcode + }; + + private: + // Language options (define the language feature for compiler such as C99) + clang::LangOptions LangOpts; + // Code generation options for the compiler + clang::CodeGenOptions CodeGenOpts; + + // Returns true if this is a Filterscript file. + static bool isFilterscript(const char *Filename); + + // Diagnostics Engine (Producer and Diagnostics Reporter) + clang::DiagnosticsEngine *mDiagEngine; + + // Diagnostics Consumer + // NOTE: The ownership is taken by mDiagEngine after creation. + DiagnosticBuffer *mDiagClient; + + // The target being compiled for + std::shared_ptr<clang::TargetOptions> mTargetOpts; + std::unique_ptr<clang::TargetInfo> mTarget; + void createTarget(uint32_t BitWidth); + + // File manager (for prepocessor doing the job such as header file search) + std::unique_ptr<clang::FileManager> mFileMgr; + std::unique_ptr<clang::FileSystemOptions> mFileSysOpt; + void createFileManager(); + + // Source manager (responsible for the source code handling) + std::unique_ptr<clang::SourceManager> mSourceMgr; + void createSourceManager(); + + // Preprocessor (source code preprocessor) + std::unique_ptr<clang::Preprocessor> mPP; + void createPreprocessor(); + + // AST context (the context to hold long-lived AST nodes) + std::unique_ptr<clang::ASTContext> mASTContext; + void createASTContext(); + + // AST consumer, responsible for code generation + std::unique_ptr<clang::ASTConsumer> mBackend; + + // Options for includes + llvm::IntrusiveRefCntPtr<clang::HeaderSearchOptions> mHSOpts; + + // Options for the preprocessor (but not header includes) + llvm::IntrusiveRefCntPtr<clang::PreprocessorOptions> mPPOpts; + + // Module provider (probably not necessary, but keeps us more consistent + // with regular Clang. + std::shared_ptr<clang::PCHContainerOperations> mPCHContainerOperations; + + // File names + std::string mInputFileName; + std::string mOutputFileName; + std::string mOutput32FileName; + + std::string mDepOutputFileName; + std::string mDepTargetBCFileName; + std::vector<std::string> mAdditionalDepTargets; + + OutputType mOT; + + // Output stream + std::unique_ptr<llvm::tool_output_file> mOS; + + // Dependency output stream + std::unique_ptr<llvm::tool_output_file> mDOS; + + std::vector<std::string> mIncludePaths; + + // Context for Renderscript + RSContext *mRSContext; + + bool mAllowRSPrefix; + + unsigned int mTargetAPI; + + bool mVerbose; + + bool mIsFilterscript; + + // Collect generated filenames (without the .java) for dependency generation + std::vector<std::string> mGeneratedFileNames; + + PragmaList mPragmas; + + // FIXME: Should be std::list<RSExportable *> here. But currently we only + // check ODR on record type. + // + // ReflectedDefinitions maps record type name to a pair: + // <its RSExportRecordType instance, + // the first file contains this record type definition> + typedef std::pair<RSExportRecordType*, const char*> ReflectedDefinitionTy; + typedef llvm::StringMap<ReflectedDefinitionTy> ReflectedDefinitionListTy; + ReflectedDefinitionListTy ReflectedDefinitions; + + bool generateJavaBitcodeAccessor(const std::string &OutputPathBase, + const std::string &PackageName, + const std::string *LicenseNote); + + // CurInputFile is the pointer to a char array holding the input filename + // and is valid before compile() ends. + bool checkODR(const char *CurInputFile); + + clang::DiagnosticsEngine &getDiagnostics() { return *mDiagEngine; } + clang::TargetInfo const &getTargetInfo() const { return *mTarget; } + clang::FileManager &getFileManager() { return *mFileMgr; } + clang::SourceManager &getSourceManager() { return *mSourceMgr; } + clang::Preprocessor &getPreprocessor() { return *mPP; } + clang::ASTContext &getASTContext() { return *mASTContext; } + clang::HeaderSearchOptions &getHeaderSearchOpts() { return *mHSOpts; } + clang::PreprocessorOptions &getPreprocessorOpts() { return *mPPOpts; } + + inline clang::TargetOptions const &getTargetOptions() const + { return *mTargetOpts.get(); } + + void initPreprocessor(); + void initASTContext(); + + clang::ASTConsumer *createBackend(const RSCCOptions &Opts, + const clang::CodeGenOptions &CodeGenOpts, + llvm::raw_ostream *OS, + OutputType OT); + + public: + static const llvm::StringRef PragmaMetadataName; + + static void GlobalInitialization(); + + static bool IsRSHeaderFile(const char *File); + // FIXME: Determine whether a location is in RS header (i.e., one of the RS + // built-in APIs) should only need its names (we need a "list" of RS + // built-in APIs). + static bool IsLocInRSHeaderFile(const clang::SourceLocation &Loc, + const clang::SourceManager &SourceMgr); + + Slang(uint32_t BitWidth, clang::DiagnosticsEngine *DiagEngine, + DiagnosticBuffer *DiagClient); + + virtual ~Slang(); + + bool setInputSource(llvm::StringRef InputFile); + + std::string const &getInputFileName() const { return mInputFileName; } + + void setIncludePaths(const std::vector<std::string> &IncludePaths) { + mIncludePaths = IncludePaths; + } + + void setOutputType(OutputType OT) { mOT = OT; } + + bool setOutput(const char *OutputFile); + + bool setDepOutput(const char *OutputFile); + + void setDepTargetBC(const char *TargetBCFile) { + mDepTargetBCFileName = TargetBCFile; + } + + void setAdditionalDepTargets( + std::vector<std::string> const &AdditionalDepTargets) { + mAdditionalDepTargets = AdditionalDepTargets; + } + + void appendGeneratedFileName(std::string const &GeneratedFileName) { + mGeneratedFileNames.push_back(GeneratedFileName); + } + + int generateDepFile(bool PhonyTarget); + + int compile(const RSCCOptions &Opts); + + char const *getErrorMessage() { return mDiagClient->str().c_str(); } + + void setDebugMetadataEmission(bool EmitDebug); + + void setOptimizationLevel(llvm::CodeGenOpt::Level OptimizationLevel); + + // Compile bunch of RS files given in the llvm-rs-cc arguments. Return true if + // all given input files are successfully compiled without errors. + // + // @IOFiles - List of pairs of <input file path, output file path>. + // + // @DepFiles - List of pairs of <output dep. file path, dependent bitcode + // target>. If @OutputDep is true, this parameter must be given + // with the same number of pairs given in @IOFiles. + // + // @Opts - Selection of options defined from invoking llvm-rs-cc + bool + compile(const std::list<std::pair<const char *, const char *>> &IOFiles64, + const std::list<std::pair<const char *, const char *>> &IOFiles32, + const std::list<std::pair<const char *, const char *>> &DepFiles, + const RSCCOptions &Opts, + clang::DiagnosticOptions &DiagOpts); + + clang::ModuleLoadResult loadModule(clang::SourceLocation ImportLoc, + clang::ModuleIdPath Path, + clang::Module::NameVisibilityKind VK, + bool IsInclusionDirective) override; + + void makeModuleVisible(clang::Module *Mod, + clang::Module::NameVisibilityKind Visibility, + clang::SourceLocation ImportLoc) override {} + + clang::GlobalModuleIndex * + loadGlobalModuleIndex(clang::SourceLocation TriggerLoc) override { + // We don't support C++ modules for RenderScript. + return nullptr; + } + + bool lookupMissingImports(llvm::StringRef Name, + clang::SourceLocation TriggerLoc) override { + // We don't support C++ modules for RenderScript. + return false; + } +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_H_ NOLINT
diff --git a/slang/slang_assert.h b/slang/slang_assert.h new file mode 100644 index 0000000..c3ea84f --- /dev/null +++ b/slang/slang_assert.h
@@ -0,0 +1,40 @@ +/* + * Copyright 2011, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_ASSERT_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_ASSERT_H_ + +#include <cstdlib> +#include <cstdio> + +#ifdef __DISABLE_ASSERTS +#define slangAssert(v) do {} while (0) +#else +#define __ABORT_ON_FAILURES 1 +#define slangAssert(v) \ + do { \ + if (!(v)) { \ + fprintf(stderr, "slangAssert failed at %s:%d - '%s'\n", \ + __FILE__, __LINE__, #v); \ + if (__ABORT_ON_FAILURES) { \ + abort(); \ + } \ + } \ + } while (0) +#endif // __DISABLE_ASSERTS + + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_ASSERT_H_ NOLINT
diff --git a/slang/slang_backend.cpp b/slang/slang_backend.cpp new file mode 100644 index 0000000..81de4fd --- /dev/null +++ b/slang/slang_backend.cpp
@@ -0,0 +1,911 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_backend.h" + +#include <string> +#include <vector> + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclGroup.h" + +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/TargetInfo.h" +#include "clang/Basic/TargetOptions.h" + +#include "clang/CodeGen/ModuleBuilder.h" + +#include "clang/Frontend/CodeGenOptions.h" +#include "clang/Frontend/FrontendDiagnostic.h" + +#include "llvm/ADT/Twine.h" +#include "llvm/ADT/StringExtras.h" + +#include "llvm/Bitcode/ReaderWriter.h" + +#include "llvm/CodeGen/RegAllocRegistry.h" +#include "llvm/CodeGen/SchedulerRegistry.h" + +#include "llvm/IR/Constant.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DataLayout.h" +#include "llvm/IR/DebugLoc.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/IRBuilder.h" +#include "llvm/IR/IRPrintingPasses.h" +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Metadata.h" +#include "llvm/IR/Module.h" + +#include "llvm/Transforms/IPO/PassManagerBuilder.h" + +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetOptions.h" +#include "llvm/Support/TargetRegistry.h" + +#include "llvm/MC/SubtargetFeature.h" + +#include "slang_assert.h" +#include "slang.h" +#include "slang_bitcode_gen.h" +#include "slang_rs_context.h" +#include "slang_rs_export_foreach.h" +#include "slang_rs_export_func.h" +#include "slang_rs_export_reduce.h" +#include "slang_rs_export_type.h" +#include "slang_rs_export_var.h" +#include "slang_rs_metadata.h" + +#include "rs_cc_options.h" + +#include "strip_unknown_attributes.h" + +namespace slang { + +void Backend::CreateFunctionPasses() { + if (!mPerFunctionPasses) { + mPerFunctionPasses = new llvm::legacy::FunctionPassManager(mpModule); + + llvm::PassManagerBuilder PMBuilder; + PMBuilder.OptLevel = mCodeGenOpts.OptimizationLevel; + PMBuilder.populateFunctionPassManager(*mPerFunctionPasses); + } +} + +void Backend::CreateModulePasses() { + if (!mPerModulePasses) { + mPerModulePasses = new llvm::legacy::PassManager(); + + llvm::PassManagerBuilder PMBuilder; + PMBuilder.OptLevel = mCodeGenOpts.OptimizationLevel; + PMBuilder.SizeLevel = mCodeGenOpts.OptimizeSize; + if (mCodeGenOpts.UnitAtATime) { + PMBuilder.DisableUnitAtATime = 0; + } else { + PMBuilder.DisableUnitAtATime = 1; + } + + if (mCodeGenOpts.UnrollLoops) { + PMBuilder.DisableUnrollLoops = 0; + } else { + PMBuilder.DisableUnrollLoops = 1; + } + + PMBuilder.populateModulePassManager(*mPerModulePasses); + // Add a pass to strip off unknown/unsupported attributes. + mPerModulePasses->add(createStripUnknownAttributesPass()); + } +} + +bool Backend::CreateCodeGenPasses() { + if ((mOT != Slang::OT_Assembly) && (mOT != Slang::OT_Object)) + return true; + + // Now we add passes for code emitting + if (mCodeGenPasses) { + return true; + } else { + mCodeGenPasses = new llvm::legacy::FunctionPassManager(mpModule); + } + + // Create the TargetMachine for generating code. + std::string Triple = mpModule->getTargetTriple(); + + std::string Error; + const llvm::Target* TargetInfo = + llvm::TargetRegistry::lookupTarget(Triple, Error); + if (TargetInfo == nullptr) { + mDiagEngine.Report(clang::diag::err_fe_unable_to_create_target) << Error; + return false; + } + + // Target Machine Options + llvm::TargetOptions Options; + + // Use soft-float ABI for ARM (which is the target used by Slang during code + // generation). Codegen still uses hardware FPU by default. To use software + // floating point, add 'soft-float' feature to FeaturesStr below. + Options.FloatABIType = llvm::FloatABI::Soft; + + // BCC needs all unknown symbols resolved at compilation time. So we don't + // need any relocation model. + llvm::Reloc::Model RM = llvm::Reloc::Static; + + // This is set for the linker (specify how large of the virtual addresses we + // can access for all unknown symbols.) + llvm::CodeModel::Model CM; + if (mpModule->getDataLayout().getPointerSize() == 4) { + CM = llvm::CodeModel::Small; + } else { + // The target may have pointer size greater than 32 (e.g. x86_64 + // architecture) may need large data address model + CM = llvm::CodeModel::Medium; + } + + // Setup feature string + std::string FeaturesStr; + if (mTargetOpts.CPU.size() || mTargetOpts.Features.size()) { + llvm::SubtargetFeatures Features; + + for (std::vector<std::string>::const_iterator + I = mTargetOpts.Features.begin(), E = mTargetOpts.Features.end(); + I != E; + I++) + Features.AddFeature(*I); + + FeaturesStr = Features.getString(); + } + + llvm::TargetMachine *TM = + TargetInfo->createTargetMachine(Triple, mTargetOpts.CPU, FeaturesStr, + Options, RM, CM); + + // Register allocation policy: + // createFastRegisterAllocator: fast but bad quality + // createGreedyRegisterAllocator: not so fast but good quality + llvm::RegisterRegAlloc::setDefault((mCodeGenOpts.OptimizationLevel == 0) ? + llvm::createFastRegisterAllocator : + llvm::createGreedyRegisterAllocator); + + llvm::CodeGenOpt::Level OptLevel = llvm::CodeGenOpt::Default; + if (mCodeGenOpts.OptimizationLevel == 0) { + OptLevel = llvm::CodeGenOpt::None; + } else if (mCodeGenOpts.OptimizationLevel == 3) { + OptLevel = llvm::CodeGenOpt::Aggressive; + } + + llvm::TargetMachine::CodeGenFileType CGFT = + llvm::TargetMachine::CGFT_AssemblyFile; + if (mOT == Slang::OT_Object) { + CGFT = llvm::TargetMachine::CGFT_ObjectFile; + } + if (TM->addPassesToEmitFile(*mCodeGenPasses, mBufferOutStream, + CGFT, OptLevel)) { + mDiagEngine.Report(clang::diag::err_fe_unable_to_interface_with_target); + return false; + } + + return true; +} + +Backend::Backend(RSContext *Context, clang::DiagnosticsEngine *DiagEngine, + const RSCCOptions &Opts, + const clang::HeaderSearchOptions &HeaderSearchOpts, + const clang::PreprocessorOptions &PreprocessorOpts, + const clang::CodeGenOptions &CodeGenOpts, + const clang::TargetOptions &TargetOpts, PragmaList *Pragmas, + llvm::raw_ostream *OS, Slang::OutputType OT, + clang::SourceManager &SourceMgr, bool AllowRSPrefix, + bool IsFilterscript) + : ASTConsumer(), mTargetOpts(TargetOpts), mpModule(nullptr), mpOS(OS), + mOT(OT), mGen(nullptr), mPerFunctionPasses(nullptr), + mPerModulePasses(nullptr), mCodeGenPasses(nullptr), + mBufferOutStream(*mpOS), mContext(Context), + mSourceMgr(SourceMgr), mASTPrint(Opts.mASTPrint), mAllowRSPrefix(AllowRSPrefix), + mIsFilterscript(IsFilterscript), mExportVarMetadata(nullptr), + mExportFuncMetadata(nullptr), mExportForEachNameMetadata(nullptr), + mExportForEachSignatureMetadata(nullptr), + mExportReduceMetadata(nullptr), + mExportTypeMetadata(nullptr), mRSObjectSlotsMetadata(nullptr), + mRefCount(mContext->getASTContext()), + mASTChecker(Context, Context->getTargetAPI(), IsFilterscript), + mForEachHandler(Context), + mLLVMContext(llvm::getGlobalContext()), mDiagEngine(*DiagEngine), + mCodeGenOpts(CodeGenOpts), mPragmas(Pragmas) { + mGen = CreateLLVMCodeGen(mDiagEngine, "", HeaderSearchOpts, PreprocessorOpts, + mCodeGenOpts, mLLVMContext); +} + +void Backend::Initialize(clang::ASTContext &Ctx) { + mGen->Initialize(Ctx); + + mpModule = mGen->GetModule(); +} + +void Backend::HandleTranslationUnit(clang::ASTContext &Ctx) { + HandleTranslationUnitPre(Ctx); + + if (mASTPrint) + Ctx.getTranslationUnitDecl()->dump(); + + mGen->HandleTranslationUnit(Ctx); + + // Here, we complete a translation unit (whole translation unit is now in LLVM + // IR). Now, interact with LLVM backend to generate actual machine code (asm + // or machine code, whatever.) + + // Silently ignore if we weren't initialized for some reason. + if (!mpModule) + return; + + llvm::Module *M = mGen->ReleaseModule(); + if (!M) { + // The module has been released by IR gen on failures, do not double free. + mpModule = nullptr; + return; + } + + slangAssert(mpModule == M && + "Unexpected module change during LLVM IR generation"); + + // Insert #pragma information into metadata section of module + if (!mPragmas->empty()) { + llvm::NamedMDNode *PragmaMetadata = + mpModule->getOrInsertNamedMetadata(Slang::PragmaMetadataName); + for (PragmaList::const_iterator I = mPragmas->begin(), E = mPragmas->end(); + I != E; + I++) { + llvm::SmallVector<llvm::Metadata*, 2> Pragma; + // Name goes first + Pragma.push_back(llvm::MDString::get(mLLVMContext, I->first)); + // And then value + Pragma.push_back(llvm::MDString::get(mLLVMContext, I->second)); + + // Create MDNode and insert into PragmaMetadata + PragmaMetadata->addOperand( + llvm::MDNode::get(mLLVMContext, Pragma)); + } + } + + HandleTranslationUnitPost(mpModule); + + // Create passes for optimization and code emission + + // Create and run per-function passes + CreateFunctionPasses(); + if (mPerFunctionPasses) { + mPerFunctionPasses->doInitialization(); + + for (llvm::Module::iterator I = mpModule->begin(), E = mpModule->end(); + I != E; + I++) + if (!I->isDeclaration()) + mPerFunctionPasses->run(*I); + + mPerFunctionPasses->doFinalization(); + } + + // Create and run module passes + CreateModulePasses(); + if (mPerModulePasses) + mPerModulePasses->run(*mpModule); + + switch (mOT) { + case Slang::OT_Assembly: + case Slang::OT_Object: { + if (!CreateCodeGenPasses()) + return; + + mCodeGenPasses->doInitialization(); + + for (llvm::Module::iterator I = mpModule->begin(), E = mpModule->end(); + I != E; + I++) + if (!I->isDeclaration()) + mCodeGenPasses->run(*I); + + mCodeGenPasses->doFinalization(); + break; + } + case Slang::OT_LLVMAssembly: { + llvm::legacy::PassManager *LLEmitPM = new llvm::legacy::PassManager(); + LLEmitPM->add(llvm::createPrintModulePass(mBufferOutStream)); + LLEmitPM->run(*mpModule); + break; + } + case Slang::OT_Bitcode: { + writeBitcode(mBufferOutStream, *mpModule, getTargetAPI(), + mCodeGenOpts.OptimizationLevel, mCodeGenOpts.getDebugInfo()); + break; + } + case Slang::OT_Nothing: { + return; + } + default: { + slangAssert(false && "Unknown output type"); + } + } +} + +void Backend::HandleTagDeclDefinition(clang::TagDecl *D) { + mGen->HandleTagDeclDefinition(D); +} + +void Backend::CompleteTentativeDefinition(clang::VarDecl *D) { + mGen->CompleteTentativeDefinition(D); +} + +Backend::~Backend() { + delete mpModule; + delete mGen; + delete mPerFunctionPasses; + delete mPerModulePasses; + delete mCodeGenPasses; +} + +// 1) Add zero initialization of local RS object types +void Backend::AnnotateFunction(clang::FunctionDecl *FD) { + if (FD && + FD->hasBody() && + !Slang::IsLocInRSHeaderFile(FD->getLocation(), mSourceMgr)) { + mRefCount.Init(); + mRefCount.SetDeclContext(FD); + mRefCount.Visit(FD->getBody()); + } +} + +bool Backend::HandleTopLevelDecl(clang::DeclGroupRef D) { + // Find and remember the types for rs_allocation and rs_script_call_t so + // they can be used later for translating rsForEach() calls. + for (clang::DeclGroupRef::iterator I = D.begin(), E = D.end(); + (mContext->getAllocationType().isNull() || + mContext->getScriptCallType().isNull()) && + I != E; I++) { + if (clang::TypeDecl* TD = llvm::dyn_cast<clang::TypeDecl>(*I)) { + clang::StringRef TypeName = TD->getName(); + if (TypeName.equals("rs_allocation")) { + mContext->setAllocationType(TD); + } else if (TypeName.equals("rs_script_call_t")) { + mContext->setScriptCallType(TD); + } + } + } + + // Disallow user-defined functions with prefix "rs" + if (!mAllowRSPrefix) { + // Iterate all function declarations in the program. + for (clang::DeclGroupRef::iterator I = D.begin(), E = D.end(); + I != E; I++) { + clang::FunctionDecl *FD = llvm::dyn_cast<clang::FunctionDecl>(*I); + if (FD == nullptr) + continue; + if (!FD->getName().startswith("rs")) // Check prefix + continue; + if (!Slang::IsLocInRSHeaderFile(FD->getLocation(), mSourceMgr)) + mContext->ReportError(FD->getLocation(), + "invalid function name prefix, " + "\"rs\" is reserved: '%0'") + << FD->getName(); + } + } + + for (clang::DeclGroupRef::iterator I = D.begin(), E = D.end(); I != E; I++) { + clang::FunctionDecl *FD = llvm::dyn_cast<clang::FunctionDecl>(*I); + if (FD) { + // Handle forward reference from pragma (see + // RSReducePragmaHandler::HandlePragma for backward reference). + mContext->markUsedByReducePragma(FD, RSContext::CheckNameYes); + if (FD->isGlobal()) { + // Check that we don't have any array parameters being misinterpreted as + // kernel pointers due to the C type system's array to pointer decay. + size_t numParams = FD->getNumParams(); + for (size_t i = 0; i < numParams; i++) { + const clang::ParmVarDecl *PVD = FD->getParamDecl(i); + clang::QualType QT = PVD->getOriginalType(); + if (QT->isArrayType()) { + mContext->ReportError( + PVD->getTypeSpecStartLoc(), + "exported function parameters may not have array type: %0") + << QT; + } + } + AnnotateFunction(FD); + } + } + + if (getTargetAPI() >= SLANG_FEATURE_SINGLE_SOURCE_API) { + if (FD && FD->hasBody() && + !Slang::IsLocInRSHeaderFile(FD->getLocation(), mSourceMgr)) { + if (FD->hasAttr<clang::KernelAttr>()) { + // Log functions with attribute "kernel" by their names, and assign + // them slot numbers. Any other function cannot be used in a + // rsForEach() or rsForEachWithOptions() call, including old-style + // kernel functions which are defined without the "kernel" attribute. + mContext->addForEach(FD); + } + // Look for any kernel launch calls and translate them into using the + // internal API. + // Report a compiler error on kernel launches inside a kernel. + mForEachHandler.handleForEachCalls(FD, getTargetAPI()); + } + } + } + + return mGen->HandleTopLevelDecl(D); +} + +void Backend::HandleTranslationUnitPre(clang::ASTContext &C) { + clang::TranslationUnitDecl *TUDecl = C.getTranslationUnitDecl(); + + if (!mContext->processReducePragmas(this)) + return; + + // If we have an invalid RS/FS AST, don't check further. + if (!mASTChecker.Validate()) { + return; + } + + if (mIsFilterscript) { + mContext->addPragma("rs_fp_relaxed", ""); + } + + int version = mContext->getVersion(); + if (version == 0) { + // Not setting a version is an error + mDiagEngine.Report( + mSourceMgr.getLocForEndOfFile(mSourceMgr.getMainFileID()), + mDiagEngine.getCustomDiagID( + clang::DiagnosticsEngine::Error, + "missing pragma for version in source file")); + } else { + slangAssert(version == 1); + } + + if (mContext->getReflectJavaPackageName().empty()) { + mDiagEngine.Report( + mSourceMgr.getLocForEndOfFile(mSourceMgr.getMainFileID()), + mDiagEngine.getCustomDiagID(clang::DiagnosticsEngine::Error, + "missing \"#pragma rs " + "java_package_name(com.foo.bar)\" " + "in source file")); + return; + } + + // Create a static global destructor if necessary (to handle RS object + // runtime cleanup). + clang::FunctionDecl *FD = mRefCount.CreateStaticGlobalDtor(); + if (FD) { + HandleTopLevelDecl(clang::DeclGroupRef(FD)); + } + + // Process any static function declarations + for (clang::DeclContext::decl_iterator I = TUDecl->decls_begin(), + E = TUDecl->decls_end(); I != E; I++) { + if ((I->getKind() >= clang::Decl::firstFunction) && + (I->getKind() <= clang::Decl::lastFunction)) { + clang::FunctionDecl *FD = llvm::dyn_cast<clang::FunctionDecl>(*I); + if (FD && !FD->isGlobal()) { + AnnotateFunction(FD); + } + } + } +} + +/////////////////////////////////////////////////////////////////////////////// +void Backend::dumpExportVarInfo(llvm::Module *M) { + int slotCount = 0; + if (mExportVarMetadata == nullptr) + mExportVarMetadata = M->getOrInsertNamedMetadata(RS_EXPORT_VAR_MN); + + llvm::SmallVector<llvm::Metadata *, 2> ExportVarInfo; + + // We emit slot information (#rs_object_slots) for any reference counted + // RS type or pointer (which can also be bound). + + for (RSContext::const_export_var_iterator I = mContext->export_vars_begin(), + E = mContext->export_vars_end(); + I != E; + I++) { + const RSExportVar *EV = *I; + const RSExportType *ET = EV->getType(); + bool countsAsRSObject = false; + + // Variable name + ExportVarInfo.push_back( + llvm::MDString::get(mLLVMContext, EV->getName().c_str())); + + // Type name + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + const RSExportPrimitiveType *PT = + static_cast<const RSExportPrimitiveType*>(ET); + ExportVarInfo.push_back( + llvm::MDString::get( + mLLVMContext, llvm::utostr_32(PT->getType()))); + if (PT->isRSObjectType()) { + countsAsRSObject = true; + } + break; + } + case RSExportType::ExportClassPointer: { + ExportVarInfo.push_back( + llvm::MDString::get( + mLLVMContext, ("*" + static_cast<const RSExportPointerType*>(ET) + ->getPointeeType()->getName()).c_str())); + break; + } + case RSExportType::ExportClassMatrix: { + ExportVarInfo.push_back( + llvm::MDString::get( + mLLVMContext, llvm::utostr_32( + /* TODO Strange value. This pushes just a number, quite + * different than the other cases. What is this used for? + * These are the metadata values that some partner drivers + * want to reference (for TBAA, etc.). We may want to look + * at whether these provide any reasonable value (or have + * distinct enough values to actually depend on). + */ + DataTypeRSMatrix2x2 + + static_cast<const RSExportMatrixType*>(ET)->getDim() - 2))); + break; + } + case RSExportType::ExportClassVector: + case RSExportType::ExportClassConstantArray: + case RSExportType::ExportClassRecord: { + ExportVarInfo.push_back( + llvm::MDString::get(mLLVMContext, + EV->getType()->getName().c_str())); + break; + } + } + + mExportVarMetadata->addOperand( + llvm::MDNode::get(mLLVMContext, ExportVarInfo)); + ExportVarInfo.clear(); + + if (mRSObjectSlotsMetadata == nullptr) { + mRSObjectSlotsMetadata = + M->getOrInsertNamedMetadata(RS_OBJECT_SLOTS_MN); + } + + if (countsAsRSObject) { + mRSObjectSlotsMetadata->addOperand(llvm::MDNode::get(mLLVMContext, + llvm::MDString::get(mLLVMContext, llvm::utostr_32(slotCount)))); + } + + slotCount++; + } +} + +void Backend::dumpExportFunctionInfo(llvm::Module *M) { + if (mExportFuncMetadata == nullptr) + mExportFuncMetadata = + M->getOrInsertNamedMetadata(RS_EXPORT_FUNC_MN); + + llvm::SmallVector<llvm::Metadata *, 1> ExportFuncInfo; + + for (RSContext::const_export_func_iterator + I = mContext->export_funcs_begin(), + E = mContext->export_funcs_end(); + I != E; + I++) { + const RSExportFunc *EF = *I; + + // Function name + if (!EF->hasParam()) { + ExportFuncInfo.push_back(llvm::MDString::get(mLLVMContext, + EF->getName().c_str())); + } else { + llvm::Function *F = M->getFunction(EF->getName()); + llvm::Function *HelperFunction; + const std::string HelperFunctionName(".helper_" + EF->getName()); + + slangAssert(F && "Function marked as exported disappeared in Bitcode"); + + // Create helper function + { + llvm::StructType *HelperFunctionParameterTy = nullptr; + std::vector<bool> isStructInput; + + if (!F->getArgumentList().empty()) { + std::vector<llvm::Type*> HelperFunctionParameterTys; + for (llvm::Function::arg_iterator AI = F->arg_begin(), + AE = F->arg_end(); AI != AE; AI++) { + if (AI->getType()->isPointerTy() && AI->getType()->getPointerElementType()->isStructTy()) { + HelperFunctionParameterTys.push_back(AI->getType()->getPointerElementType()); + isStructInput.push_back(true); + } else { + HelperFunctionParameterTys.push_back(AI->getType()); + isStructInput.push_back(false); + } + } + HelperFunctionParameterTy = + llvm::StructType::get(mLLVMContext, HelperFunctionParameterTys); + } + + if (!EF->checkParameterPacketType(HelperFunctionParameterTy)) { + fprintf(stderr, "Failed to export function %s: parameter type " + "mismatch during creation of helper function.\n", + EF->getName().c_str()); + + const RSExportRecordType *Expected = EF->getParamPacketType(); + if (Expected) { + fprintf(stderr, "Expected:\n"); + Expected->getLLVMType()->dump(); + } + if (HelperFunctionParameterTy) { + fprintf(stderr, "Got:\n"); + HelperFunctionParameterTy->dump(); + } + } + + std::vector<llvm::Type*> Params; + if (HelperFunctionParameterTy) { + llvm::PointerType *HelperFunctionParameterTyP = + llvm::PointerType::getUnqual(HelperFunctionParameterTy); + Params.push_back(HelperFunctionParameterTyP); + } + + llvm::FunctionType * HelperFunctionType = + llvm::FunctionType::get(F->getReturnType(), + Params, + /* IsVarArgs = */false); + + HelperFunction = + llvm::Function::Create(HelperFunctionType, + llvm::GlobalValue::ExternalLinkage, + HelperFunctionName, + M); + + HelperFunction->addFnAttr(llvm::Attribute::NoInline); + HelperFunction->setCallingConv(F->getCallingConv()); + + // Create helper function body + { + llvm::Argument *HelperFunctionParameter = + &(*HelperFunction->arg_begin()); + llvm::BasicBlock *BB = + llvm::BasicBlock::Create(mLLVMContext, "entry", HelperFunction); + llvm::IRBuilder<> *IB = new llvm::IRBuilder<>(BB); + llvm::SmallVector<llvm::Value*, 6> Params; + llvm::Value *Idx[2]; + + Idx[0] = + llvm::ConstantInt::get(llvm::Type::getInt32Ty(mLLVMContext), 0); + + // getelementptr and load instruction for all elements in + // parameter .p + for (size_t i = 0; i < EF->getNumParameters(); i++) { + // getelementptr + Idx[1] = llvm::ConstantInt::get( + llvm::Type::getInt32Ty(mLLVMContext), i); + + llvm::Value *Ptr = NULL; + + Ptr = IB->CreateInBoundsGEP(HelperFunctionParameter, Idx); + + // Load is only required for non-struct ptrs + if (isStructInput[i]) { + Params.push_back(Ptr); + } else { + llvm::Value *V = IB->CreateLoad(Ptr); + Params.push_back(V); + } + } + + // Call and pass the all elements as parameter to F + llvm::CallInst *CI = IB->CreateCall(F, Params); + + CI->setCallingConv(F->getCallingConv()); + + if (F->getReturnType() == llvm::Type::getVoidTy(mLLVMContext)) { + IB->CreateRetVoid(); + } else { + IB->CreateRet(CI); + } + + delete IB; + } + } + + ExportFuncInfo.push_back( + llvm::MDString::get(mLLVMContext, HelperFunctionName.c_str())); + } + + mExportFuncMetadata->addOperand( + llvm::MDNode::get(mLLVMContext, ExportFuncInfo)); + ExportFuncInfo.clear(); + } +} + +void Backend::dumpExportForEachInfo(llvm::Module *M) { + if (mExportForEachNameMetadata == nullptr) { + mExportForEachNameMetadata = + M->getOrInsertNamedMetadata(RS_EXPORT_FOREACH_NAME_MN); + } + if (mExportForEachSignatureMetadata == nullptr) { + mExportForEachSignatureMetadata = + M->getOrInsertNamedMetadata(RS_EXPORT_FOREACH_MN); + } + + llvm::SmallVector<llvm::Metadata *, 1> ExportForEachName; + llvm::SmallVector<llvm::Metadata *, 1> ExportForEachInfo; + + for (RSContext::const_export_foreach_iterator + I = mContext->export_foreach_begin(), + E = mContext->export_foreach_end(); + I != E; + I++) { + const RSExportForEach *EFE = *I; + + ExportForEachName.push_back( + llvm::MDString::get(mLLVMContext, EFE->getName().c_str())); + + mExportForEachNameMetadata->addOperand( + llvm::MDNode::get(mLLVMContext, ExportForEachName)); + ExportForEachName.clear(); + + ExportForEachInfo.push_back( + llvm::MDString::get(mLLVMContext, + llvm::utostr_32(EFE->getSignatureMetadata()))); + + mExportForEachSignatureMetadata->addOperand( + llvm::MDNode::get(mLLVMContext, ExportForEachInfo)); + ExportForEachInfo.clear(); + } +} + +void Backend::dumpExportReduceInfo(llvm::Module *M) { + if (!mExportReduceMetadata) { + mExportReduceMetadata = + M->getOrInsertNamedMetadata(RS_EXPORT_REDUCE_MN); + } + + llvm::SmallVector<llvm::Metadata *, 6> ExportReduceInfo; + // Add operand to ExportReduceInfo, padding out missing operands with + // nullptr. + auto addOperand = [&ExportReduceInfo](uint32_t Idx, llvm::Metadata *N) { + while (Idx > ExportReduceInfo.size()) + ExportReduceInfo.push_back(nullptr); + ExportReduceInfo.push_back(N); + }; + // Add string operand to ExportReduceInfo, padding out missing operands + // with nullptr. + // If string is empty, then do not add it unless Always is true. + auto addString = [&addOperand, this](uint32_t Idx, const std::string &S, + bool Always = true) { + if (Always || !S.empty()) + addOperand(Idx, llvm::MDString::get(mLLVMContext, S)); + }; + + // Add the description of the reduction kernels to the metadata node. + for (auto I = mContext->export_reduce_begin(), + E = mContext->export_reduce_end(); + I != E; ++I) { + ExportReduceInfo.clear(); + + int Idx = 0; + + addString(Idx++, (*I)->getNameReduce()); + + addOperand(Idx++, llvm::MDString::get(mLLVMContext, llvm::utostr_32((*I)->getAccumulatorTypeSize()))); + + llvm::SmallVector<llvm::Metadata *, 2> Accumulator; + Accumulator.push_back( + llvm::MDString::get(mLLVMContext, (*I)->getNameAccumulator())); + Accumulator.push_back(llvm::MDString::get( + mLLVMContext, + llvm::utostr_32((*I)->getAccumulatorSignatureMetadata()))); + addOperand(Idx++, llvm::MDTuple::get(mLLVMContext, Accumulator)); + + addString(Idx++, (*I)->getNameInitializer(), false); + addString(Idx++, (*I)->getNameCombiner(), false); + addString(Idx++, (*I)->getNameOutConverter(), false); + addString(Idx++, (*I)->getNameHalter(), false); + + mExportReduceMetadata->addOperand( + llvm::MDTuple::get(mLLVMContext, ExportReduceInfo)); + } +} + +void Backend::dumpExportTypeInfo(llvm::Module *M) { + llvm::SmallVector<llvm::Metadata *, 1> ExportTypeInfo; + + for (RSContext::const_export_type_iterator + I = mContext->export_types_begin(), + E = mContext->export_types_end(); + I != E; + I++) { + // First, dump type name list to export + const RSExportType *ET = I->getValue(); + + ExportTypeInfo.clear(); + // Type name + ExportTypeInfo.push_back( + llvm::MDString::get(mLLVMContext, ET->getName().c_str())); + + if (ET->getClass() == RSExportType::ExportClassRecord) { + const RSExportRecordType *ERT = + static_cast<const RSExportRecordType*>(ET); + + if (mExportTypeMetadata == nullptr) + mExportTypeMetadata = + M->getOrInsertNamedMetadata(RS_EXPORT_TYPE_MN); + + mExportTypeMetadata->addOperand( + llvm::MDNode::get(mLLVMContext, ExportTypeInfo)); + + // Now, export struct field information to %[struct name] + std::string StructInfoMetadataName("%"); + StructInfoMetadataName.append(ET->getName()); + llvm::NamedMDNode *StructInfoMetadata = + M->getOrInsertNamedMetadata(StructInfoMetadataName); + llvm::SmallVector<llvm::Metadata *, 3> FieldInfo; + + slangAssert(StructInfoMetadata->getNumOperands() == 0 && + "Metadata with same name was created before"); + for (RSExportRecordType::const_field_iterator FI = ERT->fields_begin(), + FE = ERT->fields_end(); + FI != FE; + FI++) { + const RSExportRecordType::Field *F = *FI; + + // 1. field name + FieldInfo.push_back(llvm::MDString::get(mLLVMContext, + F->getName().c_str())); + + // 2. field type name + FieldInfo.push_back( + llvm::MDString::get(mLLVMContext, + F->getType()->getName().c_str())); + + StructInfoMetadata->addOperand( + llvm::MDNode::get(mLLVMContext, FieldInfo)); + FieldInfo.clear(); + } + } // ET->getClass() == RSExportType::ExportClassRecord + } +} + +void Backend::HandleTranslationUnitPost(llvm::Module *M) { + + if (!mContext->is64Bit()) { + M->setDataLayout("e-p:32:32-i64:64-v128:64:128-n32-S64"); + } + + if (!mContext->processExports()) + return; + + if (mContext->hasExportVar()) + dumpExportVarInfo(M); + + if (mContext->hasExportFunc()) + dumpExportFunctionInfo(M); + + if (mContext->hasExportForEach()) + dumpExportForEachInfo(M); + + if (mContext->hasExportReduce()) + dumpExportReduceInfo(M); + + if (mContext->hasExportType()) + dumpExportTypeInfo(M); +} + +} // namespace slang
diff --git a/slang/slang_backend.h b/slang/slang_backend.h new file mode 100644 index 0000000..38aa1e4 --- /dev/null +++ b/slang/slang_backend.h
@@ -0,0 +1,198 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_BACKEND_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_BACKEND_H_ + +#include "clang/AST/ASTConsumer.h" + +#include "llvm/IR/LegacyPassManager.h" + +#include "llvm/Support/raw_ostream.h" + +#include "slang.h" +#include "slang_pragma_list.h" +#include "slang_rs_check_ast.h" +#include "slang_rs_foreach_lowering.h" +#include "slang_rs_object_ref_count.h" +#include "slang_version.h" + +namespace llvm { + class buffer_ostream; + class LLVMContext; + class NamedMDNode; + class Module; +} + +namespace clang { + class ASTConsumer; + class ASTContext; + class CodeGenOptions; + class CodeGenerator; + class DeclGroupRef; + class DiagnosticsEngine; + class FunctionDecl; + class HeaderSearchOptions; + class PreprocessorOptions; + class TagDecl; + class TargetOptions; + class VarDecl; +} + +namespace slang { + +class RSContext; + +class Backend : public clang::ASTConsumer { + private: + const clang::TargetOptions &mTargetOpts; + + llvm::Module *mpModule; + + // Output stream + llvm::raw_ostream *mpOS; + Slang::OutputType mOT; + + // This helps us translate Clang AST using into LLVM IR + clang::CodeGenerator *mGen; + + // Passes + + // Passes apply on function scope in a translation unit + llvm::legacy::FunctionPassManager *mPerFunctionPasses; + // Passes apply on module scope + llvm::legacy::PassManager *mPerModulePasses; + // Passes for code emission + llvm::legacy::FunctionPassManager *mCodeGenPasses; + + llvm::buffer_ostream mBufferOutStream; + + void CreateFunctionPasses(); + void CreateModulePasses(); + bool CreateCodeGenPasses(); + + RSContext *mContext; + + clang::SourceManager &mSourceMgr; + + bool mASTPrint; + + bool mAllowRSPrefix; + + bool mIsFilterscript; + + llvm::NamedMDNode *mExportVarMetadata; + llvm::NamedMDNode *mExportFuncMetadata; + llvm::NamedMDNode *mExportForEachNameMetadata; + llvm::NamedMDNode *mExportForEachSignatureMetadata; + llvm::NamedMDNode *mExportReduceMetadata; + llvm::NamedMDNode *mExportTypeMetadata; + llvm::NamedMDNode *mRSObjectSlotsMetadata; + + RSObjectRefCount mRefCount; + + RSCheckAST mASTChecker; + + RSForEachLowering mForEachHandler; + + void AnnotateFunction(clang::FunctionDecl *FD); + + void dumpExportVarInfo(llvm::Module *M); + void dumpExportFunctionInfo(llvm::Module *M); + void dumpExportForEachInfo(llvm::Module *M); + void dumpExportReduceInfo(llvm::Module *M); + void dumpExportTypeInfo(llvm::Module *M); + + // Translates any rsForEach() or rsForEachWithOptions() calls inside the body + // of FD to lower-level runtime calls to rsForEachInternal(), if FD is not a + // kernel function itself, as indicated by isKernel being false. If isKernel + // is true, reports an error on any calls to rsForEach() or + // rsForEachWithOptions(). + void LowerRSForEachCall(clang::FunctionDecl* FD, bool isKernel); + + protected: + llvm::LLVMContext &mLLVMContext; + clang::DiagnosticsEngine &mDiagEngine; + const clang::CodeGenOptions &mCodeGenOpts; + + PragmaList *mPragmas; + + unsigned int getTargetAPI() const { return mContext->getTargetAPI(); } + + // TODO These are no longer virtual from base. Look into merging into caller. + + // This handler will be invoked before Clang translates @Ctx to LLVM IR. This + // give you an opportunity to modified the IR in AST level (scope information, + // unoptimized IR, etc.). After the return from this method, slang will start + // translate @Ctx into LLVM IR. One should not operate on @Ctx afterwards + // since the changes applied on that never reflects to the LLVM module used + // in the final codegen. + void HandleTranslationUnitPre(clang::ASTContext &Ctx); + + // This handler will be invoked when Clang have converted AST tree to LLVM IR. + // The @M contains the resulting LLVM IR tree. After the return from this + // method, slang will start doing optimization and code generation for @M. + void HandleTranslationUnitPost(llvm::Module *M); + + public: + Backend(RSContext *Context, + clang::DiagnosticsEngine *DiagEngine, + const RSCCOptions &Opts, + const clang::HeaderSearchOptions &HeaderSearchOpts, + const clang::PreprocessorOptions &PreprocessorOpts, + const clang::CodeGenOptions &CodeGenOpts, + const clang::TargetOptions &TargetOpts, + PragmaList *Pragmas, + llvm::raw_ostream *OS, + Slang::OutputType OT, + clang::SourceManager &SourceMgr, + bool AllowRSPrefix, + bool IsFilterscript); + + virtual ~Backend(); + + // Initialize - This is called to initialize the consumer, providing the + // ASTContext. + void Initialize(clang::ASTContext &Ctx) override; + + // TODO Clean up what should be private, protected + // TODO Also clean up the include files + + // HandleTopLevelDecl - Handle the specified top-level declaration. This is + // called by the parser to process every top-level Decl*. Note that D can be + // the head of a chain of Decls (e.g. for `int a, b` the chain will have two + // elements). Use Decl::getNextDeclarator() to walk the chain. + bool HandleTopLevelDecl(clang::DeclGroupRef D) override; + + // HandleTranslationUnit - This method is called when the ASTs for entire + // translation unit have been parsed. + void HandleTranslationUnit(clang::ASTContext &Ctx) override; + + // HandleTagDeclDefinition - This callback is invoked each time a TagDecl + // (e.g. struct, union, enum, class) is completed. This allows the client to + // hack on the type, which can occur at any point in the file (because these + // can be defined in declspecs). + void HandleTagDeclDefinition(clang::TagDecl *D) override; + + // CompleteTentativeDefinition - Callback invoked at the end of a translation + // unit to notify the consumer that the given tentative definition should be + // completed. + void CompleteTentativeDefinition(clang::VarDecl *D) override; +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_BACKEND_H_ NOLINT
diff --git a/slang/slang_bitcode_gen.cpp b/slang/slang_bitcode_gen.cpp new file mode 100644 index 0000000..dc0eb8d --- /dev/null +++ b/slang/slang_bitcode_gen.cpp
@@ -0,0 +1,103 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bcinfo/BitcodeWrapper.h" + +#include "llvm/Support/raw_ostream.h" + +#include "BitWriter_2_9/ReaderWriter_2_9.h" +#include "BitWriter_2_9_func/ReaderWriter_2_9_func.h" +#include "BitWriter_3_2/ReaderWriter_3_2.h" + +#include "slang_assert.h" +#include "slang_bitcode_gen.h" +#include "slang_version.h" +#include "llvm/Bitcode/ReaderWriter.h" + +namespace slang { + +void writeBitcode(llvm::raw_ostream &Out, + const llvm::Module &M, + uint32_t TargetAPI, + uint32_t OptimizationLevel, + bool GenerateDebugInfo) { + std::string BitcodeStr; + llvm::raw_string_ostream Bitcode(BitcodeStr); + + // The older bitcode writers will produce invalid bitcode if the -g + // flag is set using WriteBitcodeToFile. As such we use the ToT writer + // when -g is set. However, this will produce a bitcode file linked to + // this version of LLVM as the debug info format can change between + // versions. + // If bcc receives a bitcode file with a format of debug info + // which is either ahead or behind the version it is expecting it will + // fail the verification stage. Failing this stage results in the bitcode + // loader returning null and the compiler will terminate abruptly. Bitcode + // files with debug info are as such only capable of targeting devices with + // LLVM libraries with the same debug info version as the version of slang + // which was used to compile the file. This is due to the fact that LLVM + // offers no backwards or forwards compatibility guarantee for its debug + // bitcode. At the moment the only practical guarantee which can be made + // is that the debug bitcode emitted by any slang will work with the bcc + // version which was newest at the time when llvm-rs-cc was built. + if (GenerateDebugInfo) { + llvm::WriteBitcodeToFile(&M, Bitcode); + } else { + // Create the bitcode. + switch (TargetAPI) { + case SLANG_HC_TARGET_API: + case SLANG_HC_MR1_TARGET_API: + case SLANG_HC_MR2_TARGET_API: { + // Pre-ICS targets must use the LLVM 2.9 BitcodeWriter + llvm_2_9::WriteBitcodeToFile(&M, Bitcode); + break; + } + case SLANG_ICS_TARGET_API: + case SLANG_ICS_MR1_TARGET_API: { + // ICS targets must use the LLVM 2.9_func BitcodeWriter + llvm_2_9_func::WriteBitcodeToFile(&M, Bitcode); + break; + } + default: { + if (TargetAPI != SLANG_DEVELOPMENT_TARGET_API && + (TargetAPI < SLANG_MINIMUM_TARGET_API || + TargetAPI > SLANG_MAXIMUM_TARGET_API)) { + slangAssert(false && "Invalid target API value"); + } + // Switch to the 3.2 BitcodeWriter by default, and don't use + // LLVM's included BitcodeWriter at all (for now). + llvm_3_2::WriteBitcodeToFile(&M, Bitcode); + break; + } + } + } + + const uint32_t CompilerVersion = SlangVersion::CURRENT; + + // Create the bitcode wrapper. + bcinfo::AndroidBitcodeWrapper Wrapper; + size_t ActualWrapperLen = bcinfo::writeAndroidBitcodeWrapper( + &Wrapper, Bitcode.str().length(), TargetAPI, + CompilerVersion, OptimizationLevel); + + slangAssert(ActualWrapperLen > 0); + + // Write out the file. + Out.write(reinterpret_cast<char*>(&Wrapper), ActualWrapperLen); + Out << Bitcode.str(); +} + +} // namespace slang
diff --git a/slang/slang_bitcode_gen.h b/slang/slang_bitcode_gen.h new file mode 100644 index 0000000..b1f97c9 --- /dev/null +++ b/slang/slang_bitcode_gen.h
@@ -0,0 +1,39 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_BITCODE_GEN_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_BITCODE_GEN_H_ + +#include <cstdint> + +namespace llvm { + class raw_ostream; + class Module; +} + +namespace slang { + +// Write out the LLVM bitcode for a module, encased in a wrapper +// containing RS version information. +void writeBitcode(llvm::raw_ostream &Out, + const llvm::Module &M, + uint32_t TargetAPI, + uint32_t OptimizationLevel, + bool GenerateDebugInfo); + +} // end namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_BITCODE_GEN_H_ NOLINT
diff --git a/slang/slang_diagnostic_buffer.cpp b/slang/slang_diagnostic_buffer.cpp new file mode 100644 index 0000000..d6afabf --- /dev/null +++ b/slang/slang_diagnostic_buffer.cpp
@@ -0,0 +1,81 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_diagnostic_buffer.h" + +#include "clang/Basic/SourceLocation.h" +#include "clang/Basic/SourceManager.h" + +#include "llvm/ADT/SmallString.h" + +#include "slang_assert.h" + +namespace slang { + +DiagnosticBuffer::DiagnosticBuffer() + : mSOS(new llvm::raw_string_ostream(mDiags)) { +} + +DiagnosticBuffer::~DiagnosticBuffer() { +} + +void DiagnosticBuffer::HandleDiagnostic( + clang::DiagnosticsEngine::Level DiagLevel, + clang::Diagnostic const &Info) { + clang::SourceLocation const &SrcLoc = Info.getLocation(); + + std::string Message; + llvm::raw_string_ostream stream(Message); + + if (SrcLoc.isValid()) { + SrcLoc.print(stream, Info.getSourceManager()); + stream << ": "; + } + + switch (DiagLevel) { + case clang::DiagnosticsEngine::Note: { + stream << "note: "; + break; + } + case clang::DiagnosticsEngine::Warning: { + stream << "warning: "; + break; + } + case clang::DiagnosticsEngine::Error: { + stream << "error: "; + break; + } + case clang::DiagnosticsEngine::Fatal: { + stream << "fatal: "; + break; + } + default: { + slangAssert(0 && "Diagnostic not handled during diagnostic buffering!"); + } + } + // 100 is enough for storing general diagnosis Message + llvm::SmallString<100> Buf; + Info.FormatDiagnostic(Buf); + stream << Buf.str() << '\n'; + stream.flush(); + + if (mIncludedMessages.find(Message) == mIncludedMessages.end()) { + mIncludedMessages.insert(Message); + (*mSOS) << Message; + } +} + +} // namespace slang
diff --git a/slang/slang_diagnostic_buffer.h b/slang/slang_diagnostic_buffer.h new file mode 100644 index 0000000..500f345 --- /dev/null +++ b/slang/slang_diagnostic_buffer.h
@@ -0,0 +1,64 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_DIAGNOSTIC_BUFFER_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_DIAGNOSTIC_BUFFER_H_ + +#include <set> +#include <string> + +#include "clang/Basic/Diagnostic.h" + +#include "llvm/Support/raw_ostream.h" + +namespace llvm { + class raw_string_ostream; +} + +namespace slang { + +// The diagnostics consumer instance (for reading the processed diagnostics) +class DiagnosticBuffer : public clang::DiagnosticConsumer { +private: + // We keed track of the messages that have been already added to this + // diagnostic buffer, to avoid duplicates. This can happen because for a + // given script we'll usually compile for both 32 and 64 bit targets. + std::set<std::string> mIncludedMessages; + std::string mDiags; + std::unique_ptr<llvm::raw_string_ostream> mSOS; + +public: + DiagnosticBuffer(); + virtual ~DiagnosticBuffer(); + + virtual void HandleDiagnostic(clang::DiagnosticsEngine::Level DiagLevel, + const clang::Diagnostic &Info) override; + + inline const std::string &str() const { + mSOS->flush(); + return mDiags; + } + + inline void reset() { + mIncludedMessages.clear(); + mSOS.reset(); + mDiags.clear(); + } +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_DIAGNOSTIC_BUFFER_H_ NOLINT
diff --git a/slang/slang_pragma_list.h b/slang/slang_pragma_list.h new file mode 100644 index 0000000..a972b56 --- /dev/null +++ b/slang/slang_pragma_list.h
@@ -0,0 +1,30 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_PRAGMA_LIST_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_PRAGMA_LIST_H_ + +#include <list> +#include <string> +#include <utility> + +namespace slang { + +typedef std::list< std::pair<std::string, std::string> > PragmaList; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_PRAGMA_LIST_H_ NOLINT
diff --git a/slang/slang_rs_ast_replace.cpp b/slang/slang_rs_ast_replace.cpp new file mode 100644 index 0000000..92e1428 --- /dev/null +++ b/slang/slang_rs_ast_replace.cpp
@@ -0,0 +1,169 @@ +/* + * Copyright 2011, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_ast_replace.h" + +#include "slang_assert.h" + +#include "llvm/Support/Casting.h" + +namespace slang { + +void RSASTReplace::ReplaceStmt( + clang::Stmt *OuterStmt, + clang::Stmt *OldStmt, + clang::Stmt *NewStmt) { + mOldStmt = OldStmt; + mNewStmt = NewStmt; + mOuterStmt = OuterStmt; + + // This simplifies use in various Stmt visitor passes where the only + // valid type is an Expr. + mOldExpr = llvm::dyn_cast<clang::Expr>(OldStmt); + if (mOldExpr) { + mNewExpr = llvm::dyn_cast<clang::Expr>(NewStmt); + } + Visit(mOuterStmt); +} + +void RSASTReplace::ReplaceInCompoundStmt(clang::CompoundStmt *CS) { + clang::Stmt **UpdatedStmtList = new clang::Stmt*[CS->size()]; + + unsigned UpdatedStmtCount = 0; + clang::CompoundStmt::body_iterator bI = CS->body_begin(); + clang::CompoundStmt::body_iterator bE = CS->body_end(); + + for ( ; bI != bE; bI++) { + if (matchesStmt(*bI)) { + UpdatedStmtList[UpdatedStmtCount++] = mNewStmt; + } else { + UpdatedStmtList[UpdatedStmtCount++] = *bI; + } + } + + CS->setStmts(C, llvm::makeArrayRef(UpdatedStmtList, UpdatedStmtCount)); + + delete [] UpdatedStmtList; +} + +void RSASTReplace::VisitStmt(clang::Stmt *S) { + // This function does the actual iteration through all sub-Stmt's within + // a given Stmt. Note that this function is skipped by all of the other + // Visit* functions if we have already found a higher-level match. + for (clang::Stmt::child_iterator I = S->child_begin(), E = S->child_end(); + I != E; + I++) { + if (clang::Stmt *Child = *I) { + if (!matchesStmt(Child)) { + Visit(Child); + } + } + } +} + +void RSASTReplace::VisitCompoundStmt(clang::CompoundStmt *CS) { + VisitStmt(CS); + ReplaceInCompoundStmt(CS); +} + +void RSASTReplace::VisitCaseStmt(clang::CaseStmt *CS) { + if (matchesStmt(CS->getSubStmt())) { + CS->setSubStmt(mNewStmt); + } else { + VisitStmt(CS); + } +} + +void RSASTReplace::VisitDeclStmt(clang::DeclStmt* DS) { + VisitStmt(DS); + for (clang::Decl* D : DS->decls()) { + clang::VarDecl* VD; + if ((VD = llvm::dyn_cast<clang::VarDecl>(D))) { + if (matchesExpr(VD->getInit())) { + VD->setInit(mNewExpr); + } + } + } +} + +void RSASTReplace::VisitDefaultStmt(clang::DefaultStmt *DS) { + if (matchesStmt(DS->getSubStmt())) { + DS->setSubStmt(mNewStmt); + } else { + VisitStmt(DS); + } +} + +void RSASTReplace::VisitDoStmt(clang::DoStmt *DS) { + if (matchesExpr(DS->getCond())) { + DS->setCond(mNewExpr); + } else if (matchesStmt(DS->getBody())) { + DS->setBody(mNewStmt); + } else { + VisitStmt(DS); + } +} + +void RSASTReplace::VisitForStmt(clang::ForStmt *FS) { + if (matchesStmt(FS->getInit())) { + FS->setInit(mNewStmt); + } else if (matchesExpr(FS->getCond())) { + FS->setCond(mNewExpr); + } else if (matchesExpr(FS->getInc())) { + FS->setInc(mNewExpr); + } else if (matchesStmt(FS->getBody())) { + FS->setBody(mNewStmt); + } else { + VisitStmt(FS); + } +} + +void RSASTReplace::VisitIfStmt(clang::IfStmt *IS) { + if (matchesExpr(IS->getCond())) { + IS->setCond(mNewExpr); + } else if (matchesStmt(IS->getThen())) { + IS->setThen(mNewStmt); + } else if (matchesStmt(IS->getElse())) { + IS->setElse(mNewStmt); + } else { + VisitStmt(IS); + } +} + +void RSASTReplace::VisitSwitchCase(clang::SwitchCase *SC) { + slangAssert(false && "Both case and default have specialized handlers"); + VisitStmt(SC); +} + +void RSASTReplace::VisitSwitchStmt(clang::SwitchStmt *SS) { + if (matchesExpr(SS->getCond())) { + SS->setCond(mNewExpr); + } else { + VisitStmt(SS); + } +} + +void RSASTReplace::VisitWhileStmt(clang::WhileStmt *WS) { + if (matchesExpr(WS->getCond())) { + WS->setCond(mNewExpr); + } else if (matchesStmt(WS->getBody())) { + WS->setBody(mNewStmt); + } else { + VisitStmt(WS); + } +} + +} // namespace slang
diff --git a/slang/slang_rs_ast_replace.h b/slang/slang_rs_ast_replace.h new file mode 100644 index 0000000..58f9bd9 --- /dev/null +++ b/slang/slang_rs_ast_replace.h
@@ -0,0 +1,89 @@ +/* + * Copyright 2011, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_AST_REPLACE_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_AST_REPLACE_H_ + +#include "clang/AST/StmtVisitor.h" + +#include "slang_assert.h" +#include "clang/AST/ASTContext.h" + +namespace clang { + class Diagnostic; + class Expr; + class Stmt; +} + +namespace slang { + +class RSASTReplace : public clang::StmtVisitor<RSASTReplace> { + private: + const clang::ASTContext &C; + clang::Stmt *mOuterStmt; + clang::Stmt *mOldStmt; + clang::Stmt *mNewStmt; + clang::Expr *mOldExpr; + clang::Expr *mNewExpr; + + inline bool matchesExpr(const clang::Expr *E) const { + bool retVal = mOldExpr && (mOldExpr == E); + if (retVal) { + slangAssert(mNewExpr && + "Cannot replace an expression if we don't have a new expression"); + } + return retVal; + } + + inline bool matchesStmt(const clang::Stmt *S) const { + slangAssert(mOldStmt); + return mOldStmt == S; + } + + void ReplaceInCompoundStmt(clang::CompoundStmt *CS); + + public: + explicit RSASTReplace(const clang::ASTContext &Con) + : C(Con), + mOuterStmt(nullptr), + mOldStmt(nullptr), + mNewStmt(nullptr), + mOldExpr(nullptr), + mNewExpr(nullptr) { + } + + void VisitStmt(clang::Stmt *S); + void VisitCompoundStmt(clang::CompoundStmt *CS); + void VisitCaseStmt(clang::CaseStmt *CS); + void VisitDeclStmt(clang::DeclStmt* DS); + void VisitDefaultStmt(clang::DefaultStmt *DS); + void VisitDoStmt(clang::DoStmt *DS); + void VisitForStmt(clang::ForStmt *FS); + void VisitIfStmt(clang::IfStmt *IS); + void VisitSwitchCase(clang::SwitchCase *SC); + void VisitSwitchStmt(clang::SwitchStmt *SS); + void VisitWhileStmt(clang::WhileStmt *WS); + + // Replace all instances of OldStmt in OuterStmt with NewStmt. + void ReplaceStmt( + clang::Stmt *OuterStmt, + clang::Stmt *OldStmt, + clang::Stmt *NewStmt); +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_AST_REPLACE_H_ NOLINT
diff --git a/slang/slang_rs_check_ast.cpp b/slang/slang_rs_check_ast.cpp new file mode 100644 index 0000000..52626bc --- /dev/null +++ b/slang/slang_rs_check_ast.cpp
@@ -0,0 +1,324 @@ +/* + * Copyright 2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "clang/AST/Attr.h" + +#include "slang_rs_check_ast.h" + +#include "slang_assert.h" +#include "slang.h" +#include "slang_rs_export_foreach.h" +#include "slang_rs_export_reduce.h" +#include "slang_rs_export_type.h" + +namespace slang { + +void RSCheckAST::VisitStmt(clang::Stmt *S) { + // This function does the actual iteration through all sub-Stmt's within + // a given Stmt. Note that this function is skipped by all of the other + // Visit* functions if we have already found a higher-level match. + for (clang::Stmt::child_iterator I = S->child_begin(), E = S->child_end(); + I != E; + I++) { + if (clang::Stmt *Child = *I) { + Visit(Child); + } + } +} + +void RSCheckAST::WarnOnSetElementAt(clang::CallExpr *E) { + clang::FunctionDecl *Decl; + Decl = clang::dyn_cast_or_null<clang::FunctionDecl>(E->getCalleeDecl()); + + if (!Decl || Decl->getNameAsString() != std::string("rsSetElementAt")) { + return; + } + + clang::Expr *Expr; + clang::ImplicitCastExpr *ImplCast; + Expr = E->getArg(1); + ImplCast = clang::dyn_cast_or_null<clang::ImplicitCastExpr>(Expr); + + if (!ImplCast) { + return; + } + + const clang::Type *Ty; + const clang::VectorType *VectorTy; + const clang::BuiltinType *ElementTy; + Ty = ImplCast->getSubExpr()->getType()->getPointeeType() + ->getUnqualifiedDesugaredType(); + VectorTy = clang::dyn_cast_or_null<clang::VectorType>(Ty); + + if (VectorTy) { + ElementTy = clang::dyn_cast_or_null<clang::BuiltinType>( + VectorTy->getElementType()->getUnqualifiedDesugaredType()); + } else { + ElementTy = clang::dyn_cast_or_null<clang::BuiltinType>( + Ty->getUnqualifiedDesugaredType()); + } + + if (!ElementTy) { + return; + } + + // We only support vectors with 2, 3 or 4 elements. + if (VectorTy) { + switch (VectorTy->getNumElements()) { + default: + return; + case 2: + case 3: + case 4: + break; + } + } + + const char *Name; + + switch (ElementTy->getKind()) { + case clang::BuiltinType::Float: + Name = "float"; + break; + case clang::BuiltinType::Double: + Name = "double"; + break; + case clang::BuiltinType::Char_S: + Name = "char"; + break; + case clang::BuiltinType::Short: + Name = "short"; + break; + case clang::BuiltinType::Int: + Name = "int"; + break; + case clang::BuiltinType::Long: + Name = "long"; + break; + case clang::BuiltinType::UChar: + Name = "uchar"; + break; + case clang::BuiltinType::UShort: + Name = "ushort"; + break; + case clang::BuiltinType::UInt: + Name = "uint"; + break; + case clang::BuiltinType::ULong: + Name = "ulong"; + break; + default: + return; + } + + clang::DiagnosticBuilder DiagBuilder = + Context->ReportWarning(E->getLocStart(), + "untyped rsSetElementAt() can reduce performance. " + "Use rsSetElementAt_%0%1() instead."); + DiagBuilder << Name; + + if (VectorTy) { + DiagBuilder << VectorTy->getNumElements(); + } else { + DiagBuilder << ""; + } +} + +void RSCheckAST::VisitCallExpr(clang::CallExpr *E) { + WarnOnSetElementAt(E); + + for (clang::CallExpr::arg_iterator AI = E->arg_begin(), AE = E->arg_end(); + AI != AE; ++AI) { + Visit(*AI); + } +} + +void RSCheckAST::ValidateFunctionDecl(clang::FunctionDecl *FD) { + if (!FD) { + return; + } + + if (FD->hasAttr<clang::KernelAttr>()) { + // Validate that the kernel attribute is not used with static. + if (FD->getStorageClass() == clang::SC_Static) { + Context->ReportError(FD->getLocation(), + "Invalid use of attribute kernel with " + "static function declaration: %0") + << FD->getName(); + mValid = false; + } + + // We allow no arguments to the attribute, or an expected single + // argument. If there is an expected single argument, we verify + // that it is one of the recognized kernel kinds. + llvm::StringRef KernelKind = + FD->getAttr<clang::KernelAttr>()->getKernelKind(); + + if (!KernelKind.empty()) { + Context->ReportError(FD->getLocation(), + "Unknown kernel attribute argument '%0' " + "in declaration of function '%1'") + << KernelKind << FD->getName(); + mValid = false; + } + } + + clang::QualType resultType = FD->getReturnType().getCanonicalType(); + bool isExtern = (FD->getFormalLinkage() == clang::ExternalLinkage); + + // We use FD as our NamedDecl in the case of a bad return type. + if (!RSExportType::ValidateType(Context, C, resultType, FD, + FD->getLocStart(), mTargetAPI, + mIsFilterscript, isExtern)) { + mValid = false; + } + + size_t numParams = FD->getNumParams(); + for (size_t i = 0; i < numParams; i++) { + clang::ParmVarDecl *PVD = FD->getParamDecl(i); + clang::QualType QT = PVD->getType().getCanonicalType(); + if (!RSExportType::ValidateType(Context, C, QT, PVD, PVD->getLocStart(), + mTargetAPI, mIsFilterscript, isExtern)) { + mValid = false; + } + } + + bool saveKernel = mInKernel; + mInKernel = RSExportForEach::isRSForEachFunc(mTargetAPI, FD); + + if (clang::Stmt *Body = FD->getBody()) { + Visit(Body); + } + + mInKernel = saveKernel; +} + + +void RSCheckAST::ValidateVarDecl(clang::VarDecl *VD) { + if (!VD || RSContext::isSyntheticName(VD->getName())) { + return; + } + + clang::QualType QT = VD->getType(); + + if (VD->getFormalLinkage() == clang::ExternalLinkage) { + llvm::StringRef TypeName; + const clang::Type *T = QT.getTypePtr(); + if (!RSExportType::NormalizeType(T, TypeName, Context, VD, + NotLegacyKernelArgument)) { + mValid = false; + } + } + + // We don't allow static (non-const) variables within kernels. + if (mInKernel && VD->isStaticLocal()) { + if (!QT.isConstQualified()) { + Context->ReportError( + VD->getLocation(), + "Non-const static variables are not allowed in kernels: '%0'") + << VD->getName(); + mValid = false; + } + } + + if (!RSExportType::ValidateVarDecl(Context, VD, mTargetAPI, mIsFilterscript)) { + mValid = false; + } else if (clang::Expr *Init = VD->getInit()) { + // Only check the initializer if the decl is already ok. + Visit(Init); + } +} + + +void RSCheckAST::VisitDeclStmt(clang::DeclStmt *DS) { + if (!Slang::IsLocInRSHeaderFile(DS->getLocStart(), mSM)) { + for (clang::DeclStmt::decl_iterator I = DS->decl_begin(), + E = DS->decl_end(); + I != E; + ++I) { + if (clang::VarDecl *VD = llvm::dyn_cast<clang::VarDecl>(*I)) { + ValidateVarDecl(VD); + } else if (clang::FunctionDecl *FD = + llvm::dyn_cast<clang::FunctionDecl>(*I)) { + ValidateFunctionDecl(FD); + } + } + } +} + + +void RSCheckAST::VisitCastExpr(clang::CastExpr *CE) { + if (CE->getCastKind() == clang::CK_BitCast) { + clang::QualType QT = CE->getType(); + const clang::Type *T = QT.getTypePtr(); + if (T->isVectorType()) { + if (llvm::isa<clang::ImplicitCastExpr>(CE)) { + Context->ReportError(CE->getExprLoc(), "invalid implicit vector cast"); + } else { + Context->ReportError(CE->getExprLoc(), "invalid vector cast"); + } + mValid = false; + } + } + Visit(CE->getSubExpr()); +} + + +void RSCheckAST::VisitExpr(clang::Expr *E) { + // This is where FS checks for code using pointer and/or 64-bit expressions + // (i.e. things like casts). + + // First we skip implicit casts (things like function calls and explicit + // array accesses rely heavily on them and they are valid. + E = E->IgnoreImpCasts(); + + // Expressions at this point in the checker are not externally visible. + static const bool kIsExtern = false; + + if (mIsFilterscript && + !Slang::IsLocInRSHeaderFile(E->getExprLoc(), mSM) && + !RSExportType::ValidateType(Context, C, E->getType(), nullptr, E->getExprLoc(), + mTargetAPI, mIsFilterscript, kIsExtern)) { + mValid = false; + } else { + // Only visit sub-expressions if we haven't already seen a violation. + VisitStmt(E); + } +} + + +bool RSCheckAST::Validate() { + clang::TranslationUnitDecl *TUDecl = C.getTranslationUnitDecl(); + for (clang::DeclContext::decl_iterator DI = TUDecl->decls_begin(), + DE = TUDecl->decls_end(); + DI != DE; + DI++) { + if (!Slang::IsLocInRSHeaderFile(DI->getLocStart(), mSM)) { + if (clang::VarDecl *VD = llvm::dyn_cast<clang::VarDecl>(*DI)) { + ValidateVarDecl(VD); + } else if (clang::FunctionDecl *FD = + llvm::dyn_cast<clang::FunctionDecl>(*DI)) { + ValidateFunctionDecl(FD); + } else if (clang::Stmt *Body = (*DI)->getBody()) { + Visit(Body); + } + } + } + + return mValid; +} + +} // namespace slang
diff --git a/slang/slang_rs_check_ast.h b/slang/slang_rs_check_ast.h new file mode 100644 index 0000000..e4b0dff --- /dev/null +++ b/slang/slang_rs_check_ast.h
@@ -0,0 +1,79 @@ +/* + * Copyright 2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_CHECK_AST_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_CHECK_AST_H_ + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "clang/AST/ASTContext.h" +#include "clang/AST/StmtVisitor.h" + +namespace slang { + +// This class is designed to walk a Renderscript/Filterscript AST looking for +// violations. Examples of violations for FS are pointer declarations and +// casts (i.e. no pointers allowed in FS whatsoever). +class RSCheckAST : public clang::StmtVisitor<RSCheckAST> { + private: + slang::RSContext *Context; + clang::ASTContext &C; + clang::SourceManager &mSM; + bool mValid; + unsigned int mTargetAPI; + bool mIsFilterscript; + bool mInKernel; + + /// @brief Emit warnings for inapproriate uses of rsSetElementAt + /// + /// We warn in case generic rsSetElementAt() is used even though the user + /// could have used a typed rsSetElementAt_<type>() call. Typed calls + /// allow more aggressive optimization (e.g. due to better alias analysis + /// results). Hence, we want to steer the users to use them. + void WarnOnSetElementAt(clang::CallExpr*); + + public: + explicit RSCheckAST(RSContext *Con, unsigned int TargetAPI, + bool IsFilterscript) + : Context(Con), + C(Con->getASTContext()), + mSM(C.getSourceManager()), + mValid(true), + mTargetAPI(TargetAPI), + mIsFilterscript(IsFilterscript), + mInKernel(false) { + } + + void VisitStmt(clang::Stmt *S); + + void VisitCallExpr(clang::CallExpr *CE); + + void VisitCastExpr(clang::CastExpr *CE); + + void VisitExpr(clang::Expr *E); + + void VisitDeclStmt(clang::DeclStmt *DS); + + void ValidateFunctionDecl(clang::FunctionDecl *FD); + + void ValidateVarDecl(clang::VarDecl *VD); + + bool Validate(); +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_CHECK_AST_H_ NOLINT
diff --git a/slang/slang_rs_context.cpp b/slang/slang_rs_context.cpp new file mode 100644 index 0000000..0e3ee53 --- /dev/null +++ b/slang/slang_rs_context.cpp
@@ -0,0 +1,414 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_context.h" + +#include <string> + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" +#include "clang/AST/Mangle.h" +#include "clang/AST/Type.h" + +#include "clang/Basic/Linkage.h" +#include "clang/Basic/TargetInfo.h" + +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/DataLayout.h" + +#include "slang.h" +#include "slang_assert.h" +#include "slang_backend.h" +#include "slang_rs_export_foreach.h" +#include "slang_rs_export_func.h" +#include "slang_rs_export_reduce.h" +#include "slang_rs_export_type.h" +#include "slang_rs_export_var.h" +#include "slang_rs_exportable.h" +#include "slang_rs_pragma_handler.h" +#include "slang_rs_reflection.h" +#include "slang_rs_special_func.h" + +namespace slang { + +RSContext::RSContext(clang::Preprocessor &PP, + clang::ASTContext &Ctx, + const clang::TargetInfo &Target, + PragmaList *Pragmas, + unsigned int TargetAPI, + bool Verbose) + : mPP(PP), + mCtx(Ctx), + mPragmas(Pragmas), + mTargetAPI(TargetAPI), + mVerbose(Verbose), + mDataLayout(nullptr), + mLLVMContext(llvm::getGlobalContext()), + mLicenseNote(nullptr), + mRSPackageName("android.renderscript"), + version(0), + mMangleCtx(Ctx.createMangleContext()), + mIs64Bit(Target.getPointerWidth(0) == 64), + mNextSlot(1) { + + AddPragmaHandlers(PP, this); + + // Prepare target data + mDataLayout = new llvm::DataLayout(Target.getDataLayoutString()); + + // Reserve slot 0 for the root kernel. + mExportForEach.push_back(nullptr); + mFirstOldStyleKernel = mExportForEach.end(); +} + +bool RSContext::processExportVar(const clang::VarDecl *VD) { + slangAssert(!VD->getName().empty() && "Variable name should not be empty"); + + RSExportType *ET = RSExportType::CreateFromDecl(this, VD); + if (!ET) + return false; + + RSExportVar *EV = new RSExportVar(this, VD, ET); + if (EV == nullptr) + return false; + else + mExportVars.push_back(EV); + + return true; +} + +int RSContext::getForEachSlotNumber(const clang::FunctionDecl* FD) { + const clang::StringRef& funcName = FD->getName(); + return getForEachSlotNumber(funcName); +} + +int RSContext::getForEachSlotNumber(const clang::StringRef& funcName) { + auto it = mExportForEachMap.find(funcName); + if (it == mExportForEachMap.end()) { + return -1; + } + return it->second; +} + +bool RSContext::processExportFunc(const clang::FunctionDecl *FD) { + slangAssert(!FD->getName().empty() && "Function name should not be empty"); + + if (!FD->isThisDeclarationADefinition()) { + return true; + } + + slangAssert(FD->getStorageClass() == clang::SC_None); + + // Specialized function + if (RSSpecialFunc::isSpecialRSFunc(mTargetAPI, FD)) { + // Do not reflect specialized functions like init, dtor, or graphics root. + return RSSpecialFunc::validateSpecialFuncDecl(mTargetAPI, this, FD); + } + + // Foreach kernel + if (RSExportForEach::isRSForEachFunc(mTargetAPI, FD)) { + RSExportForEach *EFE = RSExportForEach::Create(this, FD); + if (EFE == nullptr) { + return false; + } + + // The root function should be at index 0 in the list + if (FD->getName().equals("root")) { + mExportForEach[0] = EFE; + return true; + } + + // New-style kernels with attribute "kernel" should come first in the list + if (FD->hasAttr<clang::KernelAttr>()) { + mFirstOldStyleKernel = mExportForEach.insert(mFirstOldStyleKernel, EFE) + 1; + slangAssert((mTargetAPI < SLANG_FEATURE_SINGLE_SOURCE_API || + getForEachSlotNumber(FD->getName()) == + mFirstOldStyleKernel - mExportForEach.begin() - 1) && + "Inconsistent slot number assignment"); + return true; + } + + // Old-style kernels should appear in the end of the list + mFirstOldStyleKernel = mExportForEach.insert(mFirstOldStyleKernel, EFE); + return true; + } + + // Invokable + if (auto *EF = RSExportFunc::Create(this, FD)) { + mExportFuncs.push_back(EF); + return true; + } + + return false; +} + +bool RSContext::addForEach(const clang::FunctionDecl* FD) { + const llvm::StringRef& funcName = FD->getName(); + + if (funcName.equals("root")) { + // The root kernel should always be in slot 0. + mExportForEachMap.insert(std::make_pair(funcName, 0)); + } else { + mExportForEachMap.insert(std::make_pair(funcName, mNextSlot++)); + } + + return true; +} + +bool RSContext::processExportType(const llvm::StringRef &Name) { + clang::TranslationUnitDecl *TUDecl = mCtx.getTranslationUnitDecl(); + + slangAssert(TUDecl != nullptr && "Translation unit declaration (top-level " + "declaration) is null object"); + + const clang::IdentifierInfo *II = mPP.getIdentifierInfo(Name); + if (II == nullptr) + // TODO(zonr): alert identifier @Name mark as an exportable type cannot be + // found + return false; + + clang::DeclContext::lookup_result R = TUDecl->lookup(II); + RSExportType *ET = nullptr; + + for (clang::DeclContext::lookup_iterator I = R.begin(), E = R.end(); + I != E; + I++) { + clang::NamedDecl *const ND = *I; + const clang::Type *T = nullptr; + + switch (ND->getKind()) { + case clang::Decl::Typedef: { + T = static_cast<const clang::TypedefDecl*>( + ND)->getCanonicalDecl()->getUnderlyingType().getTypePtr(); + break; + } + case clang::Decl::Record: { + T = static_cast<const clang::RecordDecl*>(ND)->getTypeForDecl(); + break; + } + default: { + // unsupported, skip + break; + } + } + + if (T != nullptr) + ET = RSExportType::Create(this, T, NotLegacyKernelArgument); + } + + return (ET != nullptr); +} + +void RSContext::setAllocationType(const clang::TypeDecl* TD) { + mAllocationType = mCtx.getTypeDeclType(TD); +} + +void RSContext::setScriptCallType(const clang::TypeDecl* TD) { + mScriptCallType = mCtx.getTypeDeclType(TD); +} + +bool RSContext::processExports() { + bool valid = true; + + if (getDiagnostics()->hasErrorOccurred()) { + return false; + } + + clang::TranslationUnitDecl *TUDecl = mCtx.getTranslationUnitDecl(); + for (auto I = TUDecl->decls_begin(), E = TUDecl->decls_end(); I != E; I++) { + clang::Decl* D = *I; + switch (D->getKind()) { + case clang::Decl::Var: { + clang::VarDecl* VD = llvm::dyn_cast<clang::VarDecl>(D); + bool ShouldExportVariable = true; + if (VD->getFormalLinkage() == clang::ExternalLinkage) { + clang::QualType QT = VD->getTypeSourceInfo()->getType(); + if (QT.isConstQualified() && !VD->hasInit()) { + if (Slang::IsLocInRSHeaderFile(VD->getLocation(), + *getSourceManager())) { + // We don't export variables internal to the runtime's + // implementation. + ShouldExportVariable = false; + } else { + clang::DiagnosticsEngine *DiagEngine = getDiagnostics(); + DiagEngine->Report(VD->getLocation(), DiagEngine->getCustomDiagID( + clang::DiagnosticsEngine::Error, + "invalid declaration of uninitialized constant variable '%0'")) + << VD->getName(); + valid = false; + } + } + if (valid && ShouldExportVariable && isSyntheticName(VD->getName())) + ShouldExportVariable = false; + if (valid && ShouldExportVariable && !processExportVar(VD)) { + valid = false; + } + } + break; + } + case clang::Decl::Function: { + clang::FunctionDecl* FD = llvm::dyn_cast<clang::FunctionDecl>(D); + if (FD->getFormalLinkage() == clang::ExternalLinkage) { + if (!processExportFunc(FD)) { + valid = false; + } + } + break; + } + default: + break; + } + } + + // Create a dummy root in slot 0 if a root kernel is not seen + // and there exists a non-root kernel. + if (valid && mExportForEach[0] == nullptr) { + const size_t numExportedForEach = mExportForEach.size(); + if (numExportedForEach > 1) { + mExportForEach[0] = RSExportForEach::CreateDummyRoot(this); + } else { + slangAssert(numExportedForEach == 1); + mExportForEach.pop_back(); + } + } + + // Finally, export type forcely set to be exported by user + for (NeedExportTypeSet::const_iterator EI = mNeedExportTypes.begin(), + EE = mNeedExportTypes.end(); + EI != EE; + EI++) { + if (!processExportType(EI->getKey())) { + valid = false; + } + } + + return valid; +} + +bool RSContext::processReducePragmas(Backend *BE) { + // This is needed to ensure that the dummy variable is emitted into + // the bitcode -- which in turn forces the function to be emitted + // into the bitcode. We couldn't do this at + // markUsedByReducePragma() time because we had to wait until the + // Backend is available. + for (auto DummyVar : mUsedByReducePragmaDummyVars) + BE->HandleTopLevelDecl(clang::DeclGroupRef(DummyVar)); + + bool valid = true; + for (auto I = export_reduce_begin(), E = export_reduce_end(); I != E; ++I) { + if (! (*I)->analyzeTranslationUnit()) + valid = false; + } + return valid; +} + +void RSContext::markUsedByReducePragma(clang::FunctionDecl *FD, CheckName Check) { + if (mUsedByReducePragmaFns.find(FD) != mUsedByReducePragmaFns.end()) + return; // already marked used + + if (Check == CheckNameYes) { + // This is an inefficient linear search. If this turns out to be a + // problem in practice, then processReducePragmas() could build a + // set or hash table or something similar containing all function + // names mentioned in a reduce pragma and searchable in O(c) or + // O(log(n)) time rather than the currently-implemented O(n) search. + auto NameMatches = [this, FD]() { + for (auto I = export_reduce_begin(), E = export_reduce_end(); I != E; ++I) { + if ((*I)->matchName(FD->getName())) + return true; + } + return false; + }; + if (!NameMatches()) + return; + } + + mUsedByReducePragmaFns.insert(FD); + + // This is needed to prevent clang from warning that the function is + // unused (in the case where it is only referenced by #pragma rs + // reduce). + FD->setIsUsed(); + + // Each constituent function "f" of a reduction kernel gets a dummy variable generated for it: + // void *.rs.reduce_fn.f = (void*)&f; + // This is a trick to ensure that clang will not delete "f" as unused. + + // `-VarDecl 0x87cb558 <line:3:1, col:30> col:7 var 'void *' cinit + // `-CStyleCastExpr 0x87cb630 <col:19, col:26> 'void *' <BitCast> + // `-ImplicitCastExpr 0x87cb618 <col:26> 'void (*)(int *, float, double)' <FunctionToPointerDecay> + // `-DeclRefExpr 0x87cb5b8 <col:26> 'void (int *, float, double)' Function 0x8784e10 'foo' 'void (int *, float, double) + + const clang::QualType VoidPtrType = mCtx.getPointerType(mCtx.VoidTy); + + clang::DeclContext *const DC = FD->getDeclContext(); + const clang::SourceLocation Loc = FD->getLocation(); + + clang::VarDecl *const VD = clang::VarDecl::Create( + mCtx, DC, Loc, Loc, + &mCtx.Idents.get(std::string(".rs.reduce_fn.") + FD->getNameAsString()), + VoidPtrType, + mCtx.getTrivialTypeSourceInfo(VoidPtrType), + clang::SC_None); + VD->setLexicalDeclContext(DC); + DC->addDecl(VD); + + clang::DeclRefExpr *const DRE = clang::DeclRefExpr::Create(mCtx, + clang::NestedNameSpecifierLoc(), + Loc, + FD, false, Loc, FD->getType(), + clang::VK_RValue); + clang::ImplicitCastExpr *const ICE = clang::ImplicitCastExpr::Create(mCtx, mCtx.getPointerType(FD->getType()), + clang::CK_FunctionToPointerDecay, DRE, + nullptr, clang::VK_RValue); + clang::CStyleCastExpr *const CSCE = clang::CStyleCastExpr::Create(mCtx, VoidPtrType, clang::VK_RValue, clang::CK_BitCast, + ICE, nullptr, nullptr, + Loc, Loc); + VD->setInit(CSCE); + + mUsedByReducePragmaDummyVars.push_back(VD); +} + +bool RSContext::insertExportType(const llvm::StringRef &TypeName, + RSExportType *ET) { + ExportTypeMap::value_type *NewItem = + ExportTypeMap::value_type::Create(TypeName, + mExportTypes.getAllocator(), + ET); + + if (mExportTypes.insert(NewItem)) { + return true; + } else { + NewItem->Destroy(mExportTypes.getAllocator()); + return false; + } +} + +RSContext::~RSContext() { + delete mLicenseNote; + delete mDataLayout; + for (ExportableList::iterator I = mExportables.begin(), + E = mExportables.end(); + I != E; + I++) { + if (!(*I)->isKeep()) + delete *I; + } +} + +} // namespace slang
diff --git a/slang/slang_rs_context.h b/slang/slang_rs_context.h new file mode 100644 index 0000000..e6b4e8c --- /dev/null +++ b/slang/slang_rs_context.h
@@ -0,0 +1,362 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_CONTEXT_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_CONTEXT_H_ + +#include <cstdio> +#include <list> +#include <map> +#include <set> +#include <string> +#include <unordered_set> +#include <vector> + +#include "clang/Lex/Preprocessor.h" +#include "clang/AST/Mangle.h" + +#include "llvm/ADT/StringSet.h" +#include "llvm/ADT/StringMap.h" + +#include "slang_pragma_list.h" + +namespace llvm { + class LLVMContext; + class DataLayout; +} // namespace llvm + +namespace clang { + class VarDecl; + class ASTContext; + class TargetInfo; + class FunctionDecl; + class QualType; + class SourceManager; + class TypeDecl; + class FunctionDecl; +} // namespace clang + +namespace slang { + class Backend; + class RSExportable; + class RSExportVar; + class RSExportFunc; + class RSExportForEach; + class RSExportReduce; + class RSExportType; + +class RSContext { + typedef llvm::StringSet<> NeedExportVarSet; + typedef llvm::StringSet<> NeedExportFuncSet; + typedef llvm::StringSet<> NeedExportTypeSet; + + public: + typedef std::list<RSExportable*> ExportableList; + typedef std::list<RSExportVar*> ExportVarList; + typedef std::list<RSExportFunc*> ExportFuncList; + typedef std::vector<RSExportForEach*> ExportForEachVector; + typedef std::list<RSExportReduce*> ExportReduceList; + + // WARNING: Sorted by pointer value, resulting in unpredictable order + typedef std::unordered_set<RSExportType*> ExportReduceResultTypeSet; + + typedef llvm::StringMap<RSExportType*> ExportTypeMap; + + private: + clang::Preprocessor &mPP; + clang::ASTContext &mCtx; + PragmaList *mPragmas; + // Precision specified via pragma, either rs_fp_full or rs_fp_relaxed. If + // empty, rs_fp_full is assumed. + std::string mPrecision; + unsigned int mTargetAPI; + bool mVerbose; + + llvm::DataLayout *mDataLayout; + llvm::LLVMContext &mLLVMContext; + + ExportableList mExportables; + + NeedExportTypeSet mNeedExportTypes; + + std::string *mLicenseNote; + std::string mReflectJavaPackageName; + std::string mReflectJavaPathName; + + std::string mRSPackageName; + + int version; + + std::unique_ptr<clang::MangleContext> mMangleCtx; + + bool mIs64Bit; + + bool processExportVar(const clang::VarDecl *VD); + bool processExportFunc(const clang::FunctionDecl *FD); + bool processExportType(const llvm::StringRef &Name); + + int getForEachSlotNumber(const clang::StringRef& funcName); + unsigned mNextSlot; + + ExportVarList mExportVars; + ExportFuncList mExportFuncs; + std::map<llvm::StringRef, unsigned> mExportForEachMap; + ExportForEachVector mExportForEach; + ExportForEachVector::iterator mFirstOldStyleKernel; + ExportReduceList mExportReduce; + ExportReduceResultTypeSet mExportReduceResultType; + ExportTypeMap mExportTypes; + + clang::QualType mAllocationType; + clang::QualType mScriptCallType; + + std::set<const clang::FunctionDecl *> mUsedByReducePragmaFns; + + // Populated by markUsedByReducePragma(). + // Consumed by processReducePragmas(). + std::vector<clang::VarDecl *> mUsedByReducePragmaDummyVars; + + public: + RSContext(clang::Preprocessor &PP, + clang::ASTContext &Ctx, + const clang::TargetInfo &Target, + PragmaList *Pragmas, + unsigned int TargetAPI, + bool Verbose); + + enum CheckName { CheckNameNo, CheckNameYes }; + + static bool isSyntheticName(const llvm::StringRef Name) { return Name.startswith(".rs."); } + + inline clang::Preprocessor &getPreprocessor() const { return mPP; } + inline clang::ASTContext &getASTContext() const { return mCtx; } + inline clang::MangleContext &getMangleContext() const { + return *mMangleCtx; + } + inline const llvm::DataLayout *getDataLayout() const { return mDataLayout; } + inline llvm::LLVMContext &getLLVMContext() const { return mLLVMContext; } + inline const clang::SourceManager *getSourceManager() const { + return &mPP.getSourceManager(); + } + inline clang::DiagnosticsEngine *getDiagnostics() const { + return &mPP.getDiagnostics(); + } + inline unsigned int getTargetAPI() const { + return mTargetAPI; + } + + inline bool getVerbose() const { + return mVerbose; + } + inline bool is64Bit() const { + return mIs64Bit; + } + + inline void setLicenseNote(const std::string &S) { + mLicenseNote = new std::string(S); + } + inline const std::string *getLicenseNote() const { return mLicenseNote; } + + inline void addExportType(const std::string &S) { + mNeedExportTypes.insert(S); + } + + inline void setReflectJavaPackageName(const std::string &S) { + mReflectJavaPackageName = S; + } + inline const std::string &getReflectJavaPackageName() const { + return mReflectJavaPackageName; + } + + inline void setRSPackageName(const std::string &S) { + mRSPackageName = S; + } + + inline const std::string &getRSPackageName() const { return mRSPackageName; } + + void setAllocationType(const clang::TypeDecl* TD); + inline const clang::QualType& getAllocationType() const { + return mAllocationType; + } + + void setScriptCallType(const clang::TypeDecl* TD); + inline const clang::QualType& getScriptCallType() const { + return mScriptCallType; + } + + bool addForEach(const clang::FunctionDecl* FD); + bool processExports(); + inline void newExportable(RSExportable *E) { + if (E != nullptr) + mExportables.push_back(E); + } + typedef ExportableList::iterator exportable_iterator; + exportable_iterator exportable_begin() { + return mExportables.begin(); + } + exportable_iterator exportable_end() { + return mExportables.end(); + } + + typedef ExportVarList::const_iterator const_export_var_iterator; + const_export_var_iterator export_vars_begin() const { + return mExportVars.begin(); + } + const_export_var_iterator export_vars_end() const { + return mExportVars.end(); + } + inline bool hasExportVar() const { + return !mExportVars.empty(); + } + + typedef ExportFuncList::const_iterator const_export_func_iterator; + const_export_func_iterator export_funcs_begin() const { + return mExportFuncs.begin(); + } + const_export_func_iterator export_funcs_end() const { + return mExportFuncs.end(); + } + inline bool hasExportFunc() const { return !mExportFuncs.empty(); } + + typedef ExportForEachVector::const_iterator const_export_foreach_iterator; + const_export_foreach_iterator export_foreach_begin() const { + return mExportForEach.begin(); + } + const_export_foreach_iterator export_foreach_end() const { + return mExportForEach.end(); + } + inline bool hasExportForEach() const { return !mExportForEach.empty(); } + int getForEachSlotNumber(const clang::FunctionDecl* FD); + + typedef ExportReduceList::const_iterator const_export_reduce_iterator; + const_export_reduce_iterator export_reduce_begin() const { + return mExportReduce.begin(); + } + const_export_reduce_iterator export_reduce_end() const { + return mExportReduce.end(); + } + inline bool hasExportReduce() const { return !mExportReduce.empty(); } + void addExportReduce(RSExportReduce *Reduce) { + mExportReduce.push_back(Reduce); + } + bool processReducePragmas(Backend *BE); + void markUsedByReducePragma(clang::FunctionDecl *FD, CheckName Check); + + // If the type has already been inserted, has no effect. + void insertExportReduceResultType(RSExportType *Type) { mExportReduceResultType.insert(Type); } + + template <class FilterIn, class Compare> + std::vector<RSExportType *> getReduceResultTypes(FilterIn Filt, Compare Comp) const { + std::vector<RSExportType *> Return; + std::copy_if(mExportReduceResultType.begin(), mExportReduceResultType.end(), std::back_inserter(Return), Filt); + std::sort(Return.begin(), Return.end(), Comp); + auto ReturnNewEndIter = std::unique(Return.begin(), Return.end(), + [Comp](const RSExportType *a, const RSExportType *b) { + return !Comp(a, b) && !Comp(b, a); + }); + Return.erase(ReturnNewEndIter, Return.end()); + return Return; + } + + typedef ExportTypeMap::iterator export_type_iterator; + typedef ExportTypeMap::const_iterator const_export_type_iterator; + export_type_iterator export_types_begin() { return mExportTypes.begin(); } + export_type_iterator export_types_end() { return mExportTypes.end(); } + const_export_type_iterator export_types_begin() const { + return mExportTypes.begin(); + } + const_export_type_iterator export_types_end() const { + return mExportTypes.end(); + } + inline bool hasExportType() const { return !mExportTypes.empty(); } + export_type_iterator findExportType(const llvm::StringRef &TypeName) { + return mExportTypes.find(TypeName); + } + const_export_type_iterator findExportType(const llvm::StringRef &TypeName) + const { + return mExportTypes.find(TypeName); + } + + // Insert the specified Typename/Type pair into the map. If the key already + // exists in the map, return false and ignore the request, otherwise insert it + // and return true. + bool insertExportType(const llvm::StringRef &TypeName, RSExportType *Type); + + int getVersion() const { return version; } + void setVersion(int v) { + version = v; + } + + bool isCompatLib() const { + // If we are not targeting the actual Android Renderscript classes, + // we should reflect code that works with the compatibility library. + return (mRSPackageName.compare("android.renderscript") != 0); + } + + void addPragma(const std::string &T, const std::string &V) { + mPragmas->push_back(make_pair(T, V)); + } + void setPrecision(const std::string &P) { mPrecision = P; } + std::string getPrecision() { return mPrecision; } + + // Report an error or a warning to the user. + template <unsigned N> + clang::DiagnosticBuilder Report(clang::DiagnosticsEngine::Level Level, + const char (&Message)[N]) { + clang::DiagnosticsEngine *DiagEngine = getDiagnostics(); + return DiagEngine->Report(DiagEngine->getCustomDiagID(Level, Message)); + } + + template <unsigned N> + clang::DiagnosticBuilder Report(clang::DiagnosticsEngine::Level Level, + const clang::SourceLocation Loc, + const char (&Message)[N]) { + clang::DiagnosticsEngine *DiagEngine = getDiagnostics(); + const clang::SourceManager *SM = getSourceManager(); + return DiagEngine->Report(clang::FullSourceLoc(Loc, *SM), + DiagEngine->getCustomDiagID(Level, Message)); + } + + // Utility functions to report errors and warnings to make the calling code + // easier to read. + template <unsigned N> + clang::DiagnosticBuilder ReportError(const char (&Message)[N]) { + return Report<N>(clang::DiagnosticsEngine::Error, Message); + } + + template <unsigned N> + clang::DiagnosticBuilder ReportError(const clang::SourceLocation Loc, + const char (&Message)[N]) { + return Report<N>(clang::DiagnosticsEngine::Error, Loc, Message); + } + + template <unsigned N> + clang::DiagnosticBuilder ReportWarning(const char (&Message)[N]) { + return Report<N>(clang::DiagnosticsEngine::Warning, Message); + } + + template <unsigned N> + clang::DiagnosticBuilder ReportWarning(const clang::SourceLocation Loc, + const char (&Message)[N]) { + return Report<N>(clang::DiagnosticsEngine::Warning, Loc, Message); + } + + ~RSContext(); +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_CONTEXT_H_ NOLINT
diff --git a/slang/slang_rs_export_element.cpp b/slang/slang_rs_export_element.cpp new file mode 100644 index 0000000..15902c2 --- /dev/null +++ b/slang/slang_rs_export_element.cpp
@@ -0,0 +1,179 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_export_element.h" + +#include "clang/AST/Decl.h" +#include "clang/AST/Type.h" + +#include "clang/Basic/SourceLocation.h" +#include "clang/Basic/IdentifierTable.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "slang_rs_export_type.h" + +namespace slang { + +bool RSExportElement::Initialized = false; +RSExportElement::ElementInfoMapTy RSExportElement::ElementInfoMap; + +struct DataElementInfo { + const char *name; + DataType dataType; + bool normalized; + int vsize; +}; + +static DataElementInfo DataElementInfoTable[] = { + {"rs_pixel_l", DataTypeUnsigned8, true, 1}, + {"rs_pixel_a", DataTypeUnsigned8, true, 1}, + {"rs_pixel_la", DataTypeUnsigned8, true, 2}, + {"rs_pixel_rgb", DataTypeUnsigned8, true, 3}, + {"rs_pixel_rgba", DataTypeUnsigned8, true, 4}, + {"rs_pixel_rgb565", DataTypeUnsigned8, true, 3}, + {"rs_pixel_rgb5551", DataTypeUnsigned8, true, 4}, + {"rs_pixel_rgb4444", DataTypeUnsigned8, true, 4}, +}; + +const int DataElementInfoTableCount = sizeof(DataElementInfoTable) / sizeof(DataElementInfoTable[0]); + +// TODO Rename RSExportElement to RSExportDataElement +void RSExportElement::Init() { + if (!Initialized) { + // Initialize ElementInfoMap + for (int i = 0; i < DataElementInfoTableCount; i++) { + ElementInfo *EI = new ElementInfo; + EI->type = DataElementInfoTable[i].dataType; + EI->normalized = DataElementInfoTable[i].normalized; + EI->vsize = DataElementInfoTable[i].vsize; + llvm::StringRef Name(DataElementInfoTable[i].name); + ElementInfoMap.insert(ElementInfoMapTy::value_type::Create( + Name, ElementInfoMap.getAllocator(), EI)); + } + Initialized = true; + } +} + +RSExportType *RSExportElement::Create(RSContext *Context, + const clang::Type *T, + const ElementInfo *EI) { + // Create RSExportType corresponded to the @T first and then verify + + llvm::StringRef TypeName; + RSExportType *ET = nullptr; + + if (!Initialized) + Init(); + + slangAssert(EI != nullptr && "Element info not found"); + + if (!RSExportType::NormalizeType(T, TypeName, Context, nullptr, + NotLegacyKernelArgument)) + return nullptr; + + switch (T->getTypeClass()) { + case clang::Type::Builtin: + case clang::Type::Pointer: { + slangAssert(EI->vsize == 1 && "Element not a primitive class (please " + "check your macro)"); + RSExportPrimitiveType *EPT = + RSExportPrimitiveType::Create(Context, + T, + TypeName, + EI->normalized); + // Verify + slangAssert(EI->type == EPT->getType() && "Element has unexpected type"); + ET = EPT; + break; + } + case clang::Type::ExtVector: { + slangAssert(EI->vsize > 1 && "Element not a vector class (please check " + "your macro)"); + RSExportVectorType *EVT = + RSExportVectorType::Create(Context, + static_cast<const clang::ExtVectorType*>( + T->getCanonicalTypeInternal() + .getTypePtr()), + TypeName, + EI->normalized); + // Verify + slangAssert(EI->type == EVT->getType() && "Element has unexpected type"); + slangAssert(EI->vsize == EVT->getNumElement() && "Element has unexpected " + "size of vector"); + ET = EVT; + break; + } + default: { + // TODO(zonr): warn that type is not exportable + fprintf(stderr, "RSExportElement::Create : type '%s' is not exportable\n", + T->getTypeClassName()); + break; + } + } + + return ET; +} + +RSExportType *RSExportElement::CreateFromDecl(RSContext *Context, + const clang::DeclaratorDecl *DD) { + const clang::Type* T = RSExportType::GetTypeOfDecl(DD); + const clang::Type* CT = GetCanonicalType(T); + const ElementInfo* EI = nullptr; + + // Note: RS element like rs_pixel_rgb elements are either in the type of + // primitive or vector. + if ((CT->getTypeClass() != clang::Type::Builtin) && + (CT->getTypeClass() != clang::Type::ExtVector)) { + return RSExportType::Create(Context, T, NotLegacyKernelArgument); + } + + // Following the typedef chain to see whether it's an element name like + // rs_pixel_rgb or its alias (via typedef). + while (T != CT) { + if (T->getTypeClass() != clang::Type::Typedef) { + break; + } else { + const clang::TypedefType *TT = static_cast<const clang::TypedefType*>(T); + const clang::TypedefNameDecl *TD = TT->getDecl(); + EI = GetElementInfo(TD->getName()); + if (EI != nullptr) + break; + + T = TD->getUnderlyingType().getTypePtr(); + } + } + + if (EI == nullptr) { + return RSExportType::Create(Context, T, NotLegacyKernelArgument); + } else { + return RSExportElement::Create(Context, T, EI); + } +} + +const RSExportElement::ElementInfo * +RSExportElement::GetElementInfo(const llvm::StringRef &Name) { + if (!Initialized) + Init(); + + ElementInfoMapTy::const_iterator I = ElementInfoMap.find(Name); + if (I == ElementInfoMap.end()) + return nullptr; + else + return I->getValue(); +} + +} // namespace slang
diff --git a/slang/slang_rs_export_element.h b/slang/slang_rs_export_element.h new file mode 100644 index 0000000..5f7006c --- /dev/null +++ b/slang/slang_rs_export_element.h
@@ -0,0 +1,72 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_ELEMENT_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_ELEMENT_H_ + +#include <string> + +#include "clang/Lex/Token.h" + +#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/StringRef.h" + +#include "slang_rs_export_type.h" + +namespace clang { + class Type; + class DeclaratorDecl; +} // namespace clang + +namespace slang { + + class RSContext; + class RSExportType; + +class RSExportElement { + // This is a utility class for handling the RS_ELEMENT_ADD* marker + RSExportElement() { } + + typedef struct { + DataType type; + bool normalized; + unsigned vsize; + } ElementInfo; + + typedef llvm::StringMap<const ElementInfo*> ElementInfoMapTy; + + private: + // Macro name <-> ElementInfo + static ElementInfoMapTy ElementInfoMap; + + static bool Initialized; + + static RSExportType *Create(RSContext *Context, + const clang::Type *T, + const ElementInfo *EI); + + static const ElementInfo *GetElementInfo(const llvm::StringRef &Name); + + public: + static void Init(); + + static RSExportType *CreateFromDecl(RSContext *Context, + const clang::DeclaratorDecl *DD); +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_ELEMENT_H_ NOLINT
diff --git a/slang/slang_rs_export_foreach.cpp b/slang/slang_rs_export_foreach.cpp new file mode 100644 index 0000000..f7483e3 --- /dev/null +++ b/slang/slang_rs_export_foreach.cpp
@@ -0,0 +1,481 @@ +/* + * Copyright 2011-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_export_foreach.h" + +#include <string> + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" +#include "clang/AST/Decl.h" +#include "clang/AST/TypeLoc.h" + +#include "llvm/IR/DerivedTypes.h" + +#include "bcinfo/MetadataExtractor.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "slang_rs_export_type.h" +#include "slang_rs_special_func.h" +#include "slang_rs_special_kernel_param.h" +#include "slang_version.h" + +namespace { + +const size_t RS_KERNEL_INPUT_LIMIT = 8; // see frameworks/base/libs/rs/cpu_ref/rsCpuCoreRuntime.h + +bool isRootRSFunc(const clang::FunctionDecl *FD) { + if (!FD) { + return false; + } + return FD->getName().equals("root"); +} + +} // end anonymous namespace + +namespace slang { + +// This function takes care of additional validation and construction of +// parameters related to forEach_* reflection. +bool RSExportForEach::validateAndConstructParams( + RSContext *Context, const clang::FunctionDecl *FD) { + slangAssert(Context && FD); + bool valid = true; + + numParams = FD->getNumParams(); + + if (Context->getTargetAPI() < SLANG_JB_TARGET_API) { + // Before JellyBean, we allowed only one kernel per file. It must be called "root". + if (!isRootRSFunc(FD)) { + Context->ReportError(FD->getLocation(), + "Non-root compute kernel %0() is " + "not supported in SDK levels %1-%2") + << FD->getName() << SLANG_MINIMUM_TARGET_API + << (SLANG_JB_TARGET_API - 1); + return false; + } + } + + mResultType = FD->getReturnType().getCanonicalType(); + // Compute kernel functions are defined differently when the + // "__attribute__((kernel))" is set. + if (FD->hasAttr<clang::KernelAttr>()) { + valid &= validateAndConstructKernelParams(Context, FD); + } else { + valid &= validateAndConstructOldStyleParams(Context, FD); + } + + valid &= setSignatureMetadata(Context, FD); + return valid; +} + +bool RSExportForEach::validateAndConstructOldStyleParams( + RSContext *Context, const clang::FunctionDecl *FD) { + slangAssert(Context && FD); + // If numParams is 0, we already marked this as a graphics root(). + slangAssert(numParams > 0); + + bool valid = true; + + // Compute kernel functions of this style are required to return a void type. + clang::ASTContext &C = Context->getASTContext(); + if (mResultType != C.VoidTy) { + Context->ReportError(FD->getLocation(), + "Compute kernel %0() is required to return a " + "void type") + << FD->getName(); + valid = false; + } + + // Validate remaining parameter types + + size_t IndexOfFirstSpecialParameter = numParams; + valid &= processSpecialParameters(Context, FD, &IndexOfFirstSpecialParameter); + + // Validate the non-special parameters, which should all be found before the + // first special parameter. + for (size_t i = 0; i < IndexOfFirstSpecialParameter; i++) { + const clang::ParmVarDecl *PVD = FD->getParamDecl(i); + clang::QualType QT = PVD->getType().getCanonicalType(); + + if (!QT->isPointerType()) { + Context->ReportError(PVD->getLocation(), + "Compute kernel %0() cannot have non-pointer " + "parameters besides special parameters (%1). Parameter '%2' is " + "of type: '%3'") + << FD->getName() << listSpecialKernelParameters(Context->getTargetAPI()) + << PVD->getName() << PVD->getType().getAsString(); + valid = false; + continue; + } + + // The only non-const pointer should be out. + if (!QT->getPointeeType().isConstQualified()) { + if (mOut == nullptr) { + mOut = PVD; + } else { + Context->ReportError(PVD->getLocation(), + "Compute kernel %0() can only have one non-const " + "pointer parameter. Parameters '%1' and '%2' are " + "both non-const.") + << FD->getName() << mOut->getName() << PVD->getName(); + valid = false; + } + } else { + if (mIns.empty() && mOut == nullptr) { + mIns.push_back(PVD); + } else if (mUsrData == nullptr) { + mUsrData = PVD; + } else { + Context->ReportError( + PVD->getLocation(), + "Unexpected parameter '%0' for compute kernel %1()") + << PVD->getName() << FD->getName(); + valid = false; + } + } + } + + if (mIns.empty() && !mOut) { + Context->ReportError(FD->getLocation(), + "Compute kernel %0() must have at least one " + "parameter for in or out") + << FD->getName(); + valid = false; + } + + return valid; +} + +bool RSExportForEach::validateAndConstructKernelParams( + RSContext *Context, const clang::FunctionDecl *FD) { + slangAssert(Context && FD); + bool valid = true; + clang::ASTContext &C = Context->getASTContext(); + + if (Context->getTargetAPI() < SLANG_JB_MR1_TARGET_API) { + Context->ReportError(FD->getLocation(), + "Compute kernel %0() targeting SDK levels " + "%1-%2 may not use pass-by-value with " + "__attribute__((kernel))") + << FD->getName() << SLANG_MINIMUM_TARGET_API + << (SLANG_JB_MR1_TARGET_API - 1); + return false; + } + + // Denote that we are indeed a pass-by-value kernel. + mIsKernelStyle = true; + mHasReturnType = (mResultType != C.VoidTy); + + if (mResultType->isPointerType()) { + Context->ReportError( + FD->getTypeSpecStartLoc(), + "Compute kernel %0() cannot return a pointer type: '%1'") + << FD->getName() << mResultType.getAsString(); + valid = false; + } + + // Validate remaining parameter types + + size_t IndexOfFirstSpecialParameter = numParams; + valid &= processSpecialParameters(Context, FD, &IndexOfFirstSpecialParameter); + + // Validate the non-special parameters, which should all be found before the + // first special. + for (size_t i = 0; i < IndexOfFirstSpecialParameter; i++) { + const clang::ParmVarDecl *PVD = FD->getParamDecl(i); + + if (Context->getTargetAPI() >= SLANG_M_TARGET_API || i == 0) { + if (i >= RS_KERNEL_INPUT_LIMIT) { + Context->ReportError(PVD->getLocation(), + "Invalid parameter '%0' for compute kernel %1(). " + "Kernels targeting SDK levels %2+ may not use " + "more than %3 input parameters.") << PVD->getName() << + FD->getName() << SLANG_M_TARGET_API << + int(RS_KERNEL_INPUT_LIMIT); + + } else { + mIns.push_back(PVD); + } + } else { + Context->ReportError(PVD->getLocation(), + "Invalid parameter '%0' for compute kernel %1(). " + "Kernels targeting SDK levels %2-%3 may not use " + "multiple input parameters.") << PVD->getName() << + FD->getName() << SLANG_MINIMUM_TARGET_API << + (SLANG_M_TARGET_API - 1); + valid = false; + } + clang::QualType QT = PVD->getType().getCanonicalType(); + if (QT->isPointerType()) { + Context->ReportError(PVD->getLocation(), + "Compute kernel %0() cannot have " + "parameter '%1' of pointer type: '%2'") + << FD->getName() << PVD->getName() << PVD->getType().getAsString(); + valid = false; + } + } + + // Check that we have at least one allocation to use for dimensions. + if (valid && mIns.empty() && !mHasReturnType && Context->getTargetAPI() < SLANG_M_TARGET_API) { + Context->ReportError(FD->getLocation(), + "Compute kernel %0() targeting SDK levels " + "%1-%2 must have at least one " + "input parameter or a non-void return " + "type") + << FD->getName() << SLANG_MINIMUM_TARGET_API + << (SLANG_M_TARGET_API - 1); + valid = false; + } + + return valid; +} + +// Process the optional special parameters: +// - Sets *IndexOfFirstSpecialParameter to the index of the first special parameter, or +// FD->getNumParams() if none are found. +// - Add bits to mSpecialParameterSignatureMetadata for the found special parameters. +// Returns true if no errors. +bool RSExportForEach::processSpecialParameters( + RSContext *Context, const clang::FunctionDecl *FD, + size_t *IndexOfFirstSpecialParameter) { + auto DiagnosticCallback = [FD] { + std::ostringstream DiagnosticDescription; + DiagnosticDescription << "compute kernel " << FD->getName().str() << "()"; + return DiagnosticDescription.str(); + }; + return slang::processSpecialKernelParameters(Context, + DiagnosticCallback, + FD, + IndexOfFirstSpecialParameter, + &mSpecialParameterSignatureMetadata); +} + +bool RSExportForEach::setSignatureMetadata(RSContext *Context, + const clang::FunctionDecl *FD) { + mSignatureMetadata = 0; + bool valid = true; + + if (mIsKernelStyle) { + slangAssert(mOut == nullptr); + slangAssert(mUsrData == nullptr); + } else { + slangAssert(!mHasReturnType); + } + + // Set up the bitwise metadata encoding for runtime argument passing. + const bool HasOut = mOut || mHasReturnType; + mSignatureMetadata |= (hasIns() ? bcinfo::MD_SIG_In : 0); + mSignatureMetadata |= (HasOut ? bcinfo::MD_SIG_Out : 0); + mSignatureMetadata |= (mUsrData ? bcinfo::MD_SIG_Usr : 0); + mSignatureMetadata |= (mIsKernelStyle ? bcinfo::MD_SIG_Kernel : 0); // pass-by-value + mSignatureMetadata |= mSpecialParameterSignatureMetadata; + + if (Context->getTargetAPI() < SLANG_ICS_TARGET_API) { + // APIs before ICS cannot skip between parameters. It is ok, however, for + // them to omit further parameters (i.e. skipping X is ok if you skip Y). + if (mSignatureMetadata != (bcinfo::MD_SIG_In | bcinfo::MD_SIG_Out | bcinfo::MD_SIG_Usr | + bcinfo::MD_SIG_X | bcinfo::MD_SIG_Y) && + mSignatureMetadata != (bcinfo::MD_SIG_In | bcinfo::MD_SIG_Out | bcinfo::MD_SIG_Usr | + bcinfo::MD_SIG_X) && + mSignatureMetadata != (bcinfo::MD_SIG_In | bcinfo::MD_SIG_Out | bcinfo::MD_SIG_Usr) && + mSignatureMetadata != (bcinfo::MD_SIG_In | bcinfo::MD_SIG_Out) && + mSignatureMetadata != (bcinfo::MD_SIG_In)) { + Context->ReportError(FD->getLocation(), + "Compute kernel %0() targeting SDK levels " + "%1-%2 may not skip parameters") + << FD->getName() << SLANG_MINIMUM_TARGET_API + << (SLANG_ICS_TARGET_API - 1); + valid = false; + } + } + return valid; +} + +RSExportForEach *RSExportForEach::Create(RSContext *Context, + const clang::FunctionDecl *FD) { + slangAssert(Context && FD); + llvm::StringRef Name = FD->getName(); + RSExportForEach *FE; + + slangAssert(!Name.empty() && "Function must have a name"); + + FE = new RSExportForEach(Context, Name); + + if (!FE->validateAndConstructParams(Context, FD)) { + return nullptr; + } + + clang::ASTContext &Ctx = Context->getASTContext(); + + std::string Id = CreateDummyName("helper_foreach_param", FE->getName()); + + // Extract the usrData parameter (if we have one) + if (FE->mUsrData) { + const clang::ParmVarDecl *PVD = FE->mUsrData; + clang::QualType QT = PVD->getType().getCanonicalType(); + slangAssert(QT->isPointerType() && + QT->getPointeeType().isConstQualified()); + + const clang::ASTContext &C = Context->getASTContext(); + if (QT->getPointeeType().getCanonicalType().getUnqualifiedType() == + C.VoidTy) { + // In the case of using const void*, we can't reflect an appopriate + // Java type, so we fall back to just reflecting the ain/aout parameters + FE->mUsrData = nullptr; + } else { + clang::RecordDecl *RD = + clang::RecordDecl::Create(Ctx, clang::TTK_Struct, + Ctx.getTranslationUnitDecl(), + clang::SourceLocation(), + clang::SourceLocation(), + &Ctx.Idents.get(Id)); + + clang::FieldDecl *FD = + clang::FieldDecl::Create(Ctx, + RD, + clang::SourceLocation(), + clang::SourceLocation(), + PVD->getIdentifier(), + QT->getPointeeType(), + nullptr, + /* BitWidth = */ nullptr, + /* Mutable = */ false, + /* HasInit = */ clang::ICIS_NoInit); + RD->addDecl(FD); + RD->completeDefinition(); + + // Create an export type iff we have a valid usrData type + clang::QualType T = Ctx.getTagDeclType(RD); + slangAssert(!T.isNull()); + + RSExportType *ET = + RSExportType::Create(Context, T.getTypePtr(), LegacyKernelArgument); + + slangAssert(ET && "Failed to export a kernel"); + + slangAssert((ET->getClass() == RSExportType::ExportClassRecord) && + "Parameter packet must be a record"); + + FE->mParamPacketType = static_cast<RSExportRecordType *>(ET); + } + } + + // Construct type information about inputs and outputs. Return null when + // there is an error exporting types. + + bool TypeExportError = false; + + if (FE->hasIns()) { + for (InIter BI = FE->mIns.begin(), EI = FE->mIns.end(); BI != EI; BI++) { + const clang::Type *T = (*BI)->getType().getCanonicalType().getTypePtr(); + ExportKind EK = (FE->mIsKernelStyle ? NotLegacyKernelArgument : + LegacyKernelArgument); + RSExportType *InExportType = RSExportType::Create(Context, T, EK); + + // It is not an error if we don't export an input type for legacy + // kernel arguments. This can happen in the case of a void pointer. + if (FE->mIsKernelStyle && !InExportType) { + TypeExportError = true; + } + + FE->mInTypes.push_back(InExportType); + } + } + + if (FE->mIsKernelStyle && FE->mHasReturnType) { + const clang::Type *ReturnType = FE->mResultType.getTypePtr(); + FE->mOutType = RSExportType::Create(Context, ReturnType, + NotLegacyKernelArgument); + TypeExportError |= !FE->mOutType; + } else if (FE->mOut) { + const clang::Type *OutType = + FE->mOut->getType().getCanonicalType().getTypePtr(); + FE->mOutType = RSExportType::Create(Context, OutType, LegacyKernelArgument); + // It is not an error if we don't export an output type. + // This can happen in the case of a void pointer. + } + + if (TypeExportError) { + slangAssert(Context->getDiagnostics()->hasErrorOccurred() && + "Error exporting type but no diagnostic message issued!"); + return nullptr; + } + + return FE; +} + +RSExportForEach *RSExportForEach::CreateDummyRoot(RSContext *Context) { + slangAssert(Context); + llvm::StringRef Name = "root"; + RSExportForEach *FE = new RSExportForEach(Context, Name); + FE->mDummyRoot = true; + return FE; +} + +bool RSExportForEach::isRSForEachFunc(unsigned int targetAPI, + const clang::FunctionDecl *FD) { + if (!FD) { + return false; + } + + // Anything tagged as a kernel("") is definitely used with ForEach. + if (auto *Kernel = FD->getAttr<clang::KernelAttr>()) { + return Kernel->getKernelKind().empty(); + } + + if (RSSpecialFunc::isGraphicsRootRSFunc(targetAPI, FD)) { + return false; + } + + // Check if first parameter is a pointer (which is required for ForEach). + unsigned int numParams = FD->getNumParams(); + + if (numParams > 0) { + const clang::ParmVarDecl *PVD = FD->getParamDecl(0); + clang::QualType QT = PVD->getType().getCanonicalType(); + + if (QT->isPointerType()) { + return true; + } + + // Any non-graphics root() is automatically a ForEach candidate. + // At this point, however, we know that it is not going to be a valid + // compute root() function (due to not having a pointer parameter). We + // still want to return true here, so that we can issue appropriate + // diagnostics. + if (isRootRSFunc(FD)) { + return true; + } + } + + return false; +} + +unsigned RSExportForEach::getNumInputs(unsigned int targetAPI, + const clang::FunctionDecl *FD) { + unsigned numInputs = 0; + for (const clang::ParmVarDecl* param : FD->params()) { + if (!isSpecialKernelParameter(param->getName())) { + numInputs++; + } + } + + return numInputs; +} + +} // namespace slang
diff --git a/slang/slang_rs_export_foreach.h b/slang/slang_rs_export_foreach.h new file mode 100644 index 0000000..67b3a5c --- /dev/null +++ b/slang/slang_rs_export_foreach.h
@@ -0,0 +1,172 @@ +/* + * Copyright 2011-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_FOREACH_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_FOREACH_H_ + +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/Support/raw_ostream.h" + +#include "clang/AST/Decl.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "slang_rs_exportable.h" +#include "slang_rs_export_type.h" + +namespace clang { + class FunctionDecl; +} // namespace clang + +namespace slang { + +// Base class for reflecting control-side forEach (currently for root() +// functions that fit appropriate criteria) +class RSExportForEach : public RSExportable { + public: + + typedef llvm::SmallVectorImpl<const clang::ParmVarDecl*> InVec; + typedef llvm::SmallVectorImpl<const RSExportType*> InTypeVec; + + typedef InVec::const_iterator InIter; + typedef InTypeVec::const_iterator InTypeIter; + + private: + std::string mName; + RSExportRecordType *mParamPacketType; + llvm::SmallVector<const RSExportType*, 16> mInTypes; + RSExportType *mOutType; + size_t numParams; + + unsigned int mSignatureMetadata; + + llvm::SmallVector<const clang::ParmVarDecl*, 16> mIns; + const clang::ParmVarDecl *mOut; + const clang::ParmVarDecl *mUsrData; + + // Accumulator for metadata bits corresponding to special parameters. + unsigned int mSpecialParameterSignatureMetadata; + + clang::QualType mResultType; // return type (if present). + bool mHasReturnType; // does this kernel have a return type? + bool mIsKernelStyle; // is this a pass-by-value kernel? + + bool mDummyRoot; + + // TODO(all): Add support for LOD/face when we have them + RSExportForEach(RSContext *Context, const llvm::StringRef &Name) + : RSExportable(Context, RSExportable::EX_FOREACH), + mName(Name.data(), Name.size()), mParamPacketType(nullptr), + mOutType(nullptr), numParams(0), mSignatureMetadata(0), + mOut(nullptr), mUsrData(nullptr), mSpecialParameterSignatureMetadata(0), + mResultType(clang::QualType()), mHasReturnType(false), + mIsKernelStyle(false), mDummyRoot(false) { + } + + bool validateAndConstructParams(RSContext *Context, + const clang::FunctionDecl *FD); + + bool validateAndConstructOldStyleParams(RSContext *Context, + const clang::FunctionDecl *FD); + + bool validateAndConstructKernelParams(RSContext *Context, + const clang::FunctionDecl *FD); + + bool processSpecialParameters(RSContext *Context, + const clang::FunctionDecl *FD, + size_t *IndexOfFirstSpecialParameter); + + bool setSignatureMetadata(RSContext *Context, + const clang::FunctionDecl *FD); + public: + static RSExportForEach *Create(RSContext *Context, + const clang::FunctionDecl *FD); + + static RSExportForEach *CreateDummyRoot(RSContext *Context); + + inline const std::string &getName() const { + return mName; + } + + inline size_t getNumParameters() const { + return numParams; + } + + inline bool hasIns() const { + return (!mIns.empty()); + } + + inline bool hasOut() const { + return (mOut != nullptr); + } + + inline bool hasUsrData() const { + return (mUsrData != nullptr); + } + + inline bool hasReturn() const { + return mHasReturnType; + } + + inline const InVec& getIns() const { + return mIns; + } + + inline const InTypeVec& getInTypes() const { + return mInTypes; + } + + inline const RSExportType *getOutType() const { + return mOutType; + } + + inline const RSExportRecordType *getParamPacketType() const { + return mParamPacketType; + } + + inline unsigned int getSignatureMetadata() const { + return mSignatureMetadata; + } + + inline bool isDummyRoot() const { + return mDummyRoot; + } + + typedef RSExportRecordType::const_field_iterator const_param_iterator; + + inline const_param_iterator params_begin() const { + slangAssert((mParamPacketType != nullptr) && + "Get parameter from export foreach having no parameter!"); + return mParamPacketType->fields_begin(); + } + + inline const_param_iterator params_end() const { + slangAssert((mParamPacketType != nullptr) && + "Get parameter from export foreach having no parameter!"); + return mParamPacketType->fields_end(); + } + + static bool isRSForEachFunc(unsigned int targetAPI, + const clang::FunctionDecl *FD); + + static unsigned getNumInputs(unsigned int targetAPI, + const clang::FunctionDecl *FD); +}; // RSExportForEach + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_FOREACH_H_ NOLINT
diff --git a/slang/slang_rs_export_func.cpp b/slang/slang_rs_export_func.cpp new file mode 100644 index 0000000..519ac59 --- /dev/null +++ b/slang/slang_rs_export_func.cpp
@@ -0,0 +1,173 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_export_func.h" + +#include <string> + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Decl.h" + +#include "llvm/IR/DataLayout.h" +#include "llvm/IR/DerivedTypes.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" + +namespace slang { + +namespace { + +// Ensure that the exported function is actually valid +static bool ValidateFuncDecl(slang::RSContext *Context, + const clang::FunctionDecl *FD) { + slangAssert(Context && FD); + const clang::ASTContext &C = FD->getASTContext(); + if (FD->getReturnType().getCanonicalType() != C.VoidTy) { + Context->ReportError( + FD->getLocation(), + "invokable non-static functions are required to return void"); + return false; + } + return true; +} + +} // namespace + +RSExportFunc *RSExportFunc::Create(RSContext *Context, + const clang::FunctionDecl *FD) { + llvm::StringRef Name = FD->getName(); + RSExportFunc *F; + + slangAssert(!Name.empty() && "Function must have a name"); + + if (!ValidateFuncDecl(Context, FD)) { + return nullptr; + } + + F = new RSExportFunc(Context, Name, FD); + + // Initialize mParamPacketType + if (FD->getNumParams() <= 0) { + F->mParamPacketType = nullptr; + } else { + clang::ASTContext &Ctx = Context->getASTContext(); + + std::string Id = CreateDummyName("helper_func_param", F->getName()); + + clang::RecordDecl *RD = + clang::RecordDecl::Create(Ctx, clang::TTK_Struct, + Ctx.getTranslationUnitDecl(), + clang::SourceLocation(), + clang::SourceLocation(), + &Ctx.Idents.get(Id)); + + for (unsigned i = 0; i < FD->getNumParams(); i++) { + const clang::ParmVarDecl *PVD = FD->getParamDecl(i); + llvm::StringRef ParamName = PVD->getName(); + + if (PVD->hasDefaultArg()) + fprintf(stderr, "Note: parameter '%s' in function '%s' has default " + "value which is not supported\n", + ParamName.str().c_str(), + F->getName().c_str()); + + clang::FieldDecl *FD = + clang::FieldDecl::Create(Ctx, + RD, + clang::SourceLocation(), + clang::SourceLocation(), + PVD->getIdentifier(), + PVD->getOriginalType(), + nullptr, + /* BitWidth = */ nullptr, + /* Mutable = */ false, + /* HasInit = */ clang::ICIS_NoInit); + RD->addDecl(FD); + } + + RD->completeDefinition(); + + clang::QualType T = Ctx.getTagDeclType(RD); + slangAssert(!T.isNull()); + + RSExportType *ET = + RSExportType::Create(Context, T.getTypePtr(), NotLegacyKernelArgument); + + if (ET == nullptr) { + fprintf(stderr, "Failed to export the function %s. There's at least one " + "parameter whose type is not supported by the " + "reflection\n", F->getName().c_str()); + return nullptr; + } + + slangAssert((ET->getClass() == RSExportType::ExportClassRecord) && + "Parameter packet must be a record"); + + F->mParamPacketType = static_cast<RSExportRecordType *>(ET); + } + + return F; +} + +bool +RSExportFunc::checkParameterPacketType(llvm::StructType *ParamTy) const { + if (ParamTy == nullptr) + return !hasParam(); + else if (!hasParam()) + return false; + + slangAssert(mParamPacketType != nullptr); + + const RSExportRecordType *ERT = mParamPacketType; + // must have same number of elements + if (ERT->getFields().size() != ParamTy->getNumElements()) + return false; + + const llvm::StructLayout *ParamTySL = + getRSContext()->getDataLayout()->getStructLayout(ParamTy); + + unsigned Index = 0; + for (RSExportRecordType::const_field_iterator FI = ERT->fields_begin(), + FE = ERT->fields_end(); FI != FE; FI++, Index++) { + const RSExportRecordType::Field *F = *FI; + + llvm::Type *T1 = F->getType()->getLLVMType(); + llvm::Type *T2 = ParamTy->getTypeAtIndex(Index); + + // Fast check + if (T1 == T2) + continue; + + // Check offset + size_t T1Offset = F->getOffsetInParent(); + size_t T2Offset = ParamTySL->getElementOffset(Index); + + if (T1Offset != T2Offset) + return false; + + // Check size + size_t T1Size = F->getType()->getAllocSize(); + size_t T2Size = getRSContext()->getDataLayout()->getTypeAllocSize(T2); + + if (T1Size != T2Size) + return false; + } + + return true; +} + +} // namespace slang
diff --git a/slang/slang_rs_export_func.h b/slang/slang_rs_export_func.h new file mode 100644 index 0000000..3c0804d --- /dev/null +++ b/slang/slang_rs_export_func.h
@@ -0,0 +1,108 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_FUNC_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_FUNC_H_ + +#include <list> +#include <string> + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/raw_ostream.h" + +#include "clang/AST/Decl.h" + +#include "slang_assert.h" +#include "slang_rs_export_type.h" +#include "slang_rs_exportable.h" + +namespace llvm { + class StructType; +} + +namespace clang { + class FunctionDecl; +} // namespace clang + +namespace slang { + +class RSContext; + +class RSExportFunc : public RSExportable { + friend class RSContext; + + private: + std::string mName; + std::string mMangledName; + bool mShouldMangle; + RSExportRecordType *mParamPacketType; + + RSExportFunc(RSContext *Context, const llvm::StringRef &Name, + const clang::FunctionDecl *FD) + : RSExportable(Context, RSExportable::EX_FUNC), + mName(Name.data(), Name.size()), + mMangledName(), + mShouldMangle(false), + mParamPacketType(nullptr) { + + mShouldMangle = Context->getMangleContext().shouldMangleDeclName(FD); + + if (mShouldMangle) { + llvm::raw_string_ostream BufStm(mMangledName); + Context->getMangleContext().mangleName(FD, BufStm); + BufStm.flush(); + } + } + + public: + static RSExportFunc *Create(RSContext *Context, + const clang::FunctionDecl *FD); + + typedef RSExportRecordType::const_field_iterator const_param_iterator; + + inline const_param_iterator params_begin() const { + slangAssert((mParamPacketType != nullptr) && + "Get parameter from export function having no parameter!"); + return mParamPacketType->fields_begin(); + } + inline const_param_iterator params_end() const { + slangAssert((mParamPacketType != nullptr) && + "Get parameter from export function having no parameter!"); + return mParamPacketType->fields_end(); + } + + inline const std::string &getName(bool mangle = true) const { + return (mShouldMangle && mangle) ? mMangledName : mName; + } + + inline bool hasParam() const + { return (mParamPacketType && !mParamPacketType->getFields().empty()); } + inline size_t getNumParameters() const + { return ((mParamPacketType) ? mParamPacketType->getFields().size() : 0); } + + inline const RSExportRecordType *getParamPacketType() const + { return mParamPacketType; } + + // Check whether the given ParamsPacket type (in LLVM type) is "size + // equivalent" to the one obtained from getParamPacketType(). If the @Params + // is nullptr, means there must be no any parameters. + bool checkParameterPacketType(llvm::StructType *ParamTy) const; +}; // RSExportFunc + + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_FUNC_H_ NOLINT
diff --git a/slang/slang_rs_export_reduce.cpp b/slang/slang_rs_export_reduce.cpp new file mode 100644 index 0000000..e4de976 --- /dev/null +++ b/slang/slang_rs_export_reduce.cpp
@@ -0,0 +1,786 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_export_reduce.h" + +#include <algorithm> +#include <sstream> +#include <string> + +#include "clang/AST/ASTContext.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "slang_rs_export_type.h" +#include "slang_rs_object_ref_count.h" +#include "slang_rs_special_kernel_param.h" +#include "slang_version.h" + +#include "bcinfo/MetadataExtractor.h" + +namespace slang { + +const char RSExportReduce::KeyReduce[] = "reduce"; +const char RSExportReduce::KeyInitializer[] = "initializer"; +const char RSExportReduce::KeyAccumulator[] = "accumulator"; +const char RSExportReduce::KeyCombiner[] = "combiner"; +const char RSExportReduce::KeyOutConverter[] = "outconverter"; +const char RSExportReduce::KeyHalter[] = "halter"; + +bool RSExportReduce::matchName(const llvm::StringRef &Candidate) const { + return + Candidate.equals(mNameInitializer) || + Candidate.equals(mNameAccumulator) || + Candidate.equals(mNameCombiner) || + Candidate.equals(mNameOutConverter) || + Candidate.equals(mNameHalter); +} + +RSExportReduce *RSExportReduce::Create(RSContext *Context, + const clang::SourceLocation Location, + const llvm::StringRef &NameReduce, + const llvm::StringRef &NameInitializer, + const llvm::StringRef &NameAccumulator, + const llvm::StringRef &NameCombiner, + const llvm::StringRef &NameOutConverter, + const llvm::StringRef &NameHalter) { + slangAssert(Context); + RSExportReduce *RNE = new RSExportReduce(Context, + Location, + NameReduce, + NameInitializer, + NameAccumulator, + NameCombiner, + NameOutConverter, + NameHalter); + + return RNE; +} + +const char *RSExportReduce::getKey(FnIdent Kind) { + switch (Kind) { + default: + slangAssert(!"Unknown FnIdent"); + // and fall through + case FN_IDENT_INITIALIZER: + return KeyInitializer; + case FN_IDENT_ACCUMULATOR: + return KeyAccumulator; + case FN_IDENT_COMBINER: + return KeyCombiner; + case FN_IDENT_OUT_CONVERTER: + return KeyOutConverter; + case FN_IDENT_HALTER: + return KeyHalter; + } +} + +// This data is needed during analyzeTranslationUnit() but not afterwards. +// Breaking it out into a struct makes it easy for analyzeTranslationUnit() +// to call a number of helper functions that all need access to this data. +struct RSExportReduce::StateOfAnalyzeTranslationUnit { + + typedef std::function<std::string (const char *Key, const std::string &Name)> DiagnosticDescriptionType; + + StateOfAnalyzeTranslationUnit( + RSContext &anRSContext, + clang::Preprocessor &aPP, + clang::ASTContext &anASTContext, + const DiagnosticDescriptionType &aDiagnosticDescription) : + + RSC(anRSContext), + PP(aPP), + ASTC(anASTContext), + DiagnosticDescription(aDiagnosticDescription), + + Ok(true), + + FnInitializer(nullptr), + FnAccumulator(nullptr), + FnCombiner(nullptr), + FnOutConverter(nullptr), + FnHalter(nullptr), + + FnInitializerParam(nullptr), + FnInitializerParamTy(), + + FnAccumulatorOk(true), + FnAccumulatorParamFirst(nullptr), + FnAccumulatorParamFirstTy(), + FnAccumulatorIndexOfFirstSpecialParameter(0), + + FnOutConverterOk(true), + FnOutConverterParamFirst(nullptr), + FnOutConverterParamFirstTy() + { } + + /*-- Convenience ------------------------------------------*/ + + RSContext &RSC; + clang::Preprocessor &PP; + clang::ASTContext &ASTC; + const DiagnosticDescriptionType DiagnosticDescription; + + /*-- Actual state -----------------------------------------*/ + + bool Ok; + + clang::FunctionDecl *FnInitializer; + clang::FunctionDecl *FnAccumulator; + clang::FunctionDecl *FnCombiner; + clang::FunctionDecl *FnOutConverter; + clang::FunctionDecl *FnHalter; + + clang::ParmVarDecl *FnInitializerParam; + clang::QualType FnInitializerParamTy; + + bool FnAccumulatorOk; + clang::ParmVarDecl *FnAccumulatorParamFirst; + clang::QualType FnAccumulatorParamFirstTy; + size_t FnAccumulatorIndexOfFirstSpecialParameter; + + bool FnOutConverterOk; // also true if no outconverter + clang::ParmVarDecl *FnOutConverterParamFirst; + clang::QualType FnOutConverterParamFirstTy; +}; + +// does update S.Ok +clang::FunctionDecl *RSExportReduce::lookupFunction(StateOfAnalyzeTranslationUnit &S, + const char *Kind, const llvm::StringRef &Name) { + if (Name.empty()) + return nullptr; + + clang::TranslationUnitDecl *TUDecl = getRSContext()->getASTContext().getTranslationUnitDecl(); + slangAssert(TUDecl); + + clang::FunctionDecl *Ret = nullptr; + const clang::IdentifierInfo *II = S.PP.getIdentifierInfo(Name); + if (II) { + for (auto Decl : TUDecl->lookup(II)) { + clang::FunctionDecl *FDecl = Decl->getAsFunction(); + if (!FDecl || !FDecl->isThisDeclarationADefinition()) + continue; + if (Ret) { + S.RSC.ReportError(mLocation, + "duplicate function definition for '%0(%1)' for '#pragma rs %2(%3)' (%4, %5)") + << Kind << Name << KeyReduce << mNameReduce + << Ret->getLocation().printToString(S.PP.getSourceManager()) + << FDecl->getLocation().printToString(S.PP.getSourceManager()); + S.Ok = false; + return nullptr; + } + Ret = FDecl; + } + } + if (!Ret) { + // Either the identifier lookup failed, or we never found the function definition. + S.RSC.ReportError(mLocation, + "could not find function definition for '%0(%1)' for '#pragma rs %2(%3)'") + << Kind << Name << KeyReduce << mNameReduce; + S.Ok = false; + return nullptr; + } + if (Ret) { + // Must have internal linkage + if (Ret->getFormalLinkage() != clang::InternalLinkage) { + S.RSC.ReportError(Ret->getLocation(), "%0 must be static") + << S.DiagnosticDescription(Kind, Name); + S.Ok = false; + } + } + if (Ret == nullptr) + S.Ok = false; + return Ret; +} + +// updates S.Ok; and, depending on Kind, possibly S.FnAccumulatorOk or S.FnOutConverterOk +void RSExportReduce::notOk(StateOfAnalyzeTranslationUnit &S, FnIdent Kind) { + S.Ok = false; + if (Kind == FN_IDENT_ACCUMULATOR) { + S.FnAccumulatorOk = false; + } else if (Kind == FN_IDENT_OUT_CONVERTER) { + S.FnOutConverterOk = false; + } +} + +// updates S.Ok; and, depending on Kind, possibly S.FnAccumulatorOk or S.FnOutConverterOk +void RSExportReduce::checkVoidReturn(StateOfAnalyzeTranslationUnit &S, + FnIdent Kind, clang::FunctionDecl *Fn) { + slangAssert(Fn); + const clang::QualType ReturnTy = Fn->getReturnType().getCanonicalType(); + if (!ReturnTy->isVoidType()) { + S.RSC.ReportError(Fn->getLocation(), + "%0 must return void not '%1'") + << S.DiagnosticDescription(getKey(Kind), Fn->getName()) << ReturnTy.getAsString(); + notOk(S, Kind); + } +} + +// updates S.Ok; and, depending on Kind, possibly S.FnAccumulatorOk or S.FnOutConverterOk +void RSExportReduce::checkPointeeConstQualified(StateOfAnalyzeTranslationUnit &S, + FnIdent Kind, const llvm::StringRef &Name, + const clang::ParmVarDecl *Param, bool ExpectedQualification) { + const clang::QualType ParamQType = Param->getType(); + slangAssert(ParamQType->isPointerType()); + const clang::QualType PointeeQType = ParamQType->getPointeeType(); + if (PointeeQType.isConstQualified() != ExpectedQualification) { + S.RSC.ReportError(Param->getLocation(), + "%0 parameter '%1' (type '%2') must%3 point to const-qualified type") + << S.DiagnosticDescription(getKey(Kind), Name) + << Param->getName() << ParamQType.getAsString() + << (ExpectedQualification ? "" : " not"); + notOk(S, Kind); + } +} + +// Process "void mNameInitializer(compType *accum)" +void RSExportReduce::analyzeInitializer(StateOfAnalyzeTranslationUnit &S) { + if (!S.FnInitializer) // initializer is always optional + return; + + // Must return void + checkVoidReturn(S, FN_IDENT_INITIALIZER, S.FnInitializer); + + // Must have exactly one parameter + if (S.FnInitializer->getNumParams() != 1) { + S.RSC.ReportError(S.FnInitializer->getLocation(), + "%0 must take exactly 1 parameter (found %1)") + << S.DiagnosticDescription(KeyInitializer, mNameInitializer) + << S.FnInitializer->getNumParams(); + S.Ok = false; + return; + } + + // Parameter must not be a special parameter + S.FnInitializerParam = S.FnInitializer->getParamDecl(0); + if (isSpecialKernelParameter(S.FnInitializerParam->getName())) { + S.RSC.ReportError(S.FnInitializer->getLocation(), + "%0 cannot take special parameter '%1'") + << S.DiagnosticDescription(KeyInitializer, mNameInitializer) + << S.FnInitializerParam->getName(); + S.Ok = false; + return; + } + + // Parameter must be of pointer type + S.FnInitializerParamTy = S.FnInitializerParam->getType().getCanonicalType(); + if (!S.FnInitializerParamTy->isPointerType()) { + S.RSC.ReportError(S.FnInitializer->getLocation(), + "%0 parameter '%1' must be of pointer type not '%2'") + << S.DiagnosticDescription(KeyInitializer, mNameInitializer) + << S.FnInitializerParam->getName() << S.FnInitializerParamTy.getAsString(); + S.Ok = false; + return; + } + + // Parameter must not point to const-qualified + checkPointeeConstQualified(S, FN_IDENT_INITIALIZER, mNameInitializer, S.FnInitializerParam, false); +} + +// Process "void mNameAccumulator(compType *accum, in1Type in1, …, inNType inN[, specialarguments])" +void RSExportReduce::analyzeAccumulator(StateOfAnalyzeTranslationUnit &S) { + slangAssert(S.FnAccumulator); + + // Must return void + checkVoidReturn(S, FN_IDENT_ACCUMULATOR, S.FnAccumulator); + + // Must have initial parameter of same type as initializer parameter + // (if there is an initializer), followed by at least 1 input + + if (S.FnAccumulator->getNumParams() < 2) { + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 must take at least 2 parameters") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator); + S.Ok = S.FnAccumulatorOk = false; + return; + } + + S.FnAccumulatorParamFirst = S.FnAccumulator->getParamDecl(0); + S.FnAccumulatorParamFirstTy = S.FnAccumulatorParamFirst->getType().getCanonicalType(); + + // First parameter must be of pointer type + if (!S.FnAccumulatorParamFirstTy->isPointerType()) { + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 parameter '%1' must be of pointer type not '%2'") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString(); + S.Ok = S.FnAccumulatorOk = false; + return; + } + + // If there is an initializer with a pointer-typed parameter (as + // opposed to an initializer with a bad parameter list), then + // accumulator first parameter must be of same type as initializer + // parameter + if (S.FnInitializer && + !S.FnInitializerParamTy.isNull() && + S.FnInitializerParamTy->isPointerType() && + !S.FnAccumulator->getASTContext().hasSameUnqualifiedType( + S.FnInitializerParamTy->getPointeeType().getCanonicalType(), + S.FnAccumulatorParamFirstTy->getPointeeType().getCanonicalType())) { + // <accumulator> parameter '<baz>' (type '<tbaz>') and initializer <goo>() parameter '<gaz>' (type '<tgaz>') + // must be pointers to the same type + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 parameter '%1' (type '%2') and %3 %4() parameter '%5' (type '%6')" + " must be pointers to the same type") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString() + << KeyInitializer << mNameInitializer + << S.FnInitializerParam->getName() << S.FnInitializerParamTy.getAsString(); + S.Ok = S.FnAccumulatorOk = false; + } + + if (S.FnAccumulatorOk && S.FnAccumulatorParamFirstTy->getPointeeType()->isFunctionType()) { + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 parameter '%1' (type '%2') must not be pointer to function type") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString(); + S.Ok = S.FnAccumulatorOk = false; + } + + if (S.FnAccumulatorOk && S.FnAccumulatorParamFirstTy->getPointeeType()->isIncompleteType()) { + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 parameter '%1' (type '%2') must not be pointer to incomplete type") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString(); + S.Ok = S.FnAccumulatorOk = false; + } + + if (S.FnAccumulatorOk && + HasRSObjectType(S.FnAccumulatorParamFirstTy->getPointeeType().getCanonicalType().getTypePtr())) { + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 parameter '%1' (type '%2') must not be pointer to data containing an object type") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString(); + S.Ok = S.FnAccumulatorOk = false; + } + + // Parameter must not point to const-qualified + checkPointeeConstQualified(S, FN_IDENT_ACCUMULATOR, mNameAccumulator, S.FnAccumulatorParamFirst, false); + + // Analyze special parameters + S.Ok &= (S.FnAccumulatorOk &= processSpecialKernelParameters( + &S.RSC, + std::bind(S.DiagnosticDescription, KeyAccumulator, mNameAccumulator), + S.FnAccumulator, + &S.FnAccumulatorIndexOfFirstSpecialParameter, + &mAccumulatorSignatureMetadata)); + + // Must have at least an accumulator and an input. + // If we get here we know there are at least 2 arguments; so the only problem case is + // where we have an accumulator followed immediately by a special parameter. + if (S.FnAccumulatorIndexOfFirstSpecialParameter < 2) { + slangAssert(S.FnAccumulatorIndexOfFirstSpecialParameter < S.FnAccumulator->getNumParams()); + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 must have at least 1 input ('%1' is a special parameter)") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << S.FnAccumulator->getParamDecl(S.FnAccumulatorIndexOfFirstSpecialParameter)->getName(); + S.Ok = S.FnAccumulatorOk = false; + return; + } + + if (S.FnAccumulatorOk) { + mAccumulatorSignatureMetadata |= bcinfo::MD_SIG_In; + mAccumulatorTypeSize = S.ASTC.getTypeSizeInChars(S.FnAccumulatorParamFirstTy->getPointeeType()).getQuantity(); + for (size_t ParamIdx = 1; ParamIdx < S.FnAccumulatorIndexOfFirstSpecialParameter; ++ParamIdx) { + const clang::ParmVarDecl *const Param = S.FnAccumulator->getParamDecl(ParamIdx); + mAccumulatorIns.push_back(Param); + const clang::QualType ParamQType = Param->getType().getCanonicalType(); + const clang::Type *ParamType = ParamQType.getTypePtr(); + + RSExportType *ParamEType = nullptr; + if (ParamQType->isPointerType()) { + S.RSC.ReportError(Param->getLocation(), + "%0 parameter '%1' (type '%2') must not be a pointer") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << Param->getName() << ParamQType.getAsString(); + S.Ok = false; + } else if (HasRSObjectType(ParamType)) { + S.RSC.ReportError(Param->getLocation(), + "%0 parameter '%1' (type '%2') must not contain an object type") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << Param->getName() << ParamQType.getAsString(); + S.Ok = false; + } else if (RSExportType::ValidateType(&S.RSC, S.ASTC, ParamQType, Param, Param->getLocStart(), + S.RSC.getTargetAPI(), + false /* IsFilterscript */, + true /* IsExtern */)) { + // TODO: Better diagnostics on validation or creation failure? + ParamEType = RSExportType::Create(&S.RSC, ParamType, NotLegacyKernelArgument); + S.Ok &= (ParamEType != nullptr); + } else { + S.Ok = false; + } + mAccumulatorInTypes.push_back(ParamEType); // possibly nullptr + } + } +} + +// Process "void combinename(compType *accum, const compType *val)" +void RSExportReduce::analyzeCombiner(StateOfAnalyzeTranslationUnit &S) { + if (S.FnCombiner) { + // Must return void + checkVoidReturn(S, FN_IDENT_COMBINER, S.FnCombiner); + + // Must have exactly two parameters, of same type as first accumulator parameter + + if (S.FnCombiner->getNumParams() != 2) { + S.RSC.ReportError(S.FnCombiner->getLocation(), + "%0 must take exactly 2 parameters (found %1)") + << S.DiagnosticDescription(KeyCombiner, mNameCombiner) + << S.FnCombiner->getNumParams(); + S.Ok = false; + return; + } + + if (S.FnAccumulatorParamFirstTy.isNull() || !S.FnAccumulatorParamFirstTy->isPointerType()) { + // We're already in an error situation. We could compare + // against the initializer parameter type instead of the first + // accumulator parameter type (we'd have to check for the + // availability of a parameter type there, too), but it does not + // seem worth the effort. + // + // Likewise, we could compare the two combiner parameter types + // against each other. + slangAssert(!S.Ok); + return; + } + + for (int ParamIdx = 0; ParamIdx < 2; ++ParamIdx) { + const clang::ParmVarDecl *const FnCombinerParam = S.FnCombiner->getParamDecl(ParamIdx); + const clang::QualType FnCombinerParamTy = FnCombinerParam->getType().getCanonicalType(); + if (!FnCombinerParamTy->isPointerType() || + !S.FnCombiner->getASTContext().hasSameUnqualifiedType( + S.FnAccumulatorParamFirstTy->getPointeeType().getCanonicalType(), + FnCombinerParamTy->getPointeeType().getCanonicalType())) { + // <combiner> parameter '<baz>' (type '<tbaz>') + // and accumulator <goo>() parameter '<gaz>' (type '<tgaz>') must be pointers to the same type + S.RSC.ReportError(S.FnCombiner->getLocation(), + "%0 parameter '%1' (type '%2') and %3 %4() parameter '%5' (type '%6')" + " must be pointers to the same type") + << S.DiagnosticDescription(KeyCombiner, mNameCombiner) + << FnCombinerParam->getName() << FnCombinerParamTy.getAsString() + << KeyAccumulator << mNameAccumulator + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString(); + S.Ok = false; + } else { + // Check const-qualification + checkPointeeConstQualified(S, FN_IDENT_COMBINER, mNameCombiner, FnCombinerParam, ParamIdx==1); + } + } + + return; + } + + // Ensure accumulator properties permit omission of combiner. + + if (!S.FnAccumulatorOk) { + // Couldn't fully analyze accumulator, so cannot see whether it permits omission of combiner. + return; + } + + if (mAccumulatorIns.size() != 1 || + S.FnAccumulatorIndexOfFirstSpecialParameter != S.FnAccumulator->getNumParams()) + { + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 must have exactly 1 input" + " and no special parameters in order for the %1 to be omitted") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << KeyCombiner; + S.Ok = false; + return; + } + + const clang::ParmVarDecl *const FnAccumulatorParamInput = S.FnAccumulator->getParamDecl(1); + const clang::QualType FnAccumulatorParamInputTy = FnAccumulatorParamInput->getType().getCanonicalType(); + if (!S.FnAccumulator->getASTContext().hasSameUnqualifiedType( + S.FnAccumulatorParamFirstTy->getPointeeType().getCanonicalType(), + FnAccumulatorParamInputTy.getCanonicalType())) { + S.RSC.ReportError(S.FnAccumulator->getLocation(), + "%0 parameter '%1' (type '%2')" + " must be pointer to the type of parameter '%3' (type '%4')" + " in order for the %5 to be omitted") + << S.DiagnosticDescription(KeyAccumulator, mNameAccumulator) + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString() + << FnAccumulatorParamInput->getName() << FnAccumulatorParamInputTy.getAsString() + << KeyCombiner; + S.Ok = false; + } +} + +// Process "void outconvertname(resultType *result, const compType *accum)" +void RSExportReduce::analyzeOutConverter(StateOfAnalyzeTranslationUnit &S) { + if (!S.FnOutConverter) // outconverter is always optional + return; + + // Must return void + checkVoidReturn(S, FN_IDENT_OUT_CONVERTER, S.FnOutConverter); + + // Must have exactly two parameters + if (S.FnOutConverter->getNumParams() != 2) { + S.RSC.ReportError(S.FnOutConverter->getLocation(), + "%0 must take exactly 2 parameters (found %1)") + << S.DiagnosticDescription(KeyOutConverter, mNameOutConverter) + << S.FnOutConverter->getNumParams(); + S.Ok = S.FnOutConverterOk = false; + return; + } + + // Parameters must not be special and must be of pointer type; + // and second parameter must match first accumulator parameter + for (int ParamIdx = 0; ParamIdx < 2; ++ParamIdx) { + clang::ParmVarDecl *const FnOutConverterParam = S.FnOutConverter->getParamDecl(ParamIdx); + + if (isSpecialKernelParameter(FnOutConverterParam->getName())) { + S.RSC.ReportError(S.FnOutConverter->getLocation(), + "%0 cannot take special parameter '%1'") + << S.DiagnosticDescription(KeyOutConverter, mNameOutConverter) + << FnOutConverterParam->getName(); + S.Ok = S.FnOutConverterOk = false; + continue; + } + + const clang::QualType FnOutConverterParamTy = FnOutConverterParam->getType().getCanonicalType(); + + if (!FnOutConverterParamTy->isPointerType()) { + S.RSC.ReportError(S.FnOutConverter->getLocation(), + "%0 parameter '%1' must be of pointer type not '%2'") + << S.DiagnosticDescription(KeyOutConverter, mNameOutConverter) + << FnOutConverterParam->getName() << FnOutConverterParamTy.getAsString(); + S.Ok = S.FnOutConverterOk = false; + continue; + } + + // Check const-qualification + checkPointeeConstQualified(S, FN_IDENT_OUT_CONVERTER, mNameOutConverter, FnOutConverterParam, ParamIdx==1); + + if (ParamIdx == 0) { + S.FnOutConverterParamFirst = FnOutConverterParam; + S.FnOutConverterParamFirstTy = FnOutConverterParamTy; + continue; + } + + if (S.FnAccumulatorParamFirstTy.isNull() || !S.FnAccumulatorParamFirstTy->isPointerType()) { + // We're already in an error situation. We could compare + // against the initializer parameter type instead of the first + // accumulator parameter type (we'd have to check for the + // availability of a parameter type there, too), but it does not + // seem worth the effort. + slangAssert(!S.Ok); + continue; + } + + if (!S.FnOutConverter->getASTContext().hasSameUnqualifiedType( + S.FnAccumulatorParamFirstTy->getPointeeType().getCanonicalType(), + FnOutConverterParamTy->getPointeeType().getCanonicalType())) { + // <outconverter> parameter '<baz>' (type '<tbaz>') + // and accumulator <goo>() parameter '<gaz>' (type '<tgaz>') must be pointers to the same type + S.RSC.ReportError(S.FnOutConverter->getLocation(), + "%0 parameter '%1' (type '%2') and %3 %4() parameter '%5' (type '%6')" + " must be pointers to the same type") + << S.DiagnosticDescription(KeyOutConverter, mNameOutConverter) + << FnOutConverterParam->getName() << FnOutConverterParamTy.getAsString() + << KeyAccumulator << mNameAccumulator + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString(); + S.Ok = S.FnOutConverterOk = false; + } + } +} + +// Process "bool haltername(const compType *accum)" +void RSExportReduce::analyzeHalter(StateOfAnalyzeTranslationUnit &S) { + if (!S.FnHalter) // halter is always optional + return; + + // Must return bool + const clang::QualType ReturnTy = S.FnHalter->getReturnType().getCanonicalType(); + if (!ReturnTy->isBooleanType()) { + S.RSC.ReportError(S.FnHalter->getLocation(), + "%0 must return bool not '%1'") + << S.DiagnosticDescription(KeyHalter, mNameHalter) << ReturnTy.getAsString(); + S.Ok = false; + } + + // Must have exactly one parameter + if (S.FnHalter->getNumParams() != 1) { + S.RSC.ReportError(S.FnHalter->getLocation(), + "%0 must take exactly 1 parameter (found %1)") + << S.DiagnosticDescription(KeyHalter, mNameHalter) + << S.FnHalter->getNumParams(); + S.Ok = false; + return; + } + + // Parameter must not be a special parameter + const clang::ParmVarDecl *const FnHalterParam = S.FnHalter->getParamDecl(0); + if (isSpecialKernelParameter(FnHalterParam->getName())) { + S.RSC.ReportError(S.FnHalter->getLocation(), + "%0 cannot take special parameter '%1'") + << S.DiagnosticDescription(KeyHalter, mNameHalter) + << FnHalterParam->getName(); + S.Ok = false; + return; + } + + // Parameter must be same type as first accumulator parameter + + if (S.FnAccumulatorParamFirstTy.isNull() || !S.FnAccumulatorParamFirstTy->isPointerType()) { + // We're already in an error situation. We could compare against + // the initializer parameter type or the first combiner parameter + // type instead of the first accumulator parameter type (we'd have + // to check for the availability of a parameter type there, too), + // but it does not seem worth the effort. + slangAssert(!S.Ok); + return; + } + + const clang::QualType FnHalterParamTy = FnHalterParam->getType().getCanonicalType(); + if (!FnHalterParamTy->isPointerType() || + !S.FnHalter->getASTContext().hasSameUnqualifiedType( + S.FnAccumulatorParamFirstTy->getPointeeType().getCanonicalType(), + FnHalterParamTy->getPointeeType().getCanonicalType())) { + // <halter> parameter '<baz>' (type '<tbaz>') + // and accumulator <goo>() parameter '<gaz>' (type '<tgaz>') must be pointers to the same type + S.RSC.ReportError(S.FnHalter->getLocation(), + "%0 parameter '%1' (type '%2') and %3 %4() parameter '%5' (type '%6')" + " must be pointers to the same type") + << S.DiagnosticDescription(KeyHalter, mNameHalter) + << FnHalterParam->getName() << FnHalterParamTy.getAsString() + << KeyAccumulator << mNameAccumulator + << S.FnAccumulatorParamFirst->getName() << S.FnAccumulatorParamFirstTy.getAsString(); + S.Ok = false; + return; + } + + // Parameter must point to const-qualified + checkPointeeConstQualified(S, FN_IDENT_HALTER, mNameHalter, FnHalterParam, true); +} + +void RSExportReduce::analyzeResultType(StateOfAnalyzeTranslationUnit &S) { + if (!(S.FnAccumulatorOk && S.FnOutConverterOk)) { + // No idea what the result type is + slangAssert(!S.Ok); + return; + } + + struct ResultInfoType { + const clang::QualType QType; + clang::VarDecl *const Decl; + const char *FnKey; + const std::string &FnName; + std::function<std::string ()> UnlessOutConverter; + } ResultInfo = + S.FnOutConverter + ? ResultInfoType({ S.FnOutConverterParamFirstTy, S.FnOutConverterParamFirst, + KeyOutConverter, mNameOutConverter, + []() { return std::string(""); }}) + : ResultInfoType({ S.FnAccumulatorParamFirstTy, S.FnAccumulatorParamFirst, + KeyAccumulator, mNameAccumulator, + []() { return std::string(" unless ") + KeyOutConverter + " is provided"; }}); + const clang::QualType PointeeQType = ResultInfo.QType->getPointeeType(); + + if (PointeeQType->isPointerType()) { + S.RSC.ReportError(ResultInfo.Decl->getLocation(), + "%0 parameter '%1' (type '%2') must not point to a pointer%3") + << S.DiagnosticDescription(ResultInfo.FnKey, ResultInfo.FnName) + << ResultInfo.Decl->getName() << ResultInfo.QType.getAsString() + << ResultInfo.UnlessOutConverter(); + } else if (PointeeQType->isIncompleteType()) { + S.RSC.ReportError(ResultInfo.Decl->getLocation(), + "%0 parameter '%1' (type '%2') must not point to an incomplete type%3") + << S.DiagnosticDescription(ResultInfo.FnKey, ResultInfo.FnName) + << ResultInfo.Decl->getName() << ResultInfo.QType.getAsString() + << ResultInfo.UnlessOutConverter(); + } else if (HasRSObjectType(PointeeQType.getTypePtr())) { + S.RSC.ReportError(ResultInfo.Decl->getLocation(), + "%0 parameter '%1' (type '%2') must not point to data containing an object type%3") + << S.DiagnosticDescription(ResultInfo.FnKey, ResultInfo.FnName) + << ResultInfo.Decl->getName() << ResultInfo.QType.getAsString() + << ResultInfo.UnlessOutConverter(); + } else if (RSExportType::ValidateType(&S.RSC, S.ASTC, PointeeQType, + ResultInfo.Decl, ResultInfo.Decl->getLocStart(), + S.RSC.getTargetAPI(), + false /* IsFilterscript */, + true /* IsExtern */)) { + // TODO: Better diagnostics on validation or creation failure? + if ((mResultType = RSExportType::Create(&S.RSC, PointeeQType.getTypePtr(), + NotLegacyKernelArgument, ResultInfo.Decl)) != nullptr) { + const RSExportType *CheckType = mResultType; + const char *ArrayErrorPhrase = ""; + if (mResultType->getClass() == RSExportType::ExportClassConstantArray) { + CheckType = static_cast<const RSExportConstantArrayType *>(mResultType)->getElementType(); + ArrayErrorPhrase = "n array of"; + } + switch (CheckType->getClass()) { + case RSExportType::ExportClassMatrix: + // Not supported for now -- what does a matrix result type mean? + S.RSC.ReportError(ResultInfo.Decl->getLocation(), + "%0 parameter '%1' (type '%2') must not point to a%3 matrix type%4") + << S.DiagnosticDescription(ResultInfo.FnKey, ResultInfo.FnName) + << ResultInfo.Decl->getName() << ResultInfo.QType.getAsString() + << ArrayErrorPhrase + << ResultInfo.UnlessOutConverter(); + mResultType = nullptr; + break; + default: + // All's well + break; + } + } + } + + if (mResultType) + S.RSC.insertExportReduceResultType(mResultType); + else + S.Ok = false; +} + +bool RSExportReduce::analyzeTranslationUnit() { + + RSContext &RSC = *getRSContext(); + clang::Preprocessor &PP = RSC.getPreprocessor(); + + StateOfAnalyzeTranslationUnit S( + RSC, PP, RSC.getASTContext(), + [&RSC, &PP, this] (const char *Key, const std::string &Name) { + std::ostringstream Description; + Description + << Key << " " << Name << "()" + << " for '#pragma rs " << KeyReduce << "(" << mNameReduce << ")'" + << " (" << mLocation.printToString(PP.getSourceManager()) << ")"; + return Description.str(); + }); + + S.FnInitializer = lookupFunction(S, KeyInitializer, mNameInitializer); + S.FnAccumulator = lookupFunction(S, KeyAccumulator, mNameAccumulator); + S.FnCombiner = lookupFunction(S, KeyCombiner, mNameCombiner); + S.FnOutConverter = lookupFunction(S, KeyOutConverter, mNameOutConverter); + S.FnHalter = lookupFunction(S, KeyHalter, mNameHalter); + + if (!S.Ok) + return false; + + analyzeInitializer(S); + analyzeAccumulator(S); + analyzeCombiner(S); + analyzeOutConverter(S); + analyzeHalter(S); + analyzeResultType(S); + + return S.Ok; +} + +} // namespace slang
diff --git a/slang/slang_rs_export_reduce.h b/slang/slang_rs_export_reduce.h new file mode 100644 index 0000000..491bf19 --- /dev/null +++ b/slang/slang_rs_export_reduce.h
@@ -0,0 +1,168 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_REDUCE_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_REDUCE_H_ + +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/SmallVector.h" + +#include "slang_rs_context.h" +#include "slang_rs_exportable.h" +#include "slang_rs_export_type.h" + +namespace clang { + class FunctionDecl; +} // namespace clang + +namespace slang { + +// Base class for reflecting control-side reduce +class RSExportReduce : public RSExportable { + public: + typedef llvm::SmallVectorImpl<const clang::ParmVarDecl*> InVec; + typedef llvm::SmallVectorImpl<const RSExportType*> InTypeVec; + + typedef InVec::const_iterator InIter; + typedef InTypeVec::const_iterator InTypeIter; + + private: + // pragma location (for error reporting) + clang::SourceLocation mLocation; + + // reduction kernel name + std::string mNameReduce; + + // constituent function names + std::string mNameInitializer; + std::string mNameAccumulator; + std::string mNameCombiner; + std::string mNameOutConverter; + std::string mNameHalter; + + // constituent function identity + enum FnIdent { + FN_IDENT_INITIALIZER, + FN_IDENT_ACCUMULATOR, + FN_IDENT_COMBINER, + FN_IDENT_OUT_CONVERTER, + FN_IDENT_HALTER + }; + static const char *getKey(FnIdent Kind); + + // signature information for accumulator function + unsigned int mAccumulatorSignatureMetadata; + + // size of accumulator data type (compType), in bytes + unsigned int mAccumulatorTypeSize; + + // input information for accumulator function + static const int kAccumulatorInsSmallSize = 4; + llvm::SmallVector<const clang::ParmVarDecl*, kAccumulatorInsSmallSize> mAccumulatorIns; + llvm::SmallVector<const RSExportType*, kAccumulatorInsSmallSize> mAccumulatorInTypes; + + // result information + RSExportType *mResultType; + + RSExportReduce(RSContext *Context, + const clang::SourceLocation Location, + const llvm::StringRef &NameReduce, + const llvm::StringRef &NameInitializer, + const llvm::StringRef &NameAccumulator, + const llvm::StringRef &NameCombiner, + const llvm::StringRef &NameOutConverter, + const llvm::StringRef &NameHalter) + : RSExportable(Context, RSExportable::EX_REDUCE), + mLocation(Location), + mNameReduce(NameReduce), + mNameInitializer(NameInitializer), + mNameAccumulator(NameAccumulator), + mNameCombiner(NameCombiner), + mNameOutConverter(NameOutConverter), + mNameHalter(NameHalter), + mAccumulatorSignatureMetadata(0), + mAccumulatorTypeSize(0), + mResultType(nullptr) { + } + + RSExportReduce(const RSExportReduce &) = delete; + void operator=(const RSExportReduce &) = delete; + + struct StateOfAnalyzeTranslationUnit; + + static void notOk(StateOfAnalyzeTranslationUnit &S, FnIdent Kind); + + static void checkPointeeConstQualified(StateOfAnalyzeTranslationUnit &S, + FnIdent Kind, const llvm::StringRef &Name, + const clang::ParmVarDecl *Param, bool ExpectedQualification); + + static void checkVoidReturn(StateOfAnalyzeTranslationUnit &S, FnIdent Kind, clang::FunctionDecl *Fn); + + clang::FunctionDecl *lookupFunction(StateOfAnalyzeTranslationUnit &S, + const char *Kind, const llvm::StringRef &Name); + + void analyzeInitializer(StateOfAnalyzeTranslationUnit &S); + void analyzeAccumulator(StateOfAnalyzeTranslationUnit &S); + void analyzeCombiner(StateOfAnalyzeTranslationUnit &S); + void analyzeOutConverter(StateOfAnalyzeTranslationUnit &S); + void analyzeHalter(StateOfAnalyzeTranslationUnit &S); + void analyzeResultType(StateOfAnalyzeTranslationUnit &S); + + public: + + static const char KeyReduce[]; + static const char KeyInitializer[]; + static const char KeyAccumulator[]; + static const char KeyCombiner[]; + static const char KeyOutConverter[]; + static const char KeyHalter[]; + + static RSExportReduce *Create(RSContext *Context, + const clang::SourceLocation Location, + const llvm::StringRef &NameReduce, + const llvm::StringRef &NameInitializer, + const llvm::StringRef &NameAccumulator, + const llvm::StringRef &NameCombiner, + const llvm::StringRef &NameOutConverter, + const llvm::StringRef &NameHalter); + + const clang::SourceLocation &getLocation() const { return mLocation; } + + const std::string &getNameReduce() const { return mNameReduce; } + const std::string &getNameInitializer() const { return mNameInitializer; } + const std::string &getNameAccumulator() const { return mNameAccumulator; } + const std::string &getNameCombiner() const { return mNameCombiner; } + const std::string &getNameOutConverter() const { return mNameOutConverter; } + const std::string &getNameHalter() const { return mNameHalter; } + + unsigned int getAccumulatorSignatureMetadata() const { return mAccumulatorSignatureMetadata; } + + unsigned int getAccumulatorTypeSize() const { return mAccumulatorTypeSize; } + + const InVec &getAccumulatorIns() const { return mAccumulatorIns; } + const InTypeVec &getAccumulatorInTypes() const { return mAccumulatorInTypes; } + + const RSExportType *getResultType() const { return mResultType; } + + // Does one of this reduction's constituent function names match Candidate? + bool matchName(const llvm::StringRef &Candidate) const; + + bool analyzeTranslationUnit(); +}; // RSExportReduce + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_REDUCE_H_ NOLINT
diff --git a/slang/slang_rs_export_type.cpp b/slang/slang_rs_export_type.cpp new file mode 100644 index 0000000..cf5e71c --- /dev/null +++ b/slang/slang_rs_export_type.cpp
@@ -0,0 +1,1642 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_export_type.h" + +#include <list> +#include <vector> + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" +#include "clang/AST/RecordLayout.h" + +#include "llvm/ADT/StringExtras.h" +#include "llvm/IR/DataLayout.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/Type.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "slang_rs_export_element.h" +#include "slang_version.h" + +#define CHECK_PARENT_EQUALITY(ParentClass, E) \ + if (!ParentClass::equals(E)) \ + return false; + +namespace slang { + +namespace { + +// For the data types we support: +// Category - data type category +// SName - "common name" in script (C99) +// RsType - element name in RenderScript +// RsShortType - short element name in RenderScript +// SizeInBits - size in bits +// CName - reflected C name +// JavaName - reflected Java name +// JavaArrayElementName - reflected name in Java arrays +// CVecName - prefix for C vector types +// JavaVecName - prefix for Java vector type +// JavaPromotion - unsigned type undergoing Java promotion +// +// IMPORTANT: The data types in this table should be at the same index as +// specified by the corresponding DataType enum. +// +// TODO: Pull this information out into a separate file. +static RSReflectionType gReflectionTypes[] = { +#define _ nullptr + // Category SName RsType RsST CName JN JAEN CVN JVN JP +{PrimitiveDataType, "half", "FLOAT_16", "F16", 16, "half", "short", "short", "Half", "Short", false}, +{PrimitiveDataType, "float", "FLOAT_32", "F32", 32, "float", "float", "float", "Float", "Float", false}, +{PrimitiveDataType, "double", "FLOAT_64", "F64", 64, "double", "double", "double", "Double", "Double", false}, +{PrimitiveDataType, "char", "SIGNED_8", "I8", 8, "int8_t", "byte", "byte", "Byte", "Byte", false}, +{PrimitiveDataType, "short", "SIGNED_16", "I16", 16, "int16_t", "short", "short", "Short", "Short", false}, +{PrimitiveDataType, "int", "SIGNED_32", "I32", 32, "int32_t", "int", "int", "Int", "Int", false}, +{PrimitiveDataType, "long", "SIGNED_64", "I64", 64, "int64_t", "long", "long", "Long", "Long", false}, +{PrimitiveDataType, "uchar", "UNSIGNED_8", "U8", 8, "uint8_t", "short", "byte", "UByte", "Short", true}, +{PrimitiveDataType, "ushort", "UNSIGNED_16", "U16", 16, "uint16_t", "int", "short", "UShort", "Int", true}, +{PrimitiveDataType, "uint", "UNSIGNED_32", "U32", 32, "uint32_t", "long", "int", "UInt", "Long", true}, +{PrimitiveDataType, "ulong", "UNSIGNED_64", "U64", 64, "uint64_t", "long", "long", "ULong", "Long", false}, +{PrimitiveDataType, "bool", "BOOLEAN", "BOOLEAN", 8, "bool", "boolean", "byte", _, _, false}, +{PrimitiveDataType, _, "UNSIGNED_5_6_5", _, 16, _, _, _, _, _, false}, +{PrimitiveDataType, _, "UNSIGNED_5_5_5_1", _, 16, _, _, _, _, _, false}, +{PrimitiveDataType, _, "UNSIGNED_4_4_4_4", _, 16, _, _, _, _, _, false}, + +{MatrixDataType, "rs_matrix2x2", "MATRIX_2X2", _, 4*32, "rs_matrix2x2", "Matrix2f", _, _, _, false}, +{MatrixDataType, "rs_matrix3x3", "MATRIX_3X3", _, 9*32, "rs_matrix3x3", "Matrix3f", _, _, _, false}, +{MatrixDataType, "rs_matrix4x4", "MATRIX_4X4", _, 16*32, "rs_matrix4x4", "Matrix4f", _, _, _, false}, + +// RS object types are 32 bits in 32-bit RS, but 256 bits in 64-bit RS. +// This is handled specially by the GetElementSizeInBits() method. +{ObjectDataType, _, "RS_ELEMENT", "ELEMENT", 32, "Element", "Element", _, _, _, false}, +{ObjectDataType, _, "RS_TYPE", "TYPE", 32, "Type", "Type", _, _, _, false}, +{ObjectDataType, _, "RS_ALLOCATION", "ALLOCATION", 32, "Allocation", "Allocation", _, _, _, false}, +{ObjectDataType, _, "RS_SAMPLER", "SAMPLER", 32, "Sampler", "Sampler", _, _, _, false}, +{ObjectDataType, _, "RS_SCRIPT", "SCRIPT", 32, "Script", "Script", _, _, _, false}, +{ObjectDataType, _, "RS_MESH", "MESH", 32, "Mesh", "Mesh", _, _, _, false}, +{ObjectDataType, _, "RS_PATH", "PATH", 32, "Path", "Path", _, _, _, false}, +{ObjectDataType, _, "RS_PROGRAM_FRAGMENT", "PROGRAM_FRAGMENT", 32, "ProgramFragment", "ProgramFragment", _, _, _, false}, +{ObjectDataType, _, "RS_PROGRAM_VERTEX", "PROGRAM_VERTEX", 32, "ProgramVertex", "ProgramVertex", _, _, _, false}, +{ObjectDataType, _, "RS_PROGRAM_RASTER", "PROGRAM_RASTER", 32, "ProgramRaster", "ProgramRaster", _, _, _, false}, +{ObjectDataType, _, "RS_PROGRAM_STORE", "PROGRAM_STORE", 32, "ProgramStore", "ProgramStore", _, _, _, false}, +{ObjectDataType, _, "RS_FONT", "FONT", 32, "Font", "Font", _, _, _, false}, +#undef _ +}; + +const int kMaxVectorSize = 4; + +struct BuiltinInfo { + clang::BuiltinType::Kind builtinTypeKind; + DataType type; + /* TODO If we return std::string instead of llvm::StringRef, we could build + * the name instead of duplicating the entries. + */ + const char *cname[kMaxVectorSize]; +}; + + +BuiltinInfo BuiltinInfoTable[] = { + {clang::BuiltinType::Bool, DataTypeBoolean, + {"bool", "bool2", "bool3", "bool4"}}, + {clang::BuiltinType::Char_U, DataTypeUnsigned8, + {"uchar", "uchar2", "uchar3", "uchar4"}}, + {clang::BuiltinType::UChar, DataTypeUnsigned8, + {"uchar", "uchar2", "uchar3", "uchar4"}}, + {clang::BuiltinType::Char16, DataTypeSigned16, + {"short", "short2", "short3", "short4"}}, + {clang::BuiltinType::Char32, DataTypeSigned32, + {"int", "int2", "int3", "int4"}}, + {clang::BuiltinType::UShort, DataTypeUnsigned16, + {"ushort", "ushort2", "ushort3", "ushort4"}}, + {clang::BuiltinType::UInt, DataTypeUnsigned32, + {"uint", "uint2", "uint3", "uint4"}}, + {clang::BuiltinType::ULong, DataTypeUnsigned64, + {"ulong", "ulong2", "ulong3", "ulong4"}}, + {clang::BuiltinType::ULongLong, DataTypeUnsigned64, + {"ulong", "ulong2", "ulong3", "ulong4"}}, + + {clang::BuiltinType::Char_S, DataTypeSigned8, + {"char", "char2", "char3", "char4"}}, + {clang::BuiltinType::SChar, DataTypeSigned8, + {"char", "char2", "char3", "char4"}}, + {clang::BuiltinType::Short, DataTypeSigned16, + {"short", "short2", "short3", "short4"}}, + {clang::BuiltinType::Int, DataTypeSigned32, + {"int", "int2", "int3", "int4"}}, + {clang::BuiltinType::Long, DataTypeSigned64, + {"long", "long2", "long3", "long4"}}, + {clang::BuiltinType::LongLong, DataTypeSigned64, + {"long", "long2", "long3", "long4"}}, + {clang::BuiltinType::Half, DataTypeFloat16, + {"half", "half2", "half3", "half4"}}, + {clang::BuiltinType::Float, DataTypeFloat32, + {"float", "float2", "float3", "float4"}}, + {clang::BuiltinType::Double, DataTypeFloat64, + {"double", "double2", "double3", "double4"}}, +}; +const int BuiltinInfoTableCount = sizeof(BuiltinInfoTable) / sizeof(BuiltinInfoTable[0]); + +struct NameAndPrimitiveType { + const char *name; + DataType dataType; +}; + +static NameAndPrimitiveType MatrixAndObjectDataTypes[] = { + {"rs_matrix2x2", DataTypeRSMatrix2x2}, + {"rs_matrix3x3", DataTypeRSMatrix3x3}, + {"rs_matrix4x4", DataTypeRSMatrix4x4}, + {"rs_element", DataTypeRSElement}, + {"rs_type", DataTypeRSType}, + {"rs_allocation", DataTypeRSAllocation}, + {"rs_sampler", DataTypeRSSampler}, + {"rs_script", DataTypeRSScript}, + {"rs_mesh", DataTypeRSMesh}, + {"rs_path", DataTypeRSPath}, + {"rs_program_fragment", DataTypeRSProgramFragment}, + {"rs_program_vertex", DataTypeRSProgramVertex}, + {"rs_program_raster", DataTypeRSProgramRaster}, + {"rs_program_store", DataTypeRSProgramStore}, + {"rs_font", DataTypeRSFont}, +}; + +const int MatrixAndObjectDataTypesCount = + sizeof(MatrixAndObjectDataTypes) / sizeof(MatrixAndObjectDataTypes[0]); + +static const clang::Type *TypeExportableHelper( + const clang::Type *T, + llvm::SmallPtrSet<const clang::Type*, 8>& SPS, + slang::RSContext *Context, + const clang::VarDecl *VD, + const clang::RecordDecl *TopLevelRecord, + ExportKind EK); + +template <unsigned N> +static void ReportTypeError(slang::RSContext *Context, + const clang::NamedDecl *ND, + const clang::RecordDecl *TopLevelRecord, + const char (&Message)[N], + unsigned int TargetAPI = 0) { + // Attempt to use the type declaration first (if we have one). + // Fall back to the variable definition, if we are looking at something + // like an array declaration that can't be exported. + if (TopLevelRecord) { + Context->ReportError(TopLevelRecord->getLocation(), Message) + << TopLevelRecord->getName() << TargetAPI; + } else if (ND) { + Context->ReportError(ND->getLocation(), Message) << ND->getName() + << TargetAPI; + } else { + slangAssert(false && "Variables should be validated before exporting"); + } +} + +static const clang::Type *ConstantArrayTypeExportableHelper( + const clang::ConstantArrayType *CAT, + llvm::SmallPtrSet<const clang::Type*, 8>& SPS, + slang::RSContext *Context, + const clang::VarDecl *VD, + const clang::RecordDecl *TopLevelRecord, + ExportKind EK) { + // Check element type + const clang::Type *ElementType = GetConstantArrayElementType(CAT); + if (ElementType->isArrayType()) { + ReportTypeError(Context, VD, TopLevelRecord, + "multidimensional arrays cannot be exported: '%0'"); + return nullptr; + } else if (ElementType->isExtVectorType()) { + const clang::ExtVectorType *EVT = + static_cast<const clang::ExtVectorType*>(ElementType); + unsigned numElements = EVT->getNumElements(); + + const clang::Type *BaseElementType = GetExtVectorElementType(EVT); + if (!RSExportPrimitiveType::IsPrimitiveType(BaseElementType)) { + ReportTypeError(Context, VD, TopLevelRecord, + "vectors of non-primitive types cannot be exported: '%0'"); + return nullptr; + } + + if (numElements == 3 && CAT->getSize() != 1) { + ReportTypeError(Context, VD, TopLevelRecord, + "arrays of width 3 vector types cannot be exported: '%0'"); + return nullptr; + } + } + + if (TypeExportableHelper(ElementType, SPS, Context, VD, + TopLevelRecord, EK) == nullptr) { + return nullptr; + } else { + return CAT; + } +} + +BuiltinInfo *FindBuiltinType(clang::BuiltinType::Kind builtinTypeKind) { + for (int i = 0; i < BuiltinInfoTableCount; i++) { + if (builtinTypeKind == BuiltinInfoTable[i].builtinTypeKind) { + return &BuiltinInfoTable[i]; + } + } + return nullptr; +} + +static const clang::Type *TypeExportableHelper( + clang::Type const *T, + llvm::SmallPtrSet<clang::Type const *, 8> &SPS, + slang::RSContext *Context, + clang::VarDecl const *VD, + clang::RecordDecl const *TopLevelRecord, + ExportKind EK) { + // Normalize first + if ((T = GetCanonicalType(T)) == nullptr) + return nullptr; + + if (SPS.count(T)) + return T; + + const clang::Type *CTI = T->getCanonicalTypeInternal().getTypePtr(); + + switch (T->getTypeClass()) { + case clang::Type::Builtin: { + const clang::BuiltinType *BT = static_cast<const clang::BuiltinType*>(CTI); + return FindBuiltinType(BT->getKind()) == nullptr ? nullptr : T; + } + case clang::Type::Record: { + if (RSExportPrimitiveType::GetRSSpecificType(T) != DataTypeUnknown) { + return T; // RS object type, no further checks are needed + } + + // Check internal struct + if (T->isUnionType()) { + ReportTypeError(Context, VD, T->getAsUnionType()->getDecl(), + "unions cannot be exported: '%0'"); + return nullptr; + } else if (!T->isStructureType()) { + slangAssert(false && "Unknown type cannot be exported"); + return nullptr; + } + + clang::RecordDecl *RD = T->getAsStructureType()->getDecl(); + if (RD != nullptr) { + RD = RD->getDefinition(); + if (RD == nullptr) { + ReportTypeError(Context, nullptr, T->getAsStructureType()->getDecl(), + "struct is not defined in this module"); + return nullptr; + } + } + + if (!TopLevelRecord) { + TopLevelRecord = RD; + } + if (RD->getName().empty()) { + ReportTypeError(Context, nullptr, RD, + "anonymous structures cannot be exported"); + return nullptr; + } + + // Fast check + if (RD->hasFlexibleArrayMember() || RD->hasObjectMember()) + return nullptr; + + // Insert myself into checking set + SPS.insert(T); + + // Check all element + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++) { + const clang::FieldDecl *FD = *FI; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + FT = GetCanonicalType(FT); + + if (!TypeExportableHelper(FT, SPS, Context, VD, TopLevelRecord, + EK)) { + return nullptr; + } + + // We don't support bit fields yet + // + // TODO(zonr/srhines): allow bit fields of size 8, 16, 32 + if (FD->isBitField()) { + Context->ReportError( + FD->getLocation(), + "bit fields are not able to be exported: '%0.%1'") + << RD->getName() << FD->getName(); + return nullptr; + } + } + + return T; + } + case clang::Type::FunctionProto: + ReportTypeError(Context, VD, TopLevelRecord, + "function types cannot be exported: '%0'"); + return nullptr; + case clang::Type::Pointer: { + if (TopLevelRecord) { + ReportTypeError(Context, VD, TopLevelRecord, + "structures containing pointers cannot be used as the type of " + "an exported global variable or the parameter to an exported " + "function: '%0'"); + return nullptr; + } + + const clang::PointerType *PT = static_cast<const clang::PointerType*>(CTI); + const clang::Type *PointeeType = GetPointeeType(PT); + + if (PointeeType->getTypeClass() == clang::Type::Pointer) { + ReportTypeError(Context, VD, TopLevelRecord, + "multiple levels of pointers cannot be exported: '%0'"); + return nullptr; + } + + // Void pointers are forbidden for export, although we must accept + // void pointers that come in as arguments to a legacy kernel. + if (PointeeType->isVoidType() && EK != LegacyKernelArgument) { + ReportTypeError(Context, VD, TopLevelRecord, + "void pointers cannot be exported: '%0'"); + return nullptr; + } + + // We don't support pointer with array-type pointee or unsupported pointee + // type + if (PointeeType->isArrayType() || + (TypeExportableHelper(PointeeType, SPS, Context, VD, + TopLevelRecord, EK) == nullptr)) + return nullptr; + else + return T; + } + case clang::Type::ExtVector: { + const clang::ExtVectorType *EVT = + static_cast<const clang::ExtVectorType*>(CTI); + // Only vector with size 2, 3 and 4 are supported. + if (EVT->getNumElements() < 2 || EVT->getNumElements() > 4) + return nullptr; + + // Check base element type + const clang::Type *ElementType = GetExtVectorElementType(EVT); + + if ((ElementType->getTypeClass() != clang::Type::Builtin) || + (TypeExportableHelper(ElementType, SPS, Context, VD, + TopLevelRecord, EK) == nullptr)) + return nullptr; + else + return T; + } + case clang::Type::ConstantArray: { + const clang::ConstantArrayType *CAT = + static_cast<const clang::ConstantArrayType*>(CTI); + + return ConstantArrayTypeExportableHelper(CAT, SPS, Context, VD, + TopLevelRecord, EK); + } + case clang::Type::Enum: { + // FIXME: We currently convert enums to integers, rather than reflecting + // a more complete (and nicer type-safe Java version). + return Context->getASTContext().IntTy.getTypePtr(); + } + default: { + slangAssert(false && "Unknown type cannot be validated"); + return nullptr; + } + } +} + +// Return the type that can be used to create RSExportType, will always return +// the canonical type. +// +// If the Type T is not exportable, this function returns nullptr. DiagEngine is +// used to generate proper Clang diagnostic messages when a non-exportable type +// is detected. TopLevelRecord is used to capture the highest struct (in the +// case of a nested hierarchy) for detecting other types that cannot be exported +// (mostly pointers within a struct). +static const clang::Type *TypeExportable(const clang::Type *T, + slang::RSContext *Context, + const clang::VarDecl *VD, + ExportKind EK) { + llvm::SmallPtrSet<const clang::Type*, 8> SPS = + llvm::SmallPtrSet<const clang::Type*, 8>(); + + return TypeExportableHelper(T, SPS, Context, VD, nullptr, EK); +} + +static bool ValidateRSObjectInVarDecl(slang::RSContext *Context, + const clang::VarDecl *VD, bool InCompositeType, + unsigned int TargetAPI) { + if (TargetAPI < SLANG_JB_TARGET_API) { + // Only if we are already in a composite type (like an array or structure). + if (InCompositeType) { + // Only if we are actually exported (i.e. non-static). + if (VD->hasLinkage() && + (VD->getFormalLinkage() == clang::ExternalLinkage)) { + // Only if we are not a pointer to an object. + const clang::Type *T = GetCanonicalType(VD->getType().getTypePtr()); + if (T->getTypeClass() != clang::Type::Pointer) { + ReportTypeError(Context, VD, nullptr, + "arrays/structures containing RS object types " + "cannot be exported in target API < %1: '%0'", + SLANG_JB_TARGET_API); + return false; + } + } + } + } + + return true; +} + +// Helper function for ValidateType(). We do a recursive descent on the +// type hierarchy to ensure that we can properly export/handle the +// declaration. +// \return true if the variable declaration is valid, +// false if it is invalid (along with proper diagnostics). +// +// C - ASTContext (for diagnostics + builtin types). +// T - sub-type that we are validating. +// ND - (optional) top-level named declaration that we are validating. +// SPS - set of types we have already seen/validated. +// InCompositeType - true if we are within an outer composite type. +// UnionDecl - set if we are in a sub-type of a union. +// TargetAPI - target SDK API level. +// IsFilterscript - whether or not we are compiling for Filterscript +// IsExtern - is this type externally visible (i.e. extern global or parameter +// to an extern function) +static bool ValidateTypeHelper( + slang::RSContext *Context, + clang::ASTContext &C, + const clang::Type *&T, + const clang::NamedDecl *ND, + clang::SourceLocation Loc, + llvm::SmallPtrSet<const clang::Type*, 8>& SPS, + bool InCompositeType, + clang::RecordDecl *UnionDecl, + unsigned int TargetAPI, + bool IsFilterscript, + bool IsExtern) { + if ((T = GetCanonicalType(T)) == nullptr) + return true; + + if (SPS.count(T)) + return true; + + const clang::Type *CTI = T->getCanonicalTypeInternal().getTypePtr(); + + switch (T->getTypeClass()) { + case clang::Type::Record: { + if (RSExportPrimitiveType::IsRSObjectType(T)) { + const clang::VarDecl *VD = (ND ? llvm::dyn_cast<clang::VarDecl>(ND) : nullptr); + if (VD && !ValidateRSObjectInVarDecl(Context, VD, InCompositeType, + TargetAPI)) { + return false; + } + } + + if (RSExportPrimitiveType::GetRSSpecificType(T) != DataTypeUnknown) { + if (!UnionDecl) { + return true; + } else if (RSExportPrimitiveType::IsRSObjectType(T)) { + ReportTypeError(Context, nullptr, UnionDecl, + "unions containing RS object types are not allowed"); + return false; + } + } + + clang::RecordDecl *RD = nullptr; + + // Check internal struct + if (T->isUnionType()) { + RD = T->getAsUnionType()->getDecl(); + UnionDecl = RD; + } else if (T->isStructureType()) { + RD = T->getAsStructureType()->getDecl(); + } else { + slangAssert(false && "Unknown type cannot be exported"); + return false; + } + + if (RD != nullptr) { + RD = RD->getDefinition(); + if (RD == nullptr) { + // FIXME + return true; + } + } + + // Fast check + if (RD->hasFlexibleArrayMember() || RD->hasObjectMember()) + return false; + + // Insert myself into checking set + SPS.insert(T); + + // Check all elements + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++) { + const clang::FieldDecl *FD = *FI; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + FT = GetCanonicalType(FT); + + if (!ValidateTypeHelper(Context, C, FT, ND, Loc, SPS, true, UnionDecl, + TargetAPI, IsFilterscript, IsExtern)) { + return false; + } + } + + return true; + } + + case clang::Type::Builtin: { + if (IsFilterscript) { + clang::QualType QT = T->getCanonicalTypeInternal(); + if (QT == C.DoubleTy || + QT == C.LongDoubleTy || + QT == C.LongTy || + QT == C.LongLongTy) { + if (ND) { + Context->ReportError( + Loc, + "Builtin types > 32 bits in size are forbidden in " + "Filterscript: '%0'") + << ND->getName(); + } else { + Context->ReportError( + Loc, + "Builtin types > 32 bits in size are forbidden in " + "Filterscript"); + } + return false; + } + } + break; + } + + case clang::Type::Pointer: { + if (IsFilterscript) { + if (ND) { + Context->ReportError(Loc, + "Pointers are forbidden in Filterscript: '%0'") + << ND->getName(); + return false; + } else { + // TODO(srhines): Find a better way to handle expressions (i.e. no + // NamedDecl) involving pointers in FS that should be allowed. + // An example would be calls to library functions like + // rsMatrixMultiply() that take rs_matrixNxN * types. + } + } + + // Forbid pointers in structures that are externally visible. + if (InCompositeType && IsExtern) { + if (ND) { + Context->ReportError(Loc, + "structures containing pointers cannot be used as the type of " + "an exported global variable or the parameter to an exported " + "function: '%0'") + << ND->getName(); + } else { + Context->ReportError(Loc, + "structures containing pointers cannot be used as the type of " + "an exported global variable or the parameter to an exported " + "function"); + } + return false; + } + + const clang::PointerType *PT = static_cast<const clang::PointerType*>(CTI); + const clang::Type *PointeeType = GetPointeeType(PT); + + return ValidateTypeHelper(Context, C, PointeeType, ND, Loc, SPS, + InCompositeType, UnionDecl, TargetAPI, + IsFilterscript, IsExtern); + } + + case clang::Type::ExtVector: { + const clang::ExtVectorType *EVT = + static_cast<const clang::ExtVectorType*>(CTI); + const clang::Type *ElementType = GetExtVectorElementType(EVT); + if (TargetAPI < SLANG_ICS_TARGET_API && + InCompositeType && + EVT->getNumElements() == 3 && + ND && + ND->getFormalLinkage() == clang::ExternalLinkage) { + ReportTypeError(Context, ND, nullptr, + "structs containing vectors of dimension 3 cannot " + "be exported at this API level: '%0'"); + return false; + } + return ValidateTypeHelper(Context, C, ElementType, ND, Loc, SPS, true, + UnionDecl, TargetAPI, IsFilterscript, IsExtern); + } + + case clang::Type::ConstantArray: { + const clang::ConstantArrayType *CAT = static_cast<const clang::ConstantArrayType*>(CTI); + const clang::Type *ElementType = GetConstantArrayElementType(CAT); + return ValidateTypeHelper(Context, C, ElementType, ND, Loc, SPS, true, + UnionDecl, TargetAPI, IsFilterscript, IsExtern); + } + + default: { + break; + } + } + + return true; +} + +} // namespace + +std::string CreateDummyName(const char *type, const std::string &name) { + std::stringstream S; + S << "<" << type; + if (!name.empty()) { + S << ":" << name; + } + S << ">"; + return S.str(); +} + +/****************************** RSExportType ******************************/ +bool RSExportType::NormalizeType(const clang::Type *&T, + llvm::StringRef &TypeName, + RSContext *Context, + const clang::VarDecl *VD, + ExportKind EK) { + if ((T = TypeExportable(T, Context, VD, EK)) == nullptr) { + return false; + } + // Get type name + TypeName = RSExportType::GetTypeName(T); + if (Context && TypeName.empty()) { + if (VD) { + Context->ReportError(VD->getLocation(), + "anonymous types cannot be exported"); + } else { + Context->ReportError("anonymous types cannot be exported"); + } + return false; + } + + return true; +} + +bool RSExportType::ValidateType(slang::RSContext *Context, clang::ASTContext &C, + clang::QualType QT, const clang::NamedDecl *ND, + clang::SourceLocation Loc, + unsigned int TargetAPI, bool IsFilterscript, + bool IsExtern) { + const clang::Type *T = QT.getTypePtr(); + llvm::SmallPtrSet<const clang::Type*, 8> SPS = + llvm::SmallPtrSet<const clang::Type*, 8>(); + + // If this is an externally visible variable declaration, we check if the + // type is able to be exported first. + if (auto VD = llvm::dyn_cast_or_null<clang::VarDecl>(ND)) { + if (VD->getFormalLinkage() == clang::ExternalLinkage) { + if (!TypeExportable(T, Context, VD, NotLegacyKernelArgument)) { + return false; + } + } + } + return ValidateTypeHelper(Context, C, T, ND, Loc, SPS, false, nullptr, TargetAPI, + IsFilterscript, IsExtern); +} + +bool RSExportType::ValidateVarDecl(slang::RSContext *Context, + clang::VarDecl *VD, unsigned int TargetAPI, + bool IsFilterscript) { + return ValidateType(Context, VD->getASTContext(), VD->getType(), VD, + VD->getLocation(), TargetAPI, IsFilterscript, + (VD->getFormalLinkage() == clang::ExternalLinkage)); +} + +const clang::Type +*RSExportType::GetTypeOfDecl(const clang::DeclaratorDecl *DD) { + if (DD) { + clang::QualType T = DD->getType(); + + if (T.isNull()) + return nullptr; + else + return T.getTypePtr(); + } + return nullptr; +} + +llvm::StringRef RSExportType::GetTypeName(const clang::Type* T) { + T = GetCanonicalType(T); + if (T == nullptr) + return llvm::StringRef(); + + const clang::Type *CTI = T->getCanonicalTypeInternal().getTypePtr(); + + switch (T->getTypeClass()) { + case clang::Type::Builtin: { + const clang::BuiltinType *BT = static_cast<const clang::BuiltinType*>(CTI); + BuiltinInfo *info = FindBuiltinType(BT->getKind()); + if (info != nullptr) { + return info->cname[0]; + } + slangAssert(false && "Unknown data type of the builtin"); + break; + } + case clang::Type::Record: { + clang::RecordDecl *RD; + if (T->isStructureType()) { + RD = T->getAsStructureType()->getDecl(); + } else { + break; + } + + llvm::StringRef Name = RD->getName(); + if (Name.empty()) { + if (RD->getTypedefNameForAnonDecl() != nullptr) { + Name = RD->getTypedefNameForAnonDecl()->getName(); + } + + if (Name.empty()) { + // Try to find a name from redeclaration (i.e. typedef) + for (clang::TagDecl::redecl_iterator RI = RD->redecls_begin(), + RE = RD->redecls_end(); + RI != RE; + RI++) { + slangAssert(*RI != nullptr && "cannot be NULL object"); + + Name = (*RI)->getName(); + if (!Name.empty()) + break; + } + } + } + return Name; + } + case clang::Type::Pointer: { + // "*" plus pointee name + const clang::PointerType *P = static_cast<const clang::PointerType*>(CTI); + const clang::Type *PT = GetPointeeType(P); + llvm::StringRef PointeeName; + if (NormalizeType(PT, PointeeName, nullptr, nullptr, + NotLegacyKernelArgument)) { + char *Name = new char[ 1 /* * */ + PointeeName.size() + 1 ]; + Name[0] = '*'; + memcpy(Name + 1, PointeeName.data(), PointeeName.size()); + Name[PointeeName.size() + 1] = '\0'; + return Name; + } + break; + } + case clang::Type::ExtVector: { + const clang::ExtVectorType *EVT = + static_cast<const clang::ExtVectorType*>(CTI); + return RSExportVectorType::GetTypeName(EVT); + break; + } + case clang::Type::ConstantArray : { + // Construct name for a constant array is too complicated. + return "<ConstantArray>"; + } + default: { + break; + } + } + + return llvm::StringRef(); +} + + +RSExportType *RSExportType::Create(RSContext *Context, + const clang::Type *T, + const llvm::StringRef &TypeName, + ExportKind EK) { + // Lookup the context to see whether the type was processed before. + // Newly created RSExportType will insert into context + // in RSExportType::RSExportType() + RSContext::export_type_iterator ETI = Context->findExportType(TypeName); + + if (ETI != Context->export_types_end()) + return ETI->second; + + const clang::Type *CTI = T->getCanonicalTypeInternal().getTypePtr(); + + RSExportType *ET = nullptr; + switch (T->getTypeClass()) { + case clang::Type::Record: { + DataType dt = RSExportPrimitiveType::GetRSSpecificType(TypeName); + switch (dt) { + case DataTypeUnknown: { + // User-defined types + ET = RSExportRecordType::Create(Context, + T->getAsStructureType(), + TypeName); + break; + } + case DataTypeRSMatrix2x2: { + // 2 x 2 Matrix type + ET = RSExportMatrixType::Create(Context, + T->getAsStructureType(), + TypeName, + 2); + break; + } + case DataTypeRSMatrix3x3: { + // 3 x 3 Matrix type + ET = RSExportMatrixType::Create(Context, + T->getAsStructureType(), + TypeName, + 3); + break; + } + case DataTypeRSMatrix4x4: { + // 4 x 4 Matrix type + ET = RSExportMatrixType::Create(Context, + T->getAsStructureType(), + TypeName, + 4); + break; + } + default: { + // Others are primitive types + ET = RSExportPrimitiveType::Create(Context, T, TypeName); + break; + } + } + break; + } + case clang::Type::Builtin: { + ET = RSExportPrimitiveType::Create(Context, T, TypeName); + break; + } + case clang::Type::Pointer: { + ET = RSExportPointerType::Create(Context, + static_cast<const clang::PointerType*>(CTI), + TypeName); + // FIXME: free the name (allocated in RSExportType::GetTypeName) + delete [] TypeName.data(); + break; + } + case clang::Type::ExtVector: { + ET = RSExportVectorType::Create(Context, + static_cast<const clang::ExtVectorType*>(CTI), + TypeName); + break; + } + case clang::Type::ConstantArray: { + ET = RSExportConstantArrayType::Create( + Context, + static_cast<const clang::ConstantArrayType*>(CTI)); + break; + } + default: { + Context->ReportError("unknown type cannot be exported: '%0'") + << T->getTypeClassName(); + break; + } + } + + return ET; +} + +RSExportType *RSExportType::Create(RSContext *Context, const clang::Type *T, + ExportKind EK, const clang::VarDecl *VD) { + llvm::StringRef TypeName; + if (NormalizeType(T, TypeName, Context, VD, EK)) { + return Create(Context, T, TypeName, EK); + } else { + return nullptr; + } +} + +RSExportType *RSExportType::CreateFromDecl(RSContext *Context, + const clang::VarDecl *VD) { + return RSExportType::Create(Context, GetTypeOfDecl(VD), + NotLegacyKernelArgument, VD); +} + +size_t RSExportType::getStoreSize() const { + return getRSContext()->getDataLayout()->getTypeStoreSize(getLLVMType()); +} + +size_t RSExportType::getAllocSize() const { + return getRSContext()->getDataLayout()->getTypeAllocSize(getLLVMType()); +} + +RSExportType::RSExportType(RSContext *Context, + ExportClass Class, + const llvm::StringRef &Name) + : RSExportable(Context, RSExportable::EX_TYPE), + mClass(Class), + // Make a copy on Name since memory stored @Name is either allocated in + // ASTContext or allocated in GetTypeName which will be destroyed later. + mName(Name.data(), Name.size()), + mLLVMType(nullptr) { + // Don't cache the type whose name start with '<'. Those type failed to + // get their name since constructing their name in GetTypeName() requiring + // complicated work. + if (!IsDummyName(Name)) { + // TODO(zonr): Need to check whether the insertion is successful or not. + Context->insertExportType(llvm::StringRef(Name), this); + } + +} + +bool RSExportType::keep() { + if (!RSExportable::keep()) + return false; + // Invalidate converted LLVM type. + mLLVMType = nullptr; + return true; +} + +bool RSExportType::equals(const RSExportable *E) const { + CHECK_PARENT_EQUALITY(RSExportable, E); + return (static_cast<const RSExportType*>(E)->getClass() == getClass()); +} + +RSExportType::~RSExportType() { +} + +/************************** RSExportPrimitiveType **************************/ +llvm::ManagedStatic<RSExportPrimitiveType::RSSpecificTypeMapTy> +RSExportPrimitiveType::RSSpecificTypeMap; + +bool RSExportPrimitiveType::IsPrimitiveType(const clang::Type *T) { + if ((T != nullptr) && (T->getTypeClass() == clang::Type::Builtin)) + return true; + else + return false; +} + +DataType +RSExportPrimitiveType::GetRSSpecificType(const llvm::StringRef &TypeName) { + if (TypeName.empty()) + return DataTypeUnknown; + + if (RSSpecificTypeMap->empty()) { + for (int i = 0; i < MatrixAndObjectDataTypesCount; i++) { + (*RSSpecificTypeMap)[MatrixAndObjectDataTypes[i].name] = + MatrixAndObjectDataTypes[i].dataType; + } + } + + RSSpecificTypeMapTy::const_iterator I = RSSpecificTypeMap->find(TypeName); + if (I == RSSpecificTypeMap->end()) + return DataTypeUnknown; + else + return I->getValue(); +} + +DataType RSExportPrimitiveType::GetRSSpecificType(const clang::Type *T) { + T = GetCanonicalType(T); + if ((T == nullptr) || (T->getTypeClass() != clang::Type::Record)) + return DataTypeUnknown; + + return GetRSSpecificType( RSExportType::GetTypeName(T) ); +} + +bool RSExportPrimitiveType::IsRSMatrixType(DataType DT) { + if (DT < 0 || DT >= DataTypeMax) { + return false; + } + return gReflectionTypes[DT].category == MatrixDataType; +} + +bool RSExportPrimitiveType::IsRSObjectType(DataType DT) { + if (DT < 0 || DT >= DataTypeMax) { + return false; + } + return gReflectionTypes[DT].category == ObjectDataType; +} + +bool RSExportPrimitiveType::IsStructureTypeWithRSObject(const clang::Type *T) { + bool RSObjectTypeSeen = false; + while (T && T->isArrayType()) { + T = T->getArrayElementTypeNoTypeQual(); + } + + const clang::RecordType *RT = T->getAsStructureType(); + if (!RT) { + return false; + } + + const clang::RecordDecl *RD = RT->getDecl(); + if (RD) { + RD = RD->getDefinition(); + } + if (!RD) { + return false; + } + + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++) { + // We just look through all field declarations to see if we find a + // declaration for an RS object type (or an array of one). + const clang::FieldDecl *FD = *FI; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + while (FT && FT->isArrayType()) { + FT = FT->getArrayElementTypeNoTypeQual(); + } + + DataType DT = GetRSSpecificType(FT); + if (IsRSObjectType(DT)) { + // RS object types definitely need to be zero-initialized + RSObjectTypeSeen = true; + } else { + switch (DT) { + case DataTypeRSMatrix2x2: + case DataTypeRSMatrix3x3: + case DataTypeRSMatrix4x4: + // Matrix types should get zero-initialized as well + RSObjectTypeSeen = true; + break; + default: + // Ignore all other primitive types + break; + } + while (FT && FT->isArrayType()) { + FT = FT->getArrayElementTypeNoTypeQual(); + } + if (FT->isStructureType()) { + // Recursively handle structs of structs (even though these can't + // be exported, it is possible for a user to have them internally). + RSObjectTypeSeen |= IsStructureTypeWithRSObject(FT); + } + } + } + + return RSObjectTypeSeen; +} + +size_t RSExportPrimitiveType::GetElementSizeInBits(const RSExportPrimitiveType *EPT) { + int type = EPT->getType(); + slangAssert((type > DataTypeUnknown && type < DataTypeMax) && + "RSExportPrimitiveType::GetElementSizeInBits : unknown data type"); + // All RS object types are 256 bits in 64-bit RS. + if (EPT->isRSObjectType() && EPT->getRSContext()->is64Bit()) { + return 256; + } + return gReflectionTypes[type].size_in_bits; +} + +DataType +RSExportPrimitiveType::GetDataType(RSContext *Context, const clang::Type *T) { + if (T == nullptr) + return DataTypeUnknown; + + switch (T->getTypeClass()) { + case clang::Type::Builtin: { + const clang::BuiltinType *BT = + static_cast<const clang::BuiltinType*>(T->getCanonicalTypeInternal().getTypePtr()); + BuiltinInfo *info = FindBuiltinType(BT->getKind()); + if (info != nullptr) { + return info->type; + } + // The size of type WChar depend on platform so we abandon the support + // to them. + Context->ReportError("built-in type cannot be exported: '%0'") + << T->getTypeClassName(); + break; + } + case clang::Type::Record: { + // must be RS object type + return RSExportPrimitiveType::GetRSSpecificType(T); + } + default: { + Context->ReportError("primitive type cannot be exported: '%0'") + << T->getTypeClassName(); + break; + } + } + + return DataTypeUnknown; +} + +RSExportPrimitiveType +*RSExportPrimitiveType::Create(RSContext *Context, + const clang::Type *T, + const llvm::StringRef &TypeName, + bool Normalized) { + DataType DT = GetDataType(Context, T); + + if ((DT == DataTypeUnknown) || TypeName.empty()) + return nullptr; + else + return new RSExportPrimitiveType(Context, ExportClassPrimitive, TypeName, + DT, Normalized); +} + +RSExportPrimitiveType *RSExportPrimitiveType::Create(RSContext *Context, + const clang::Type *T) { + llvm::StringRef TypeName; + if (RSExportType::NormalizeType(T, TypeName, Context, nullptr, + NotLegacyKernelArgument) && + IsPrimitiveType(T)) { + return Create(Context, T, TypeName); + } else { + return nullptr; + } +} + +llvm::Type *RSExportPrimitiveType::convertToLLVMType() const { + llvm::LLVMContext &C = getRSContext()->getLLVMContext(); + + if (isRSObjectType()) { + // struct { + // int *p; + // } __attribute__((packed, aligned(pointer_size))) + // + // which is + // + // <{ [1 x i32] }> in LLVM + // + std::vector<llvm::Type *> Elements; + if (getRSContext()->is64Bit()) { + // 64-bit path + Elements.push_back(llvm::ArrayType::get(llvm::Type::getInt64Ty(C), 4)); + return llvm::StructType::get(C, Elements, true); + } else { + // 32-bit legacy path + Elements.push_back(llvm::ArrayType::get(llvm::Type::getInt32Ty(C), 1)); + return llvm::StructType::get(C, Elements, true); + } + } + + switch (mType) { + case DataTypeFloat16: { + return llvm::Type::getHalfTy(C); + break; + } + case DataTypeFloat32: { + return llvm::Type::getFloatTy(C); + break; + } + case DataTypeFloat64: { + return llvm::Type::getDoubleTy(C); + break; + } + case DataTypeBoolean: { + return llvm::Type::getInt1Ty(C); + break; + } + case DataTypeSigned8: + case DataTypeUnsigned8: { + return llvm::Type::getInt8Ty(C); + break; + } + case DataTypeSigned16: + case DataTypeUnsigned16: + case DataTypeUnsigned565: + case DataTypeUnsigned5551: + case DataTypeUnsigned4444: { + return llvm::Type::getInt16Ty(C); + break; + } + case DataTypeSigned32: + case DataTypeUnsigned32: { + return llvm::Type::getInt32Ty(C); + break; + } + case DataTypeSigned64: + case DataTypeUnsigned64: { + return llvm::Type::getInt64Ty(C); + break; + } + default: { + slangAssert(false && "Unknown data type"); + } + } + + return nullptr; +} + +bool RSExportPrimitiveType::equals(const RSExportable *E) const { + CHECK_PARENT_EQUALITY(RSExportType, E); + return (static_cast<const RSExportPrimitiveType*>(E)->getType() == getType()); +} + +RSReflectionType *RSExportPrimitiveType::getRSReflectionType(DataType DT) { + if (DT > DataTypeUnknown && DT < DataTypeMax) { + return &gReflectionTypes[DT]; + } else { + return nullptr; + } +} + +/**************************** RSExportPointerType ****************************/ + +RSExportPointerType +*RSExportPointerType::Create(RSContext *Context, + const clang::PointerType *PT, + const llvm::StringRef &TypeName) { + const clang::Type *PointeeType = GetPointeeType(PT); + const RSExportType *PointeeET; + + if (PointeeType->getTypeClass() != clang::Type::Pointer) { + PointeeET = RSExportType::Create(Context, PointeeType, + NotLegacyKernelArgument); + } else { + // Double or higher dimension of pointer, export as int* + PointeeET = RSExportPrimitiveType::Create(Context, + Context->getASTContext().IntTy.getTypePtr()); + } + + if (PointeeET == nullptr) { + // Error diagnostic is emitted for corresponding pointee type + return nullptr; + } + + return new RSExportPointerType(Context, TypeName, PointeeET); +} + +llvm::Type *RSExportPointerType::convertToLLVMType() const { + llvm::Type *PointeeType = mPointeeType->getLLVMType(); + return llvm::PointerType::getUnqual(PointeeType); +} + +bool RSExportPointerType::keep() { + if (!RSExportType::keep()) + return false; + const_cast<RSExportType*>(mPointeeType)->keep(); + return true; +} + +bool RSExportPointerType::equals(const RSExportable *E) const { + CHECK_PARENT_EQUALITY(RSExportType, E); + return (static_cast<const RSExportPointerType*>(E) + ->getPointeeType()->equals(getPointeeType())); +} + +/***************************** RSExportVectorType *****************************/ +llvm::StringRef +RSExportVectorType::GetTypeName(const clang::ExtVectorType *EVT) { + const clang::Type *ElementType = GetExtVectorElementType(EVT); + llvm::StringRef name; + + if ((ElementType->getTypeClass() != clang::Type::Builtin)) + return name; + + const clang::BuiltinType *BT = + static_cast<const clang::BuiltinType*>( + ElementType->getCanonicalTypeInternal().getTypePtr()); + + if ((EVT->getNumElements() < 1) || + (EVT->getNumElements() > 4)) + return name; + + BuiltinInfo *info = FindBuiltinType(BT->getKind()); + if (info != nullptr) { + int I = EVT->getNumElements() - 1; + if (I < kMaxVectorSize) { + name = info->cname[I]; + } else { + slangAssert(false && "Max vector is 4"); + } + } + return name; +} + +RSExportVectorType *RSExportVectorType::Create(RSContext *Context, + const clang::ExtVectorType *EVT, + const llvm::StringRef &TypeName, + bool Normalized) { + slangAssert(EVT != nullptr && EVT->getTypeClass() == clang::Type::ExtVector); + + const clang::Type *ElementType = GetExtVectorElementType(EVT); + DataType DT = RSExportPrimitiveType::GetDataType(Context, ElementType); + + if (DT != DataTypeUnknown) + return new RSExportVectorType(Context, + TypeName, + DT, + Normalized, + EVT->getNumElements()); + else + return nullptr; +} + +llvm::Type *RSExportVectorType::convertToLLVMType() const { + llvm::Type *ElementType = RSExportPrimitiveType::convertToLLVMType(); + return llvm::VectorType::get(ElementType, getNumElement()); +} + +bool RSExportVectorType::equals(const RSExportable *E) const { + CHECK_PARENT_EQUALITY(RSExportPrimitiveType, E); + return (static_cast<const RSExportVectorType*>(E)->getNumElement() + == getNumElement()); +} + +/***************************** RSExportMatrixType *****************************/ +RSExportMatrixType *RSExportMatrixType::Create(RSContext *Context, + const clang::RecordType *RT, + const llvm::StringRef &TypeName, + unsigned Dim) { + slangAssert((RT != nullptr) && (RT->getTypeClass() == clang::Type::Record)); + slangAssert((Dim > 1) && "Invalid dimension of matrix"); + + // Check whether the struct rs_matrix is in our expected form (but assume it's + // correct if we're not sure whether it's correct or not) + const clang::RecordDecl* RD = RT->getDecl(); + RD = RD->getDefinition(); + if (RD != nullptr) { + // Find definition, perform further examination + if (RD->field_empty()) { + Context->ReportError( + RD->getLocation(), + "invalid matrix struct: must have 1 field for saving values: '%0'") + << RD->getName(); + return nullptr; + } + + clang::RecordDecl::field_iterator FIT = RD->field_begin(); + const clang::FieldDecl *FD = *FIT; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + if ((FT == nullptr) || (FT->getTypeClass() != clang::Type::ConstantArray)) { + Context->ReportError(RD->getLocation(), + "invalid matrix struct: first field should" + " be an array with constant size: '%0'") + << RD->getName(); + return nullptr; + } + const clang::ConstantArrayType *CAT = + static_cast<const clang::ConstantArrayType *>(FT); + const clang::Type *ElementType = GetConstantArrayElementType(CAT); + if ((ElementType == nullptr) || + (ElementType->getTypeClass() != clang::Type::Builtin) || + (static_cast<const clang::BuiltinType *>(ElementType)->getKind() != + clang::BuiltinType::Float)) { + Context->ReportError(RD->getLocation(), + "invalid matrix struct: first field " + "should be a float array: '%0'") + << RD->getName(); + return nullptr; + } + + if (CAT->getSize() != Dim * Dim) { + Context->ReportError(RD->getLocation(), + "invalid matrix struct: first field " + "should be an array with size %0: '%1'") + << (Dim * Dim) << (RD->getName()); + return nullptr; + } + + FIT++; + if (FIT != RD->field_end()) { + Context->ReportError(RD->getLocation(), + "invalid matrix struct: must have " + "exactly 1 field: '%0'") + << RD->getName(); + return nullptr; + } + } + + return new RSExportMatrixType(Context, TypeName, Dim); +} + +llvm::Type *RSExportMatrixType::convertToLLVMType() const { + // Construct LLVM type: + // struct { + // float X[mDim * mDim]; + // } + + llvm::LLVMContext &C = getRSContext()->getLLVMContext(); + llvm::ArrayType *X = llvm::ArrayType::get(llvm::Type::getFloatTy(C), + mDim * mDim); + return llvm::StructType::get(C, X, false); +} + +bool RSExportMatrixType::equals(const RSExportable *E) const { + CHECK_PARENT_EQUALITY(RSExportType, E); + return (static_cast<const RSExportMatrixType*>(E)->getDim() == getDim()); +} + +/************************* RSExportConstantArrayType *************************/ +RSExportConstantArrayType +*RSExportConstantArrayType::Create(RSContext *Context, + const clang::ConstantArrayType *CAT) { + slangAssert(CAT != nullptr && CAT->getTypeClass() == clang::Type::ConstantArray); + + slangAssert((CAT->getSize().getActiveBits() < 32) && "array too large"); + + unsigned Size = static_cast<unsigned>(CAT->getSize().getZExtValue()); + slangAssert((Size > 0) && "Constant array should have size greater than 0"); + + const clang::Type *ElementType = GetConstantArrayElementType(CAT); + RSExportType *ElementET = RSExportType::Create(Context, ElementType, + NotLegacyKernelArgument); + + if (ElementET == nullptr) { + return nullptr; + } + + return new RSExportConstantArrayType(Context, + ElementET, + Size); +} + +llvm::Type *RSExportConstantArrayType::convertToLLVMType() const { + return llvm::ArrayType::get(mElementType->getLLVMType(), getNumElement()); +} + +bool RSExportConstantArrayType::keep() { + if (!RSExportType::keep()) + return false; + const_cast<RSExportType*>(mElementType)->keep(); + return true; +} + +bool RSExportConstantArrayType::equals(const RSExportable *E) const { + CHECK_PARENT_EQUALITY(RSExportType, E); + const RSExportConstantArrayType *RHS = + static_cast<const RSExportConstantArrayType*>(E); + return ((getNumElement() == RHS->getNumElement()) && + (getElementType()->equals(RHS->getElementType()))); +} + +/**************************** RSExportRecordType ****************************/ +RSExportRecordType *RSExportRecordType::Create(RSContext *Context, + const clang::RecordType *RT, + const llvm::StringRef &TypeName, + bool mIsArtificial) { + slangAssert(RT != nullptr && RT->getTypeClass() == clang::Type::Record); + + const clang::RecordDecl *RD = RT->getDecl(); + slangAssert(RD->isStruct()); + + RD = RD->getDefinition(); + if (RD == nullptr) { + slangAssert(false && "struct is not defined in this module"); + return nullptr; + } + + // Struct layout construct by clang. We rely on this for obtaining the + // alloc size of a struct and offset of every field in that struct. + const clang::ASTRecordLayout *RL = + &Context->getASTContext().getASTRecordLayout(RD); + slangAssert((RL != nullptr) && + "Failed to retrieve the struct layout from Clang."); + + RSExportRecordType *ERT = + new RSExportRecordType(Context, + TypeName, + RD->hasAttr<clang::PackedAttr>(), + mIsArtificial, + RL->getDataSize().getQuantity(), + RL->getSize().getQuantity()); + unsigned int Index = 0; + + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++, Index++) { + + // FIXME: All fields should be primitive type + slangAssert(FI->getKind() == clang::Decl::Field); + clang::FieldDecl *FD = *FI; + + if (FD->isBitField()) { + return nullptr; + } + + // Type + RSExportType *ET = RSExportElement::CreateFromDecl(Context, FD); + + if (ET != nullptr) { + ERT->mFields.push_back( + new Field(ET, FD->getName(), ERT, + static_cast<size_t>(RL->getFieldOffset(Index) >> 3))); + } else { + Context->ReportError(RD->getLocation(), + "field type cannot be exported: '%0.%1'") + << RD->getName() << FD->getName(); + return nullptr; + } + } + + return ERT; +} + +llvm::Type *RSExportRecordType::convertToLLVMType() const { + // Create an opaque type since struct may reference itself recursively. + + // TODO(sliao): LLVM took out the OpaqueType. Any other to migrate to? + std::vector<llvm::Type*> FieldTypes; + + for (const_field_iterator FI = fields_begin(), FE = fields_end(); + FI != FE; + FI++) { + const Field *F = *FI; + const RSExportType *FET = F->getType(); + + FieldTypes.push_back(FET->getLLVMType()); + } + + llvm::StructType *ST = llvm::StructType::get(getRSContext()->getLLVMContext(), + FieldTypes, + mIsPacked); + if (ST != nullptr) { + return ST; + } else { + return nullptr; + } +} + +bool RSExportRecordType::keep() { + if (!RSExportType::keep()) + return false; + for (std::list<const Field*>::iterator I = mFields.begin(), + E = mFields.end(); + I != E; + I++) { + const_cast<RSExportType*>((*I)->getType())->keep(); + } + return true; +} + +bool RSExportRecordType::equals(const RSExportable *E) const { + CHECK_PARENT_EQUALITY(RSExportType, E); + + const RSExportRecordType *ERT = static_cast<const RSExportRecordType*>(E); + + if (ERT->getFields().size() != getFields().size()) + return false; + + const_field_iterator AI = fields_begin(), BI = ERT->fields_begin(); + + for (unsigned i = 0, e = getFields().size(); i != e; i++) { + if (!(*AI)->getType()->equals((*BI)->getType())) + return false; + AI++; + BI++; + } + + return true; +} + +void RSExportType::convertToRTD(RSReflectionTypeData *rtd) const { + memset(rtd, 0, sizeof(*rtd)); + rtd->vecSize = 1; + + switch(getClass()) { + case RSExportType::ExportClassPrimitive: { + const RSExportPrimitiveType *EPT = static_cast<const RSExportPrimitiveType*>(this); + rtd->type = RSExportPrimitiveType::getRSReflectionType(EPT); + return; + } + case RSExportType::ExportClassPointer: { + const RSExportPointerType *EPT = static_cast<const RSExportPointerType*>(this); + const RSExportType *PointeeType = EPT->getPointeeType(); + PointeeType->convertToRTD(rtd); + rtd->isPointer = true; + return; + } + case RSExportType::ExportClassVector: { + const RSExportVectorType *EVT = static_cast<const RSExportVectorType*>(this); + rtd->type = EVT->getRSReflectionType(EVT); + rtd->vecSize = EVT->getNumElement(); + return; + } + case RSExportType::ExportClassMatrix: { + const RSExportMatrixType *EMT = static_cast<const RSExportMatrixType*>(this); + unsigned Dim = EMT->getDim(); + slangAssert((Dim >= 2) && (Dim <= 4)); + rtd->type = &gReflectionTypes[15 + Dim-2]; + return; + } + case RSExportType::ExportClassConstantArray: { + const RSExportConstantArrayType* CAT = + static_cast<const RSExportConstantArrayType*>(this); + CAT->getElementType()->convertToRTD(rtd); + rtd->arraySize = CAT->getNumElement(); + return; + } + case RSExportType::ExportClassRecord: { + slangAssert(!"RSExportType::ExportClassRecord not implemented"); + return;// RS_TYPE_CLASS_NAME_PREFIX + ET->getName() + ".Item"; + } + default: { + slangAssert(false && "Unknown class of type"); + } + } +} + + +} // namespace slang
diff --git a/slang/slang_rs_export_type.h b/slang/slang_rs_export_type.h new file mode 100644 index 0000000..2b5787c --- /dev/null +++ b/slang/slang_rs_export_type.h
@@ -0,0 +1,635 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_TYPE_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_TYPE_H_ + +#include <list> +#include <set> +#include <string> +#include <sstream> + +#include "clang/AST/Decl.h" +#include "clang/AST/Type.h" + +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/StringRef.h" + +#include "llvm/Support/ManagedStatic.h" + +#include "slang_rs_exportable.h" + + +inline const clang::Type* GetCanonicalType(const clang::Type* T) { + if (T == nullptr) { + return nullptr; + } + return T->getCanonicalTypeInternal().getTypePtr(); +} + +inline const clang::Type* GetCanonicalType(clang::QualType QT) { + return GetCanonicalType(QT.getTypePtr()); +} + +inline const clang::Type* GetExtVectorElementType(const clang::ExtVectorType *T) { + if (T == nullptr) { + return nullptr; + } + return GetCanonicalType(T->getElementType()); +} + +inline const clang::Type* GetPointeeType(const clang::PointerType *T) { + if (T == nullptr) { + return nullptr; + } + return GetCanonicalType(T->getPointeeType()); +} + +inline const clang::Type* GetConstantArrayElementType(const clang::ConstantArrayType *T) { + if (T == nullptr) { + return nullptr; + } + return GetCanonicalType(T->getElementType()); +} + + +namespace llvm { + class Type; +} // namespace llvm + +namespace slang { + +class RSContext; + +// Broad grouping of the data types +enum DataTypeCategory { + PrimitiveDataType, + MatrixDataType, + ObjectDataType +}; + +// Denote whether a particular export is intended for a legacy kernel argument. +// NotLegacyKernelArgument - not a legacy kernel argument (might not even be a +// kernel argument). +// LegacyKernelArgument - legacy pass-by-reference kernel argument using +// pointers and no kernel attribute. +enum ExportKind { + NotLegacyKernelArgument, + LegacyKernelArgument + }; + + +// From graphics/java/android/renderscript/Element.java: Element.DataType +/* NOTE: The values of the enums are found compiled in the bit code (i.e. as + * values, not symbolic. When adding new types, you must add them to the end. + * If removing types, you can't re-use the integer value. + * + * TODO: but if you do this, you won't be able to keep using First* & Last* + * for validation. + * + * IMPORTANT: This enum should correspond one-for-one to the entries found in the + * gReflectionsTypes table (except for the two negative numbers). Don't edit one without + * the other. + */ +enum DataType { + DataTypeIsStruct = -2, + DataTypeUnknown = -1, + + DataTypeFloat16 = 0, + DataTypeFloat32 = 1, + DataTypeFloat64 = 2, + DataTypeSigned8 = 3, + DataTypeSigned16 = 4, + DataTypeSigned32 = 5, + DataTypeSigned64 = 6, + DataTypeUnsigned8 = 7, + DataTypeUnsigned16 = 8, + DataTypeUnsigned32 = 9, + DataTypeUnsigned64 = 10, + DataTypeBoolean = 11, + DataTypeUnsigned565 = 12, + DataTypeUnsigned5551 = 13, + DataTypeUnsigned4444 = 14, + + DataTypeRSMatrix2x2 = 15, + DataTypeRSMatrix3x3 = 16, + DataTypeRSMatrix4x4 = 17, + + DataTypeRSElement = 18, + DataTypeRSType = 19, + DataTypeRSAllocation = 20, + DataTypeRSSampler = 21, + DataTypeRSScript = 22, + DataTypeRSMesh = 23, + DataTypeRSPath = 24, + DataTypeRSProgramFragment = 25, + DataTypeRSProgramVertex = 26, + DataTypeRSProgramRaster = 27, + DataTypeRSProgramStore = 28, + DataTypeRSFont = 29, + + // This should always be last and correspond to the size of the gReflectionTypes table. + DataTypeMax +}; + +typedef struct { + // The data type category + DataTypeCategory category; + // "Common name" in script (C99) + const char * s_name; + // The element name in RenderScript + const char * rs_type; + // The short element name in RenderScript + const char * rs_short_type; + // The size of the type in bits + uint32_t size_in_bits; + // The reflected name in C code + const char * c_name; + // The reflected name in Java code + const char * java_name; + // The array type that is compatible with Allocations of our type, + // for use with copyTo(), copyFrom() + const char * java_array_element_name; + // The prefix for C vector types + const char * rs_c_vector_prefix; + // The prefix for Java vector types + const char * rs_java_vector_prefix; + // Indicates an unsigned type undergoing Java promotion + bool java_promotion; +} RSReflectionType; + + +typedef struct RSReflectionTypeData_rec { + const RSReflectionType *type; + uint32_t vecSize; // number of elements; one if not a vector + bool isPointer; + uint32_t arraySize; // number of elements; zero if not an array + + // Subelements + //std::vector<const struct RSReflectionTypeData_rec *> fields; + //std::vector< std::string > fieldNames; + //std::vector< uint32_t> fieldOffsetBytes; +} RSReflectionTypeData; + +// Make a name for types that are too complicated to create the real names. +std::string CreateDummyName(const char *type, const std::string &name); + +inline bool IsDummyName(const llvm::StringRef &Name) { + return Name.startswith("<"); +} + +class RSExportType : public RSExportable { + friend class RSExportElement; + public: + typedef enum { + ExportClassPrimitive, + ExportClassPointer, + ExportClassVector, + ExportClassMatrix, + ExportClassConstantArray, + ExportClassRecord + } ExportClass; + + void convertToRTD(RSReflectionTypeData *rtd) const; + + private: + ExportClass mClass; + std::string mName; + + // Cache the result after calling convertToLLVMType() at the first time + mutable llvm::Type *mLLVMType; + + protected: + RSExportType(RSContext *Context, + ExportClass Class, + const llvm::StringRef &Name); + + // Let's make it private since there're some prerequisites to call this + // function. + // + // @T was normalized by calling RSExportType::NormalizeType(). + // @TypeName was retrieved from RSExportType::GetTypeName() before calling + // this. + // @EK denotes whether this @T is being used for a legacy kernel argument or + // something else. + // + static RSExportType *Create(RSContext *Context, + const clang::Type *T, + const llvm::StringRef &TypeName, + ExportKind EK); + + static llvm::StringRef GetTypeName(const clang::Type *T); + + // This function convert the RSExportType to LLVM type. Actually, it should be + // "convert Clang type to LLVM type." However, clang doesn't make this API + // (lib/CodeGen/CodeGenTypes.h) public, we need to do by ourselves. + // + // Once we can get LLVM type, we can use LLVM to get alignment information, + // allocation size of a given type and structure layout that LLVM used + // (all of these information are target dependent) without dealing with these + // by ourselves. + virtual llvm::Type *convertToLLVMType() const = 0; + // Record type may recursively reference its type definition. We need a + // temporary type setup before the type construction gets done. + inline void setAbstractLLVMType(llvm::Type *LLVMType) const { + mLLVMType = LLVMType; + } + + virtual ~RSExportType(); + + public: + // This function additionally verifies that the Type T is exportable. + // If it is not, this function returns false. Otherwise it returns true. + static bool NormalizeType(const clang::Type *&T, + llvm::StringRef &TypeName, + RSContext *Context, + const clang::VarDecl *VD, + ExportKind EK); + + // This function checks whether the specified type can be handled by RS/FS. + // If it cannot, this function returns false. Otherwise it returns true. + // Filterscript has additional restrictions on supported types. + static bool ValidateType(slang::RSContext *Context, clang::ASTContext &C, + clang::QualType QT, const clang::NamedDecl *ND, + clang::SourceLocation Loc, unsigned int TargetAPI, + bool IsFilterscript, bool IsExtern); + + // This function ensures that the VarDecl can be properly handled by RS. + // If it cannot, this function returns false. Otherwise it returns true. + // Filterscript has additional restrictions on supported types. + static bool ValidateVarDecl(slang::RSContext *Context, clang::VarDecl *VD, + unsigned int TargetAPI, bool IsFilterscript); + + // @T may not be normalized + static RSExportType *Create(RSContext *Context, const clang::Type *T, + ExportKind EK, + // T is type of VD or of subobject within VD + const clang::VarDecl *VD = nullptr); + static RSExportType *CreateFromDecl(RSContext *Context, + const clang::VarDecl *VD); + + static const clang::Type *GetTypeOfDecl(const clang::DeclaratorDecl *DD); + + inline ExportClass getClass() const { return mClass; } + + inline llvm::Type *getLLVMType() const { + if (mLLVMType == nullptr) + mLLVMType = convertToLLVMType(); + return mLLVMType; + } + + // Return the maximum number of bytes that may be written when this type is stored. + virtual size_t getStoreSize() const; + + // Return the distance in bytes between successive elements of this type; it includes padding. + virtual size_t getAllocSize() const; + + inline const std::string &getName() const { return mName; } + + virtual std::string getElementName() const { + // Base case is actually an invalid C/Java identifier. + return "@@INVALID@@"; + } + + virtual bool keep(); + virtual bool equals(const RSExportable *E) const; +}; // RSExportType + +// Primitive types +class RSExportPrimitiveType : public RSExportType { + friend class RSExportType; + friend class RSExportElement; + private: + DataType mType; + bool mNormalized; + + typedef llvm::StringMap<DataType> RSSpecificTypeMapTy; + static llvm::ManagedStatic<RSSpecificTypeMapTy> RSSpecificTypeMap; + + static const size_t SizeOfDataTypeInBits[]; + // @T was normalized by calling RSExportType::NormalizeType() before calling + // this. + // @TypeName was retrieved from RSExportType::GetTypeName() before calling + // this + static RSExportPrimitiveType *Create(RSContext *Context, + const clang::Type *T, + const llvm::StringRef &TypeName, + bool Normalized = false); + + protected: + RSExportPrimitiveType(RSContext *Context, + // for derived class to set their type class + ExportClass Class, + const llvm::StringRef &Name, + DataType DT, + bool Normalized) + : RSExportType(Context, Class, Name), + mType(DT), + mNormalized(Normalized) { + } + + virtual llvm::Type *convertToLLVMType() const; + + static DataType GetDataType(RSContext *Context, const clang::Type *T); + + public: + // T is normalized by calling RSExportType::NormalizeType() before + // calling this + static bool IsPrimitiveType(const clang::Type *T); + + // @T may not be normalized + static RSExportPrimitiveType *Create(RSContext *Context, + const clang::Type *T); + + static DataType GetRSSpecificType(const llvm::StringRef &TypeName); + static DataType GetRSSpecificType(const clang::Type *T); + + static bool IsRSMatrixType(DataType DT); + static bool IsRSObjectType(DataType DT); + static bool IsRSObjectType(const clang::Type *T) { + return IsRSObjectType(GetRSSpecificType(T)); + } + + // Determines whether T is [an array of] struct that contains at least one + // RS object type within it. + static bool IsStructureTypeWithRSObject(const clang::Type *T); + + // For a primitive type, this is the size of the type. + // For a vector type (RSExportVectorType is derived from RSExportPrimitiveType), + // this is the size of a single vector element (component). + static size_t GetElementSizeInBits(const RSExportPrimitiveType *EPT); + + inline DataType getType() const { return mType; } + inline bool isRSObjectType() const { + return IsRSObjectType(mType); + } + + virtual bool equals(const RSExportable *E) const; + + static RSReflectionType *getRSReflectionType(DataType DT); + static RSReflectionType *getRSReflectionType( + const RSExportPrimitiveType *EPT) { + return getRSReflectionType(EPT->getType()); + } + + // For a vector type, this is the size of a single element. + unsigned getElementSizeInBytes() const { return (GetElementSizeInBits(this) >> 3); } + + std::string getElementName() const { + return getRSReflectionType(this)->rs_short_type; + } +}; // RSExportPrimitiveType + + +class RSExportPointerType : public RSExportType { + friend class RSExportType; + friend class RSExportFunc; + private: + const RSExportType *mPointeeType; + + RSExportPointerType(RSContext *Context, + const llvm::StringRef &Name, + const RSExportType *PointeeType) + : RSExportType(Context, ExportClassPointer, Name), + mPointeeType(PointeeType) { + } + + // @PT was normalized by calling RSExportType::NormalizeType() before calling + // this. + static RSExportPointerType *Create(RSContext *Context, + const clang::PointerType *PT, + const llvm::StringRef &TypeName); + + virtual llvm::Type *convertToLLVMType() const; + + public: + virtual bool keep(); + + inline const RSExportType *getPointeeType() const { return mPointeeType; } + + virtual bool equals(const RSExportable *E) const; +}; // RSExportPointerType + + +class RSExportVectorType : public RSExportPrimitiveType { + friend class RSExportType; + friend class RSExportElement; + private: + unsigned mNumElement; // number of elements (components) + + RSExportVectorType(RSContext *Context, + const llvm::StringRef &Name, + DataType DT, + bool Normalized, + unsigned NumElement) + : RSExportPrimitiveType(Context, ExportClassVector, Name, + DT, Normalized), + mNumElement(NumElement) { + } + + // @EVT was normalized by calling RSExportType::NormalizeType() before + // calling this. + static RSExportVectorType *Create(RSContext *Context, + const clang::ExtVectorType *EVT, + const llvm::StringRef &TypeName, + bool Normalized = false); + + virtual llvm::Type *convertToLLVMType() const; + + public: + static llvm::StringRef GetTypeName(const clang::ExtVectorType *EVT); + + inline unsigned getNumElement() const { return mNumElement; } + + std::string getElementName() const { + std::stringstream Name; + Name << RSExportPrimitiveType::getRSReflectionType(this)->rs_short_type + << "_" << getNumElement(); + return Name.str(); + } + + virtual bool equals(const RSExportable *E) const; +}; + +// Only *square* *float* matrix is supported by now. +// +// struct rs_matrix{2x2,3x3,4x4, ..., NxN} should be defined as the following +// form *exactly*: +// typedef struct { +// float m[{NxN}]; +// } rs_matrixNxN; +// +// where mDim will be N. +class RSExportMatrixType : public RSExportType { + friend class RSExportType; + private: + unsigned mDim; // dimension + + RSExportMatrixType(RSContext *Context, + const llvm::StringRef &Name, + unsigned Dim) + : RSExportType(Context, ExportClassMatrix, Name), + mDim(Dim) { + } + + virtual llvm::Type *convertToLLVMType() const; + + public: + // @RT was normalized by calling RSExportType::NormalizeType() before + // calling this. + static RSExportMatrixType *Create(RSContext *Context, + const clang::RecordType *RT, + const llvm::StringRef &TypeName, + unsigned Dim); + + inline unsigned getDim() const { return mDim; } + + virtual bool equals(const RSExportable *E) const; +}; + +class RSExportConstantArrayType : public RSExportType { + friend class RSExportType; + private: + const RSExportType *mElementType; // Array element type + unsigned mNumElement; // Array element count + + RSExportConstantArrayType(RSContext *Context, + const RSExportType *ElementType, + unsigned NumElement) + : RSExportType(Context, ExportClassConstantArray, "<ConstantArray>"), + mElementType(ElementType), + mNumElement(NumElement) { + } + + // @CAT was normalized by calling RSExportType::NormalizeType() before + // calling this. + static RSExportConstantArrayType *Create(RSContext *Context, + const clang::ConstantArrayType *CAT); + + virtual llvm::Type *convertToLLVMType() const; + + public: + unsigned getNumElement() const { return mNumElement; } + const RSExportType *getElementType() const { return mElementType; } + + std::string getElementName() const { + return mElementType->getElementName(); + } + + virtual bool keep(); + virtual bool equals(const RSExportable *E) const; +}; + +class RSExportRecordType : public RSExportType { + friend class RSExportType; + public: + class Field { + private: + const RSExportType *mType; + // Field name + std::string mName; + // Link to the struct that contain this field + const RSExportRecordType *mParent; + // Offset in the container + size_t mOffset; + + public: + Field(const RSExportType *T, + const llvm::StringRef &Name, + const RSExportRecordType *Parent, + size_t Offset) + : mType(T), + mName(Name.data(), Name.size()), + mParent(Parent), + mOffset(Offset) { + } + + inline const RSExportRecordType *getParent() const { return mParent; } + inline const RSExportType *getType() const { return mType; } + inline const std::string &getName() const { return mName; } + inline size_t getOffsetInParent() const { return mOffset; } + }; + + typedef std::list<const Field*>::const_iterator const_field_iterator; + + inline const_field_iterator fields_begin() const { + return this->mFields.begin(); + } + inline const_field_iterator fields_end() const { + return this->mFields.end(); + } + + private: + std::list<const Field*> mFields; + bool mIsPacked; + // Artificial export struct type is not exported by user (and thus it won't + // get reflected) + bool mIsArtificial; + size_t mStoreSize; + size_t mAllocSize; + + RSExportRecordType(RSContext *Context, + const llvm::StringRef &Name, + bool IsPacked, + bool IsArtificial, + size_t StoreSize, + size_t AllocSize) + : RSExportType(Context, ExportClassRecord, Name), + mIsPacked(IsPacked), + mIsArtificial(IsArtificial), + mStoreSize(StoreSize), + mAllocSize(AllocSize) { + } + + // @RT was normalized by calling RSExportType::NormalizeType() before calling + // this. + // @TypeName was retrieved from RSExportType::GetTypeName() before calling + // this. + static RSExportRecordType *Create(RSContext *Context, + const clang::RecordType *RT, + const llvm::StringRef &TypeName, + bool mIsArtificial = false); + + virtual llvm::Type *convertToLLVMType() const; + + public: + inline const std::list<const Field*>& getFields() const { return mFields; } + inline bool isPacked() const { return mIsPacked; } + inline bool isArtificial() const { return mIsArtificial; } + virtual size_t getStoreSize() const { return mStoreSize; } + virtual size_t getAllocSize() const { return mAllocSize; } + + virtual std::string getElementName() const { + return "ScriptField_" + getName(); + } + + virtual bool keep(); + virtual bool equals(const RSExportable *E) const; + + ~RSExportRecordType() { + for (std::list<const Field*>::iterator I = mFields.begin(), + E = mFields.end(); + I != E; + I++) + if (*I != nullptr) + delete *I; + } +}; // RSExportRecordType + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_TYPE_H_ NOLINT
diff --git a/slang/slang_rs_export_var.cpp b/slang/slang_rs_export_var.cpp new file mode 100644 index 0000000..2da2baf --- /dev/null +++ b/slang/slang_rs_export_var.cpp
@@ -0,0 +1,108 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_export_var.h" + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Type.h" + +#include "llvm/ADT/APSInt.h" + +#include "slang_rs_context.h" +#include "slang_rs_export_type.h" + +namespace slang { + +RSExportVar::RSExportVar(RSContext *Context, + const clang::VarDecl *VD, + const RSExportType *ET) + : RSExportable(Context, RSExportable::EX_VAR), + mName(VD->getName().data(), VD->getName().size()), + mET(ET), + mIsConst(false), + mIsUnsigned(false), + mArraySize(0), + mNumInits(0) { + // mInit - Evaluate initializer expression + const clang::Expr *Initializer = VD->getAnyInitializer(); + if (Initializer != nullptr) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: { + Initializer->EvaluateAsRValue(mInit, Context->getASTContext()); + break; + } + case RSExportType::ExportClassPointer: { + if (Initializer->isNullPointerConstant(Context->getASTContext(), + clang::Expr::NPC_ValueDependentIsNotNull)) { + mInit.Val = clang::APValue(llvm::APSInt(1)); + } else { + if (!Initializer->EvaluateAsRValue(mInit, Context->getASTContext())) { + Context->ReportError(Initializer->getExprLoc(), + "initializer is not an R-value"); + } + } + break; + } + case RSExportType::ExportClassConstantArray: { + const clang::InitListExpr *IList = + static_cast<const clang::InitListExpr*>(Initializer); + if (!IList) { + Context->ReportError(VD->getLocation(), + "Unable to find initializer list"); + break; + } + const RSExportConstantArrayType *ECAT = + static_cast<const RSExportConstantArrayType*>(ET); + mArraySize = ECAT->getNumElement(); + mNumInits = IList->getNumInits(); + for (unsigned int i = 0; i < mNumInits; i++) { + clang::Expr::EvalResult tempInit; + if (!IList->getInit(i)->EvaluateAsRValue(tempInit, + Context->getASTContext())) { + Context->ReportError(IList->getInit(i)->getExprLoc(), + "initializer is not an R-value"); + } + mInitArray.push_back(tempInit); + } + break; + } + case RSExportType::ExportClassMatrix: + case RSExportType::ExportClassRecord: { + Context->ReportError( + VD->getLocation(), + "Reflection of initializer to variable '%0' (of type " + "'%1') is unsupported currently.") + << mName << ET->getName(); + break; + } + default: { + slangAssert(false && "Unknown class of type"); + } + } + } + + clang::QualType QT = VD->getTypeSourceInfo()->getType(); + if (!QT.isNull()) { + mIsConst = QT.isConstQualified(); + mIsUnsigned = QT->hasUnsignedIntegerRepresentation(); + if (QT == Context->getASTContext().BoolTy) { + mIsUnsigned = false; + } + } +} + +} // namespace slang
diff --git a/slang/slang_rs_export_var.h b/slang/slang_rs_export_var.h new file mode 100644 index 0000000..84d607c --- /dev/null +++ b/slang/slang_rs_export_var.h
@@ -0,0 +1,70 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_VAR_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_VAR_H_ + +#include <string> + +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" + +#include "llvm/ADT/StringRef.h" + +#include "slang_assert.h" +#include "slang_rs_exportable.h" + +namespace slang { + class RSContext; + class RSExportType; + +class RSExportVar : public RSExportable { + friend class RSContext; + private: + std::string mName; + const RSExportType *mET; + bool mIsConst; + bool mIsUnsigned; + + clang::Expr::EvalResult mInit; + + size_t mArraySize; // number of elements + size_t mNumInits; + llvm::SmallVector<clang::Expr::EvalResult, 0> mInitArray; + + RSExportVar(RSContext *Context, + const clang::VarDecl *VD, + const RSExportType *ET); + + public: + inline const std::string &getName() const { return mName; } + inline const RSExportType *getType() const { return mET; } + inline bool isConst() const { return mIsConst; } + inline bool isUnsigned() const { return mIsUnsigned; } + + inline const clang::APValue &getInit() const { return mInit.Val; } + + inline size_t getArraySize() const { return mArraySize; } + inline size_t getNumInits() const { return mNumInits; } + inline const clang::APValue &getInitArray(unsigned int i) const { + slangAssert(i < mNumInits); + return mInitArray[i].Val; + } +}; // RSExportVar + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORT_VAR_H_ NOLINT
diff --git a/slang/slang_rs_exportable.cpp b/slang/slang_rs_exportable.cpp new file mode 100644 index 0000000..4a843ab --- /dev/null +++ b/slang/slang_rs_exportable.cpp
@@ -0,0 +1,33 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_exportable.h" + +namespace slang { + +bool RSExportable::keep() { + if (isKeep()) + return false; + // Invalidate associated Context. + mContext = nullptr; + return true; +} + +bool RSExportable::equals(const RSExportable *E) const { + return ((E == nullptr) ? false : (mK == E->mK)); +} + +} // namespace slang
diff --git a/slang/slang_rs_exportable.h b/slang/slang_rs_exportable.h new file mode 100644 index 0000000..766a388 --- /dev/null +++ b/slang/slang_rs_exportable.h
@@ -0,0 +1,64 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORTABLE_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORTABLE_H_ + +#include "slang_rs_context.h" + +namespace slang { + +class RSExportable { + public: + enum Kind { + EX_FUNC, + EX_TYPE, + EX_VAR, + EX_FOREACH, + EX_REDUCE + }; + + private: + RSContext *mContext; + + Kind mK; + + protected: + RSExportable(RSContext *Context, RSExportable::Kind K) + : mContext(Context), + mK(K) { + Context->newExportable(this); + } + + public: + inline Kind getKind() const { return mK; } + + // When keep() is invoked, mKeep will set to true and the associated RSContext + // won't free this RSExportable object in its destructor. The deallocation + // responsibility is then transferred to the object who invoked this function. + // Return false if the exportable is kept or failed to keep. + virtual bool keep(); + inline bool isKeep() const { return (mContext == nullptr); } + + virtual bool equals(const RSExportable *E) const; + + inline RSContext *getRSContext() const { return mContext; } + + virtual ~RSExportable() { } +}; +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_EXPORTABLE_H_ NOLINT
diff --git a/slang/slang_rs_foreach_lowering.cpp b/slang/slang_rs_foreach_lowering.cpp new file mode 100644 index 0000000..6e9991e --- /dev/null +++ b/slang/slang_rs_foreach_lowering.cpp
@@ -0,0 +1,392 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_foreach_lowering.h" + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" +#include "llvm/Support/raw_ostream.h" +#include "slang_rs_context.h" +#include "slang_rs_export_foreach.h" + +namespace slang { + +namespace { + +const char KERNEL_LAUNCH_FUNCTION_NAME[] = "rsForEach"; +const char KERNEL_LAUNCH_FUNCTION_NAME_WITH_OPTIONS[] = "rsForEachWithOptions"; +const char INTERNAL_LAUNCH_FUNCTION_NAME[] = + "_Z17rsForEachInternaliP14rs_script_calliiP13rs_allocation"; + +} // anonymous namespace + +RSForEachLowering::RSForEachLowering(RSContext* ctxt) + : mCtxt(ctxt), mASTCtxt(ctxt->getASTContext()) {} + +// Check if the passed-in expr references a kernel function in the following +// pattern in the AST. +// +// ImplicitCastExpr 'void *' <BitCast> +// `-ImplicitCastExpr 'int (*)(int)' <FunctionToPointerDecay> +// `-DeclRefExpr 'int (int)' Function 'foo' 'int (int)' +const clang::FunctionDecl* RSForEachLowering::matchFunctionDesignator( + clang::Expr* expr) { + clang::ImplicitCastExpr* ToVoidPtr = + clang::dyn_cast<clang::ImplicitCastExpr>(expr); + if (ToVoidPtr == nullptr) { + return nullptr; + } + + clang::ImplicitCastExpr* Decay = + clang::dyn_cast<clang::ImplicitCastExpr>(ToVoidPtr->getSubExpr()); + + if (Decay == nullptr) { + return nullptr; + } + + clang::DeclRefExpr* DRE = + clang::dyn_cast<clang::DeclRefExpr>(Decay->getSubExpr()); + + if (DRE == nullptr) { + return nullptr; + } + + const clang::FunctionDecl* FD = + clang::dyn_cast<clang::FunctionDecl>(DRE->getDecl()); + + if (FD == nullptr) { + return nullptr; + } + + return FD; +} + +// Checks if the call expression is a legal rsForEach call by looking for the +// following pattern in the AST. On success, returns the first argument that is +// a FunctionDecl of a kernel function. +// +// CallExpr 'void' +// | +// |-ImplicitCastExpr 'void (*)(void *, ...)' <FunctionToPointerDecay> +// | `-DeclRefExpr 'void (void *, ...)' 'rsForEach' 'void (void *, ...)' +// | +// |-ImplicitCastExpr 'void *' <BitCast> +// | `-ImplicitCastExpr 'int (*)(int)' <FunctionToPointerDecay> +// | `-DeclRefExpr 'int (int)' Function 'foo' 'int (int)' +// | +// |-ImplicitCastExpr 'rs_allocation':'rs_allocation' <LValueToRValue> +// | `-DeclRefExpr 'rs_allocation':'rs_allocation' lvalue ParmVar 'in' 'rs_allocation':'rs_allocation' +// | +// `-ImplicitCastExpr 'rs_allocation':'rs_allocation' <LValueToRValue> +// `-DeclRefExpr 'rs_allocation':'rs_allocation' lvalue ParmVar 'out' 'rs_allocation':'rs_allocation' +const clang::FunctionDecl* RSForEachLowering::matchKernelLaunchCall( + clang::CallExpr* CE, int* slot, bool* hasOptions) { + const clang::Decl* D = CE->getCalleeDecl(); + const clang::FunctionDecl* FD = clang::dyn_cast<clang::FunctionDecl>(D); + + if (FD == nullptr) { + return nullptr; + } + + const clang::StringRef& funcName = FD->getName(); + + if (funcName.equals(KERNEL_LAUNCH_FUNCTION_NAME)) { + *hasOptions = false; + } else if (funcName.equals(KERNEL_LAUNCH_FUNCTION_NAME_WITH_OPTIONS)) { + *hasOptions = true; + } else { + return nullptr; + } + + if (mInsideKernel) { + mCtxt->ReportError(CE->getExprLoc(), + "Invalid kernel launch call made from inside another kernel."); + return nullptr; + } + + clang::Expr* arg0 = CE->getArg(0); + const clang::FunctionDecl* kernel = matchFunctionDesignator(arg0); + + if (kernel == nullptr) { + mCtxt->ReportError(arg0->getExprLoc(), + "Invalid kernel launch call. " + "Expects a function designator for the first argument."); + return nullptr; + } + + // Verifies that kernel is indeed a "kernel" function. + *slot = mCtxt->getForEachSlotNumber(kernel); + if (*slot == -1) { + mCtxt->ReportError(CE->getExprLoc(), + "%0 applied to function %1 defined without \"kernel\" attribute") + << funcName << kernel->getName(); + return nullptr; + } + + return kernel; +} + +// Create an AST node for the declaration of rsForEachInternal +clang::FunctionDecl* RSForEachLowering::CreateForEachInternalFunctionDecl() { + clang::DeclContext* DC = mASTCtxt.getTranslationUnitDecl(); + clang::SourceLocation Loc; + + llvm::StringRef SR(INTERNAL_LAUNCH_FUNCTION_NAME); + clang::IdentifierInfo& II = mASTCtxt.Idents.get(SR); + clang::DeclarationName N(&II); + + clang::FunctionProtoType::ExtProtoInfo EPI; + + const clang::QualType& AllocTy = mCtxt->getAllocationType(); + clang::QualType AllocPtrTy = mASTCtxt.getPointerType(AllocTy); + + clang::QualType ScriptCallTy = mCtxt->getScriptCallType(); + const clang::QualType ScriptCallPtrTy = mASTCtxt.getPointerType(ScriptCallTy); + + clang::QualType ParamTypes[] = { + mASTCtxt.IntTy, // int slot + ScriptCallPtrTy, // rs_script_call_t* launch_options + mASTCtxt.IntTy, // int numOutput + mASTCtxt.IntTy, // int numInputs + AllocPtrTy // rs_allocation* allocs + }; + + clang::QualType T = mASTCtxt.getFunctionType( + mASTCtxt.VoidTy, // Return type + ParamTypes, // Parameter types + EPI); + + clang::FunctionDecl* FD = clang::FunctionDecl::Create( + mASTCtxt, DC, Loc, Loc, N, T, nullptr, clang::SC_Extern); + + static constexpr unsigned kNumParams = sizeof(ParamTypes) / sizeof(ParamTypes[0]); + clang::ParmVarDecl *ParamDecls[kNumParams]; + for (unsigned I = 0; I != kNumParams; ++I) { + ParamDecls[I] = clang::ParmVarDecl::Create(mASTCtxt, FD, Loc, + Loc, nullptr, ParamTypes[I], nullptr, clang::SC_None, nullptr); + // Implicit means that this declaration was created by the compiler, and + // not part of the actual source code. + ParamDecls[I]->setImplicit(); + } + FD->setParams(llvm::makeArrayRef(ParamDecls, kNumParams)); + + // Implicit means that this declaration was created by the compiler, and + // not part of the actual source code. + FD->setImplicit(); + + return FD; +} + +// Create an expression like the following that references the rsForEachInternal to +// replace the callee in the original call expression that references rsForEach. +// +// ImplicitCastExpr 'void (*)(int, rs_script_call_t*, int, int, rs_allocation*)' <FunctionToPointerDecay> +// `-DeclRefExpr 'void' Function '_Z17rsForEachInternaliP14rs_script_calliiP13rs_allocation' 'void (int, rs_script_call_t*, int, int, rs_allocation*)' +clang::Expr* RSForEachLowering::CreateCalleeExprForInternalForEach() { + clang::FunctionDecl* FDNew = CreateForEachInternalFunctionDecl(); + + const clang::QualType FDNewType = FDNew->getType(); + + clang::DeclRefExpr* refExpr = clang::DeclRefExpr::Create( + mASTCtxt, clang::NestedNameSpecifierLoc(), clang::SourceLocation(), FDNew, + false, clang::SourceLocation(), FDNewType, clang::VK_RValue); + + clang::Expr* calleeNew = clang::ImplicitCastExpr::Create( + mASTCtxt, mASTCtxt.getPointerType(FDNewType), + clang::CK_FunctionToPointerDecay, refExpr, nullptr, clang::VK_RValue); + + return calleeNew; +} + +// This visit method checks (via pattern matching) if the call expression is to +// rsForEach, and the arguments satisfy the restrictions on the +// rsForEach API. If so, replace the call with a rsForEachInternal call +// with the first argument replaced by the slot number of the kernel function +// referenced in the original first argument. +// +// See comments to the helper methods defined above for details. +void RSForEachLowering::VisitCallExpr(clang::CallExpr* CE) { + int slot; + bool hasOptions; + const clang::FunctionDecl* kernel = matchKernelLaunchCall(CE, &slot, &hasOptions); + if (kernel == nullptr) { + return; + } + + slangAssert(slot >= 0); + + const unsigned numArgsOrig = CE->getNumArgs(); + + clang::QualType resultType = kernel->getReturnType().getCanonicalType(); + const unsigned numOutputsExpected = resultType->isVoidType() ? 0 : 1; + + const unsigned numInputsExpected = RSExportForEach::getNumInputs(mCtxt->getTargetAPI(), kernel); + + // Verifies that rsForEach takes the right number of input and output allocations. + // TODO: Check input/output allocation types match kernel function expectation. + const unsigned numAllocations = numArgsOrig - (hasOptions ? 2 : 1); + if (numInputsExpected + numOutputsExpected != numAllocations) { + mCtxt->ReportError( + CE->getExprLoc(), + "Number of input and output allocations unexpected for kernel function %0") + << kernel->getName(); + return; + } + + clang::Expr* calleeNew = CreateCalleeExprForInternalForEach(); + CE->setCallee(calleeNew); + + const clang::CanQualType IntTy = mASTCtxt.IntTy; + const unsigned IntTySize = mASTCtxt.getTypeSize(IntTy); + const llvm::APInt APIntSlot(IntTySize, slot); + const clang::Expr* arg0 = CE->getArg(0); + const clang::SourceLocation Loc(arg0->getLocStart()); + clang::Expr* IntSlotNum = + clang::IntegerLiteral::Create(mASTCtxt, APIntSlot, IntTy, Loc); + CE->setArg(0, IntSlotNum); + + /* + The last few arguments to rsForEach or rsForEachWithOptions are allocations. + Creates a new compound literal of an array initialized with those values, and + passes it to rsForEachInternal as the last (the 5th) argument. + + For example, rsForEach(foo, ain1, ain2, aout) would be translated into + rsForEachInternal( + 1, // Slot number for kernel + NULL, // Launch options + 2, // Number of input allocations + 1, // Number of output allocations + (rs_allocation[]){ain1, ain2, aout) // Input and output allocations + ); + + The AST for the rs_allocation array looks like following: + + ImplicitCastExpr 0x99575670 'struct rs_allocation *' <ArrayToPointerDecay> + `-CompoundLiteralExpr 0x99575648 'struct rs_allocation [3]' lvalue + `-InitListExpr 0x99575590 'struct rs_allocation [3]' + |-ImplicitCastExpr 0x99574b38 'rs_allocation':'struct rs_allocation' <LValueToRValue> + | `-DeclRefExpr 0x99574a08 'rs_allocation':'struct rs_allocation' lvalue ParmVar 0x9942c408 'ain1' 'rs_allocation':'struct rs_allocation' + |-ImplicitCastExpr 0x99574b50 'rs_allocation':'struct rs_allocation' <LValueToRValue> + | `-DeclRefExpr 0x99574a30 'rs_allocation':'struct rs_allocation' lvalue ParmVar 0x9942c478 'ain2' 'rs_allocation':'struct rs_allocation' + `-ImplicitCastExpr 0x99574b68 'rs_allocation':'struct rs_allocation' <LValueToRValue> + `-DeclRefExpr 0x99574a58 'rs_allocation':'struct rs_allocation' lvalue ParmVar 0x9942c478 'aout' 'rs_allocation':'struct rs_allocation' + */ + + const clang::QualType& AllocTy = mCtxt->getAllocationType(); + const llvm::APInt APIntNumAllocs(IntTySize, numAllocations); + clang::QualType AllocArrayTy = mASTCtxt.getConstantArrayType( + AllocTy, + APIntNumAllocs, + clang::ArrayType::ArraySizeModifier::Normal, + 0 // index type qualifiers + ); + + const int allocArgIndexEnd = numArgsOrig - 1; + int allocArgIndexStart = allocArgIndexEnd; + + clang::Expr** args = CE->getArgs(); + + clang::SourceLocation lparenloc; + clang::SourceLocation rparenloc; + + if (numAllocations > 0) { + allocArgIndexStart = hasOptions ? 2 : 1; + lparenloc = args[allocArgIndexStart]->getExprLoc(); + rparenloc = args[allocArgIndexEnd]->getExprLoc(); + } + + clang::InitListExpr* init = new (mASTCtxt) clang::InitListExpr( + mASTCtxt, + lparenloc, + llvm::ArrayRef<clang::Expr*>(args + allocArgIndexStart, numAllocations), + rparenloc); + init->setType(AllocArrayTy); + + clang::TypeSourceInfo* ti = mASTCtxt.getTrivialTypeSourceInfo(AllocArrayTy); + clang::CompoundLiteralExpr* CLE = new (mASTCtxt) clang::CompoundLiteralExpr( + lparenloc, + ti, + AllocArrayTy, + clang::VK_LValue, // A compound literal is an l-value in C. + init, + false // Not file scope + ); + + const clang::QualType AllocPtrTy = mASTCtxt.getPointerType(AllocTy); + + clang::ImplicitCastExpr* Decay = clang::ImplicitCastExpr::Create( + mASTCtxt, + AllocPtrTy, + clang::CK_ArrayToPointerDecay, + CLE, + nullptr, // C++ cast path + clang::VK_RValue + ); + + CE->setNumArgs(mASTCtxt, 5); + + CE->setArg(4, Decay); + + // Sets the new arguments for NULL launch option (if the user does not set one), + // the number of outputs, and the number of inputs. + + if (!hasOptions) { + const llvm::APInt APIntZero(IntTySize, 0); + clang::Expr* IntNull = + clang::IntegerLiteral::Create(mASTCtxt, APIntZero, IntTy, Loc); + clang::QualType ScriptCallTy = mCtxt->getScriptCallType(); + const clang::QualType ScriptCallPtrTy = mASTCtxt.getPointerType(ScriptCallTy); + clang::CStyleCastExpr* Cast = + clang::CStyleCastExpr::Create(mASTCtxt, + ScriptCallPtrTy, + clang::VK_RValue, + clang::CK_NullToPointer, + IntNull, + nullptr, + mASTCtxt.getTrivialTypeSourceInfo(ScriptCallPtrTy), + clang::SourceLocation(), + clang::SourceLocation()); + CE->setArg(1, Cast); + } + + const llvm::APInt APIntNumOutput(IntTySize, numOutputsExpected); + clang::Expr* IntNumOutput = + clang::IntegerLiteral::Create(mASTCtxt, APIntNumOutput, IntTy, Loc); + CE->setArg(2, IntNumOutput); + + const llvm::APInt APIntNumInputs(IntTySize, numInputsExpected); + clang::Expr* IntNumInputs = + clang::IntegerLiteral::Create(mASTCtxt, APIntNumInputs, IntTy, Loc); + CE->setArg(3, IntNumInputs); +} + +void RSForEachLowering::VisitStmt(clang::Stmt* S) { + for (clang::Stmt* Child : S->children()) { + if (Child) { + Visit(Child); + } + } +} + +void RSForEachLowering::handleForEachCalls(clang::FunctionDecl* FD, + unsigned int targetAPI) { + slangAssert(FD && FD->hasBody()); + + mInsideKernel = FD->hasAttr<clang::KernelAttr>(); + VisitStmt(FD->getBody()); +} + +} // namespace slang
diff --git a/slang/slang_rs_foreach_lowering.h b/slang/slang_rs_foreach_lowering.h new file mode 100644 index 0000000..42f476d --- /dev/null +++ b/slang/slang_rs_foreach_lowering.h
@@ -0,0 +1,65 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_RS_FOREACH_LOWERING_H +#define _FRAMEWORKS_COMPILE_SLANG_RS_FOREACH_LOWERING_H + +#include "clang/AST/StmtVisitor.h" + +namespace clang { + class ASTContext; + class CallExpr; + class Expr; + class FunctionDecl; +} + +namespace slang { + +class RSContext; + +class RSForEachLowering : public clang::StmtVisitor<RSForEachLowering> { + public: + explicit RSForEachLowering(RSContext* ctxt); + + // Given a FunctionDecl FD and the target API level, either translates all + // rsForEach() and rsForEachWithOptions() calls inside FD into calls to the + // low-level rsForEachInternal() API, if FD is not a kernel function itself; + // or, in the case where FD is a kernel function, reports a compiler error on + // any calls to either kernel launching API function. + void handleForEachCalls(clang::FunctionDecl* FD, unsigned int targetAPI); + + void VisitCallExpr(clang::CallExpr *CE); + void VisitStmt(clang::Stmt *S); + + private: + RSContext* mCtxt; + clang::ASTContext& mASTCtxt; + // A flag, if true, indicating that the visitor is walking inside a kernel + // function, in which case any call to rsForEach() or rsForEachWithOptions() + // is a compiler error. + bool mInsideKernel; + + const clang::FunctionDecl* matchFunctionDesignator(clang::Expr* expr); + const clang::FunctionDecl* matchKernelLaunchCall(clang::CallExpr* CE, + int* slot, + bool* hasOptions); + clang::FunctionDecl* CreateForEachInternalFunctionDecl(); + clang::Expr* CreateCalleeExprForInternalForEach(); +}; // RSForEachLowering + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_RS_FOREACH_LOWERING_H
diff --git a/slang/slang_rs_metadata.h b/slang/slang_rs_metadata.h new file mode 100644 index 0000000..b84a8cd --- /dev/null +++ b/slang/slang_rs_metadata.h
@@ -0,0 +1,38 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_METADATA_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_METADATA_H_ + +// MN stands for "metadata name" +#define RS_EXPORT_VAR_MN "#rs_export_var" +#define RS_EXPORT_VAR_NAME 0 +#define RS_EXPORT_VAR_TYPE 1 + +#define RS_EXPORT_FUNC_MN "#rs_export_func" +#define RS_EXPORT_FUNC_NAME 0 + +#define RS_EXPORT_TYPE_MN "#rs_export_type" + +#define RS_OBJECT_SLOTS_MN "#rs_object_slots" + +#define RS_EXPORT_FOREACH_NAME_MN "#rs_export_foreach_name" + +#define RS_EXPORT_FOREACH_MN "#rs_export_foreach" + +#define RS_EXPORT_REDUCE_MN "#rs_export_reduce" + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_METADATA_H_ NOLINT
diff --git a/slang/slang_rs_object_ref_count.cpp b/slang/slang_rs_object_ref_count.cpp new file mode 100644 index 0000000..22c4acc --- /dev/null +++ b/slang/slang_rs_object_ref_count.cpp
@@ -0,0 +1,1643 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_object_ref_count.h" + +#include <list> + +#include "clang/AST/DeclGroup.h" +#include "clang/AST/Expr.h" +#include "clang/AST/NestedNameSpecifier.h" +#include "clang/AST/OperationKinds.h" +#include "clang/AST/Stmt.h" +#include "clang/AST/StmtVisitor.h" + +#include "slang_assert.h" +#include "slang.h" +#include "slang_rs_ast_replace.h" +#include "slang_rs_export_type.h" + +namespace slang { + +/* Even though those two arrays are of size DataTypeMax, only entries that + * correspond to object types will be set. + */ +clang::FunctionDecl * +RSObjectRefCount::RSSetObjectFD[DataTypeMax]; +clang::FunctionDecl * +RSObjectRefCount::RSClearObjectFD[DataTypeMax]; + +void RSObjectRefCount::GetRSRefCountingFunctions(clang::ASTContext &C) { + for (unsigned i = 0; i < DataTypeMax; i++) { + RSSetObjectFD[i] = nullptr; + RSClearObjectFD[i] = nullptr; + } + + clang::TranslationUnitDecl *TUDecl = C.getTranslationUnitDecl(); + + for (clang::DeclContext::decl_iterator I = TUDecl->decls_begin(), + E = TUDecl->decls_end(); I != E; I++) { + if ((I->getKind() >= clang::Decl::firstFunction) && + (I->getKind() <= clang::Decl::lastFunction)) { + clang::FunctionDecl *FD = static_cast<clang::FunctionDecl*>(*I); + + // points to RSSetObjectFD or RSClearObjectFD + clang::FunctionDecl **RSObjectFD; + + if (FD->getName() == "rsSetObject") { + slangAssert((FD->getNumParams() == 2) && + "Invalid rsSetObject function prototype (# params)"); + RSObjectFD = RSSetObjectFD; + } else if (FD->getName() == "rsClearObject") { + slangAssert((FD->getNumParams() == 1) && + "Invalid rsClearObject function prototype (# params)"); + RSObjectFD = RSClearObjectFD; + } else { + continue; + } + + const clang::ParmVarDecl *PVD = FD->getParamDecl(0); + clang::QualType PVT = PVD->getOriginalType(); + // The first parameter must be a pointer like rs_allocation* + slangAssert(PVT->isPointerType() && + "Invalid rs{Set,Clear}Object function prototype (pointer param)"); + + // The rs object type passed to the FD + clang::QualType RST = PVT->getPointeeType(); + DataType DT = RSExportPrimitiveType::GetRSSpecificType(RST.getTypePtr()); + slangAssert(RSExportPrimitiveType::IsRSObjectType(DT) + && "must be RS object type"); + + if (DT >= 0 && DT < DataTypeMax) { + RSObjectFD[DT] = FD; + } else { + slangAssert(false && "incorrect type"); + } + } + } +} + +namespace { + +unsigned CountRSObjectTypes(const clang::Type *T); + +clang::Stmt *CreateSingleRSSetObject(clang::ASTContext &C, + clang::Expr *DstExpr, + clang::Expr *SrcExpr, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc); + +// This function constructs a new CompoundStmt from the input StmtList. +clang::CompoundStmt* BuildCompoundStmt(clang::ASTContext &C, + std::list<clang::Stmt*> &StmtList, clang::SourceLocation Loc) { + unsigned NewStmtCount = StmtList.size(); + unsigned CompoundStmtCount = 0; + + clang::Stmt **CompoundStmtList; + CompoundStmtList = new clang::Stmt*[NewStmtCount]; + + std::list<clang::Stmt*>::const_iterator I = StmtList.begin(); + std::list<clang::Stmt*>::const_iterator E = StmtList.end(); + for ( ; I != E; I++) { + CompoundStmtList[CompoundStmtCount++] = *I; + } + slangAssert(CompoundStmtCount == NewStmtCount); + + clang::CompoundStmt *CS = new(C) clang::CompoundStmt( + C, llvm::makeArrayRef(CompoundStmtList, CompoundStmtCount), Loc, Loc); + + delete [] CompoundStmtList; + + return CS; +} + +void AppendAfterStmt(clang::ASTContext &C, + clang::CompoundStmt *CS, + clang::Stmt *S, + std::list<clang::Stmt*> &StmtList) { + slangAssert(CS); + clang::CompoundStmt::body_iterator bI = CS->body_begin(); + clang::CompoundStmt::body_iterator bE = CS->body_end(); + clang::Stmt **UpdatedStmtList = + new clang::Stmt*[CS->size() + StmtList.size()]; + + unsigned UpdatedStmtCount = 0; + unsigned Once = 0; + for ( ; bI != bE; bI++) { + if (!S && ((*bI)->getStmtClass() == clang::Stmt::ReturnStmtClass)) { + // If we come across a return here, we don't have anything we can + // reasonably replace. We should have already inserted our destructor + // code in the proper spot, so we just clean up and return. + delete [] UpdatedStmtList; + + return; + } + + UpdatedStmtList[UpdatedStmtCount++] = *bI; + + if ((*bI == S) && !Once) { + Once++; + std::list<clang::Stmt*>::const_iterator I = StmtList.begin(); + std::list<clang::Stmt*>::const_iterator E = StmtList.end(); + for ( ; I != E; I++) { + UpdatedStmtList[UpdatedStmtCount++] = *I; + } + } + } + slangAssert(Once <= 1); + + // When S is nullptr, we are appending to the end of the CompoundStmt. + if (!S) { + slangAssert(Once == 0); + std::list<clang::Stmt*>::const_iterator I = StmtList.begin(); + std::list<clang::Stmt*>::const_iterator E = StmtList.end(); + for ( ; I != E; I++) { + UpdatedStmtList[UpdatedStmtCount++] = *I; + } + } + + CS->setStmts(C, llvm::makeArrayRef(UpdatedStmtList, UpdatedStmtCount)); + + delete [] UpdatedStmtList; +} + +// This class visits a compound statement and collects a list of all the exiting +// statements, such as any return statement in any sub-block, and any +// break/continue statement that would resume outside the current scope. +// We do not handle the case for goto statements that leave a local scope. +class DestructorVisitor : public clang::StmtVisitor<DestructorVisitor> { + private: + // The loop depth of the currently visited node. + int mLoopDepth; + + // The switch statement depth of the currently visited node. + // Note that this is tracked separately from the loop depth because + // SwitchStmt-contained ContinueStmt's should have destructors for the + // corresponding loop scope. + int mSwitchDepth; + + // Output of the visitor: the statements that should be replaced by compound + // statements, each of which contains rsClearObject() calls followed by the + // original statement. + std::vector<clang::Stmt*> mExitingStmts; + + public: + DestructorVisitor() : mLoopDepth(0), mSwitchDepth(0) {} + + const std::vector<clang::Stmt*>& getExitingStmts() const { + return mExitingStmts; + } + + void VisitStmt(clang::Stmt *S); + void VisitBreakStmt(clang::BreakStmt *BS); + void VisitContinueStmt(clang::ContinueStmt *CS); + void VisitDoStmt(clang::DoStmt *DS); + void VisitForStmt(clang::ForStmt *FS); + void VisitReturnStmt(clang::ReturnStmt *RS); + void VisitSwitchStmt(clang::SwitchStmt *SS); + void VisitWhileStmt(clang::WhileStmt *WS); +}; + +void DestructorVisitor::VisitStmt(clang::Stmt *S) { + for (clang::Stmt* Child : S->children()) { + if (Child) { + Visit(Child); + } + } +} + +void DestructorVisitor::VisitBreakStmt(clang::BreakStmt *BS) { + VisitStmt(BS); + if ((mLoopDepth == 0) && (mSwitchDepth == 0)) { + mExitingStmts.push_back(BS); + } +} + +void DestructorVisitor::VisitContinueStmt(clang::ContinueStmt *CS) { + VisitStmt(CS); + if (mLoopDepth == 0) { + // Switch statements can have nested continues. + mExitingStmts.push_back(CS); + } +} + +void DestructorVisitor::VisitDoStmt(clang::DoStmt *DS) { + mLoopDepth++; + VisitStmt(DS); + mLoopDepth--; +} + +void DestructorVisitor::VisitForStmt(clang::ForStmt *FS) { + mLoopDepth++; + VisitStmt(FS); + mLoopDepth--; +} + +void DestructorVisitor::VisitReturnStmt(clang::ReturnStmt *RS) { + mExitingStmts.push_back(RS); +} + +void DestructorVisitor::VisitSwitchStmt(clang::SwitchStmt *SS) { + mSwitchDepth++; + VisitStmt(SS); + mSwitchDepth--; +} + +void DestructorVisitor::VisitWhileStmt(clang::WhileStmt *WS) { + mLoopDepth++; + VisitStmt(WS); + mLoopDepth--; +} + +clang::Expr *ClearSingleRSObject(clang::ASTContext &C, + clang::Expr *RefRSVar, + clang::SourceLocation Loc) { + slangAssert(RefRSVar); + const clang::Type *T = RefRSVar->getType().getTypePtr(); + slangAssert(!T->isArrayType() && + "Should not be destroying arrays with this function"); + + clang::FunctionDecl *ClearObjectFD = RSObjectRefCount::GetRSClearObjectFD(T); + slangAssert((ClearObjectFD != nullptr) && + "rsClearObject doesn't cover all RS object types"); + + clang::QualType ClearObjectFDType = ClearObjectFD->getType(); + clang::QualType ClearObjectFDArgType = + ClearObjectFD->getParamDecl(0)->getOriginalType(); + + // Example destructor for "rs_font localFont;" + // + // (CallExpr 'void' + // (ImplicitCastExpr 'void (*)(rs_font *)' <FunctionToPointerDecay> + // (DeclRefExpr 'void (rs_font *)' FunctionDecl='rsClearObject')) + // (UnaryOperator 'rs_font *' prefix '&' + // (DeclRefExpr 'rs_font':'rs_font' Var='localFont'))) + + // Get address of targeted RS object + clang::Expr *AddrRefRSVar = + new(C) clang::UnaryOperator(RefRSVar, + clang::UO_AddrOf, + ClearObjectFDArgType, + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + clang::Expr *RefRSClearObjectFD = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + ClearObjectFD, + false, + ClearObjectFD->getLocation(), + ClearObjectFDType, + clang::VK_RValue, + nullptr); + + clang::Expr *RSClearObjectFP = + clang::ImplicitCastExpr::Create(C, + C.getPointerType(ClearObjectFDType), + clang::CK_FunctionToPointerDecay, + RefRSClearObjectFD, + nullptr, + clang::VK_RValue); + + llvm::SmallVector<clang::Expr*, 1> ArgList; + ArgList.push_back(AddrRefRSVar); + + clang::CallExpr *RSClearObjectCall = + new(C) clang::CallExpr(C, + RSClearObjectFP, + ArgList, + ClearObjectFD->getCallResultType(), + clang::VK_RValue, + Loc); + + return RSClearObjectCall; +} + +static int ArrayDim(const clang::Type *T) { + if (!T || !T->isArrayType()) { + return 0; + } + + const clang::ConstantArrayType *CAT = + static_cast<const clang::ConstantArrayType *>(T); + return static_cast<int>(CAT->getSize().getSExtValue()); +} + +clang::Stmt *ClearStructRSObject( + clang::ASTContext &C, + clang::DeclContext *DC, + clang::Expr *RefRSStruct, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc); + +clang::Stmt *ClearArrayRSObject( + clang::ASTContext &C, + clang::DeclContext *DC, + clang::Expr *RefRSArr, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc) { + const clang::Type *BaseType = RefRSArr->getType().getTypePtr(); + slangAssert(BaseType->isArrayType()); + + int NumArrayElements = ArrayDim(BaseType); + // Actually extract out the base RS object type for use later + BaseType = BaseType->getArrayElementTypeNoTypeQual(); + + if (NumArrayElements <= 0) { + return nullptr; + } + + // Example destructor loop for "rs_font fontArr[10];" + // + // (ForStmt + // (DeclStmt + // (VarDecl used rsIntIter 'int' cinit + // (IntegerLiteral 'int' 0))) + // (BinaryOperator 'int' '<' + // (ImplicitCastExpr int LValueToRValue + // (DeclRefExpr 'int' Var='rsIntIter')) + // (IntegerLiteral 'int' 10) + // nullptr << CondVar >> + // (UnaryOperator 'int' postfix '++' + // (DeclRefExpr 'int' Var='rsIntIter')) + // (CallExpr 'void' + // (ImplicitCastExpr 'void (*)(rs_font *)' <FunctionToPointerDecay> + // (DeclRefExpr 'void (rs_font *)' FunctionDecl='rsClearObject')) + // (UnaryOperator 'rs_font *' prefix '&' + // (ArraySubscriptExpr 'rs_font':'rs_font' + // (ImplicitCastExpr 'rs_font *' <ArrayToPointerDecay> + // (DeclRefExpr 'rs_font [10]' Var='fontArr')) + // (DeclRefExpr 'int' Var='rsIntIter')))))) + + // Create helper variable for iterating through elements + static unsigned sIterCounter = 0; + std::stringstream UniqueIterName; + UniqueIterName << "rsIntIter" << sIterCounter++; + clang::IdentifierInfo *II = &C.Idents.get(UniqueIterName.str()); + clang::VarDecl *IIVD = + clang::VarDecl::Create(C, + DC, + StartLoc, + Loc, + II, + C.IntTy, + C.getTrivialTypeSourceInfo(C.IntTy), + clang::SC_None); + // Mark "rsIntIter" as used + IIVD->markUsed(C); + + // Form the actual destructor loop + // for (Init; Cond; Inc) + // RSClearObjectCall; + + // Init -> "int rsIntIter = 0" + clang::Expr *Int0 = clang::IntegerLiteral::Create(C, + llvm::APInt(C.getTypeSize(C.IntTy), 0), C.IntTy, Loc); + IIVD->setInit(Int0); + + clang::Decl *IID = (clang::Decl *)IIVD; + clang::DeclGroupRef DGR = clang::DeclGroupRef::Create(C, &IID, 1); + clang::Stmt *Init = new(C) clang::DeclStmt(DGR, Loc, Loc); + + // Cond -> "rsIntIter < NumArrayElements" + clang::DeclRefExpr *RefrsIntIterLValue = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + IIVD, + false, + Loc, + C.IntTy, + clang::VK_LValue, + nullptr); + + clang::Expr *RefrsIntIterRValue = + clang::ImplicitCastExpr::Create(C, + RefrsIntIterLValue->getType(), + clang::CK_LValueToRValue, + RefrsIntIterLValue, + nullptr, + clang::VK_RValue); + + clang::Expr *NumArrayElementsExpr = clang::IntegerLiteral::Create(C, + llvm::APInt(C.getTypeSize(C.IntTy), NumArrayElements), C.IntTy, Loc); + + clang::BinaryOperator *Cond = + new(C) clang::BinaryOperator(RefrsIntIterRValue, + NumArrayElementsExpr, + clang::BO_LT, + C.IntTy, + clang::VK_RValue, + clang::OK_Ordinary, + Loc, + false); + + // Inc -> "rsIntIter++" + clang::UnaryOperator *Inc = + new(C) clang::UnaryOperator(RefrsIntIterLValue, + clang::UO_PostInc, + C.IntTy, + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + // Body -> "rsClearObject(&VD[rsIntIter]);" + // Destructor loop operates on individual array elements + + clang::Expr *RefRSArrPtr = + clang::ImplicitCastExpr::Create(C, + C.getPointerType(BaseType->getCanonicalTypeInternal()), + clang::CK_ArrayToPointerDecay, + RefRSArr, + nullptr, + clang::VK_RValue); + + clang::Expr *RefRSArrPtrSubscript = + new(C) clang::ArraySubscriptExpr(RefRSArrPtr, + RefrsIntIterRValue, + BaseType->getCanonicalTypeInternal(), + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + DataType DT = RSExportPrimitiveType::GetRSSpecificType(BaseType); + + clang::Stmt *RSClearObjectCall = nullptr; + if (BaseType->isArrayType()) { + RSClearObjectCall = + ClearArrayRSObject(C, DC, RefRSArrPtrSubscript, StartLoc, Loc); + } else if (DT == DataTypeUnknown) { + RSClearObjectCall = + ClearStructRSObject(C, DC, RefRSArrPtrSubscript, StartLoc, Loc); + } else { + RSClearObjectCall = ClearSingleRSObject(C, RefRSArrPtrSubscript, Loc); + } + + clang::ForStmt *DestructorLoop = + new(C) clang::ForStmt(C, + Init, + Cond, + nullptr, // no condVar + Inc, + RSClearObjectCall, + Loc, + Loc, + Loc); + + return DestructorLoop; +} + +unsigned CountRSObjectTypes(const clang::Type *T) { + slangAssert(T); + unsigned RSObjectCount = 0; + + if (T->isArrayType()) { + return CountRSObjectTypes(T->getArrayElementTypeNoTypeQual()); + } + + DataType DT = RSExportPrimitiveType::GetRSSpecificType(T); + if (DT != DataTypeUnknown) { + return (RSExportPrimitiveType::IsRSObjectType(DT) ? 1 : 0); + } + + if (T->isUnionType()) { + clang::RecordDecl *RD = T->getAsUnionType()->getDecl(); + RD = RD->getDefinition(); + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++) { + const clang::FieldDecl *FD = *FI; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + if (CountRSObjectTypes(FT)) { + slangAssert(false && "can't have unions with RS object types!"); + return 0; + } + } + } + + if (!T->isStructureType()) { + return 0; + } + + clang::RecordDecl *RD = T->getAsStructureType()->getDecl(); + RD = RD->getDefinition(); + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++) { + const clang::FieldDecl *FD = *FI; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + if (CountRSObjectTypes(FT)) { + // Sub-structs should only count once (as should arrays, etc.) + RSObjectCount++; + } + } + + return RSObjectCount; +} + +clang::Stmt *ClearStructRSObject( + clang::ASTContext &C, + clang::DeclContext *DC, + clang::Expr *RefRSStruct, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc) { + const clang::Type *BaseType = RefRSStruct->getType().getTypePtr(); + + slangAssert(!BaseType->isArrayType()); + + // Structs should show up as unknown primitive types + slangAssert(RSExportPrimitiveType::GetRSSpecificType(BaseType) == + DataTypeUnknown); + + unsigned FieldsToDestroy = CountRSObjectTypes(BaseType); + slangAssert(FieldsToDestroy != 0); + + unsigned StmtCount = 0; + clang::Stmt **StmtArray = new clang::Stmt*[FieldsToDestroy]; + for (unsigned i = 0; i < FieldsToDestroy; i++) { + StmtArray[i] = nullptr; + } + + // Populate StmtArray by creating a destructor for each RS object field + clang::RecordDecl *RD = BaseType->getAsStructureType()->getDecl(); + RD = RD->getDefinition(); + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++) { + // We just look through all field declarations to see if we find a + // declaration for an RS object type (or an array of one). + bool IsArrayType = false; + clang::FieldDecl *FD = *FI; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + const clang::Type *OrigType = FT; + while (FT && FT->isArrayType()) { + FT = FT->getArrayElementTypeNoTypeQual(); + IsArrayType = true; + } + + // Pass a DeclarationNameInfo with a valid DeclName, since name equality + // gets asserted during CodeGen. + clang::DeclarationNameInfo FDDeclNameInfo(FD->getDeclName(), + FD->getLocation()); + + if (RSExportPrimitiveType::IsRSObjectType(FT)) { + clang::DeclAccessPair FoundDecl = + clang::DeclAccessPair::make(FD, clang::AS_none); + clang::MemberExpr *RSObjectMember = + clang::MemberExpr::Create(C, + RefRSStruct, + false, + clang::SourceLocation(), + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + FD, + FoundDecl, + FDDeclNameInfo, + nullptr, + OrigType->getCanonicalTypeInternal(), + clang::VK_RValue, + clang::OK_Ordinary); + + slangAssert(StmtCount < FieldsToDestroy); + + if (IsArrayType) { + StmtArray[StmtCount++] = ClearArrayRSObject(C, + DC, + RSObjectMember, + StartLoc, + Loc); + } else { + StmtArray[StmtCount++] = ClearSingleRSObject(C, + RSObjectMember, + Loc); + } + } else if (FT->isStructureType() && CountRSObjectTypes(FT)) { + // In this case, we have a nested struct. We may not end up filling all + // of the spaces in StmtArray (sub-structs should handle themselves + // with separate compound statements). + clang::DeclAccessPair FoundDecl = + clang::DeclAccessPair::make(FD, clang::AS_none); + clang::MemberExpr *RSObjectMember = + clang::MemberExpr::Create(C, + RefRSStruct, + false, + clang::SourceLocation(), + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + FD, + FoundDecl, + clang::DeclarationNameInfo(), + nullptr, + OrigType->getCanonicalTypeInternal(), + clang::VK_RValue, + clang::OK_Ordinary); + + if (IsArrayType) { + StmtArray[StmtCount++] = ClearArrayRSObject(C, + DC, + RSObjectMember, + StartLoc, + Loc); + } else { + StmtArray[StmtCount++] = ClearStructRSObject(C, + DC, + RSObjectMember, + StartLoc, + Loc); + } + } + } + + slangAssert(StmtCount > 0); + clang::CompoundStmt *CS = new(C) clang::CompoundStmt( + C, llvm::makeArrayRef(StmtArray, StmtCount), Loc, Loc); + + delete [] StmtArray; + + return CS; +} + +clang::Stmt *CreateSingleRSSetObject(clang::ASTContext &C, + clang::Expr *DstExpr, + clang::Expr *SrcExpr, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc) { + const clang::Type *T = DstExpr->getType().getTypePtr(); + clang::FunctionDecl *SetObjectFD = RSObjectRefCount::GetRSSetObjectFD(T); + slangAssert((SetObjectFD != nullptr) && + "rsSetObject doesn't cover all RS object types"); + + clang::QualType SetObjectFDType = SetObjectFD->getType(); + clang::QualType SetObjectFDArgType[2]; + SetObjectFDArgType[0] = SetObjectFD->getParamDecl(0)->getOriginalType(); + SetObjectFDArgType[1] = SetObjectFD->getParamDecl(1)->getOriginalType(); + + clang::Expr *RefRSSetObjectFD = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + SetObjectFD, + false, + Loc, + SetObjectFDType, + clang::VK_RValue, + nullptr); + + clang::Expr *RSSetObjectFP = + clang::ImplicitCastExpr::Create(C, + C.getPointerType(SetObjectFDType), + clang::CK_FunctionToPointerDecay, + RefRSSetObjectFD, + nullptr, + clang::VK_RValue); + + llvm::SmallVector<clang::Expr*, 2> ArgList; + ArgList.push_back(new(C) clang::UnaryOperator(DstExpr, + clang::UO_AddrOf, + SetObjectFDArgType[0], + clang::VK_RValue, + clang::OK_Ordinary, + Loc)); + ArgList.push_back(SrcExpr); + + clang::CallExpr *RSSetObjectCall = + new(C) clang::CallExpr(C, + RSSetObjectFP, + ArgList, + SetObjectFD->getCallResultType(), + clang::VK_RValue, + Loc); + + return RSSetObjectCall; +} + +clang::Stmt *CreateStructRSSetObject(clang::ASTContext &C, + clang::Expr *LHS, + clang::Expr *RHS, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc); + +/*static clang::Stmt *CreateArrayRSSetObject(clang::ASTContext &C, + clang::Expr *DstArr, + clang::Expr *SrcArr, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc) { + clang::DeclContext *DC = nullptr; + const clang::Type *BaseType = DstArr->getType().getTypePtr(); + slangAssert(BaseType->isArrayType()); + + int NumArrayElements = ArrayDim(BaseType); + // Actually extract out the base RS object type for use later + BaseType = BaseType->getArrayElementTypeNoTypeQual(); + + clang::Stmt *StmtArray[2] = {nullptr}; + int StmtCtr = 0; + + if (NumArrayElements <= 0) { + return nullptr; + } + + // Create helper variable for iterating through elements + clang::IdentifierInfo& II = C.Idents.get("rsIntIter"); + clang::VarDecl *IIVD = + clang::VarDecl::Create(C, + DC, + StartLoc, + Loc, + &II, + C.IntTy, + C.getTrivialTypeSourceInfo(C.IntTy), + clang::SC_None, + clang::SC_None); + clang::Decl *IID = (clang::Decl *)IIVD; + + clang::DeclGroupRef DGR = clang::DeclGroupRef::Create(C, &IID, 1); + StmtArray[StmtCtr++] = new(C) clang::DeclStmt(DGR, Loc, Loc); + + // Form the actual loop + // for (Init; Cond; Inc) + // RSSetObjectCall; + + // Init -> "rsIntIter = 0" + clang::DeclRefExpr *RefrsIntIter = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + IIVD, + Loc, + C.IntTy, + clang::VK_RValue, + nullptr); + + clang::Expr *Int0 = clang::IntegerLiteral::Create(C, + llvm::APInt(C.getTypeSize(C.IntTy), 0), C.IntTy, Loc); + + clang::BinaryOperator *Init = + new(C) clang::BinaryOperator(RefrsIntIter, + Int0, + clang::BO_Assign, + C.IntTy, + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + // Cond -> "rsIntIter < NumArrayElements" + clang::Expr *NumArrayElementsExpr = clang::IntegerLiteral::Create(C, + llvm::APInt(C.getTypeSize(C.IntTy), NumArrayElements), C.IntTy, Loc); + + clang::BinaryOperator *Cond = + new(C) clang::BinaryOperator(RefrsIntIter, + NumArrayElementsExpr, + clang::BO_LT, + C.IntTy, + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + // Inc -> "rsIntIter++" + clang::UnaryOperator *Inc = + new(C) clang::UnaryOperator(RefrsIntIter, + clang::UO_PostInc, + C.IntTy, + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + // Body -> "rsSetObject(&Dst[rsIntIter], Src[rsIntIter]);" + // Loop operates on individual array elements + + clang::Expr *DstArrPtr = + clang::ImplicitCastExpr::Create(C, + C.getPointerType(BaseType->getCanonicalTypeInternal()), + clang::CK_ArrayToPointerDecay, + DstArr, + nullptr, + clang::VK_RValue); + + clang::Expr *DstArrPtrSubscript = + new(C) clang::ArraySubscriptExpr(DstArrPtr, + RefrsIntIter, + BaseType->getCanonicalTypeInternal(), + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + clang::Expr *SrcArrPtr = + clang::ImplicitCastExpr::Create(C, + C.getPointerType(BaseType->getCanonicalTypeInternal()), + clang::CK_ArrayToPointerDecay, + SrcArr, + nullptr, + clang::VK_RValue); + + clang::Expr *SrcArrPtrSubscript = + new(C) clang::ArraySubscriptExpr(SrcArrPtr, + RefrsIntIter, + BaseType->getCanonicalTypeInternal(), + clang::VK_RValue, + clang::OK_Ordinary, + Loc); + + DataType DT = RSExportPrimitiveType::GetRSSpecificType(BaseType); + + clang::Stmt *RSSetObjectCall = nullptr; + if (BaseType->isArrayType()) { + RSSetObjectCall = CreateArrayRSSetObject(C, DstArrPtrSubscript, + SrcArrPtrSubscript, + StartLoc, Loc); + } else if (DT == DataTypeUnknown) { + RSSetObjectCall = CreateStructRSSetObject(C, DstArrPtrSubscript, + SrcArrPtrSubscript, + StartLoc, Loc); + } else { + RSSetObjectCall = CreateSingleRSSetObject(C, DstArrPtrSubscript, + SrcArrPtrSubscript, + StartLoc, Loc); + } + + clang::ForStmt *DestructorLoop = + new(C) clang::ForStmt(C, + Init, + Cond, + nullptr, // no condVar + Inc, + RSSetObjectCall, + Loc, + Loc, + Loc); + + StmtArray[StmtCtr++] = DestructorLoop; + slangAssert(StmtCtr == 2); + + clang::CompoundStmt *CS = + new(C) clang::CompoundStmt(C, StmtArray, StmtCtr, Loc, Loc); + + return CS; +} */ + +clang::Stmt *CreateStructRSSetObject(clang::ASTContext &C, + clang::Expr *LHS, + clang::Expr *RHS, + clang::SourceLocation StartLoc, + clang::SourceLocation Loc) { + clang::QualType QT = LHS->getType(); + const clang::Type *T = QT.getTypePtr(); + slangAssert(T->isStructureType()); + slangAssert(!RSExportPrimitiveType::IsRSObjectType(T)); + + // Keep an extra slot for the original copy (memcpy) + unsigned FieldsToSet = CountRSObjectTypes(T) + 1; + + unsigned StmtCount = 0; + clang::Stmt **StmtArray = new clang::Stmt*[FieldsToSet]; + for (unsigned i = 0; i < FieldsToSet; i++) { + StmtArray[i] = nullptr; + } + + clang::RecordDecl *RD = T->getAsStructureType()->getDecl(); + RD = RD->getDefinition(); + for (clang::RecordDecl::field_iterator FI = RD->field_begin(), + FE = RD->field_end(); + FI != FE; + FI++) { + bool IsArrayType = false; + clang::FieldDecl *FD = *FI; + const clang::Type *FT = RSExportType::GetTypeOfDecl(FD); + const clang::Type *OrigType = FT; + + if (!CountRSObjectTypes(FT)) { + // Skip to next if we don't have any viable RS object types + continue; + } + + clang::DeclAccessPair FoundDecl = + clang::DeclAccessPair::make(FD, clang::AS_none); + clang::MemberExpr *DstMember = + clang::MemberExpr::Create(C, + LHS, + false, + clang::SourceLocation(), + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + FD, + FoundDecl, + clang::DeclarationNameInfo(), + nullptr, + OrigType->getCanonicalTypeInternal(), + clang::VK_RValue, + clang::OK_Ordinary); + + clang::MemberExpr *SrcMember = + clang::MemberExpr::Create(C, + RHS, + false, + clang::SourceLocation(), + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + FD, + FoundDecl, + clang::DeclarationNameInfo(), + nullptr, + OrigType->getCanonicalTypeInternal(), + clang::VK_RValue, + clang::OK_Ordinary); + + if (FT->isArrayType()) { + FT = FT->getArrayElementTypeNoTypeQual(); + IsArrayType = true; + } + + DataType DT = RSExportPrimitiveType::GetRSSpecificType(FT); + + if (IsArrayType) { + clang::DiagnosticsEngine &DiagEngine = C.getDiagnostics(); + DiagEngine.Report( + clang::FullSourceLoc(Loc, C.getSourceManager()), + DiagEngine.getCustomDiagID( + clang::DiagnosticsEngine::Error, + "Arrays of RS object types within structures cannot be copied")); + // TODO(srhines): Support setting arrays of RS objects + // StmtArray[StmtCount++] = + // CreateArrayRSSetObject(C, DstMember, SrcMember, StartLoc, Loc); + } else if (DT == DataTypeUnknown) { + StmtArray[StmtCount++] = + CreateStructRSSetObject(C, DstMember, SrcMember, StartLoc, Loc); + } else if (RSExportPrimitiveType::IsRSObjectType(DT)) { + StmtArray[StmtCount++] = + CreateSingleRSSetObject(C, DstMember, SrcMember, StartLoc, Loc); + } else { + slangAssert(false); + } + } + + slangAssert(StmtCount < FieldsToSet); + + // We still need to actually do the overall struct copy. For simplicity, + // we just do a straight-up assignment (which will still preserve all + // the proper RS object reference counts). + clang::BinaryOperator *CopyStruct = + new(C) clang::BinaryOperator(LHS, RHS, clang::BO_Assign, QT, + clang::VK_RValue, clang::OK_Ordinary, Loc, + false); + StmtArray[StmtCount++] = CopyStruct; + + clang::CompoundStmt *CS = new(C) clang::CompoundStmt( + C, llvm::makeArrayRef(StmtArray, StmtCount), Loc, Loc); + + delete [] StmtArray; + + return CS; +} + +} // namespace + +void RSObjectRefCount::Scope::InsertStmt(const clang::ASTContext &C, + clang::Stmt *NewStmt) { + std::vector<clang::Stmt*> newBody; + for (clang::Stmt* S1 : mCS->body()) { + if (S1 == mCurrent) { + newBody.push_back(NewStmt); + } + newBody.push_back(S1); + } + mCS->setStmts(C, newBody); +} + +void RSObjectRefCount::Scope::ReplaceStmt(const clang::ASTContext &C, + clang::Stmt *NewStmt) { + std::vector<clang::Stmt*> newBody; + for (clang::Stmt* S1 : mCS->body()) { + if (S1 == mCurrent) { + newBody.push_back(NewStmt); + } else { + newBody.push_back(S1); + } + } + mCS->setStmts(C, newBody); +} + +void RSObjectRefCount::Scope::ReplaceExpr(const clang::ASTContext& C, + clang::Expr* OldExpr, + clang::Expr* NewExpr) { + RSASTReplace R(C); + R.ReplaceStmt(mCurrent, OldExpr, NewExpr); +} + +void RSObjectRefCount::Scope::ReplaceRSObjectAssignment( + clang::BinaryOperator *AS) { + + clang::QualType QT = AS->getType(); + + clang::ASTContext &C = RSObjectRefCount::GetRSSetObjectFD( + DataTypeRSAllocation)->getASTContext(); + + clang::SourceLocation Loc = AS->getExprLoc(); + clang::SourceLocation StartLoc = AS->getLHS()->getExprLoc(); + clang::Stmt *UpdatedStmt = nullptr; + + if (!RSExportPrimitiveType::IsRSObjectType(QT.getTypePtr())) { + // By definition, this is a struct assignment if we get here + UpdatedStmt = + CreateStructRSSetObject(C, AS->getLHS(), AS->getRHS(), StartLoc, Loc); + } else { + UpdatedStmt = + CreateSingleRSSetObject(C, AS->getLHS(), AS->getRHS(), StartLoc, Loc); + } + + RSASTReplace R(C); + R.ReplaceStmt(mCS, AS, UpdatedStmt); +} + +void RSObjectRefCount::Scope::AppendRSObjectInit( + clang::VarDecl *VD, + clang::DeclStmt *DS, + DataType DT, + clang::Expr *InitExpr) { + slangAssert(VD); + + if (!InitExpr) { + return; + } + + clang::ASTContext &C = RSObjectRefCount::GetRSSetObjectFD( + DataTypeRSAllocation)->getASTContext(); + clang::SourceLocation Loc = RSObjectRefCount::GetRSSetObjectFD( + DataTypeRSAllocation)->getLocation(); + clang::SourceLocation StartLoc = RSObjectRefCount::GetRSSetObjectFD( + DataTypeRSAllocation)->getInnerLocStart(); + + if (DT == DataTypeIsStruct) { + const clang::Type *T = RSExportType::GetTypeOfDecl(VD); + clang::DeclRefExpr *RefRSVar = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + VD, + false, + Loc, + T->getCanonicalTypeInternal(), + clang::VK_RValue, + nullptr); + + clang::Stmt *RSSetObjectOps = + CreateStructRSSetObject(C, RefRSVar, InitExpr, StartLoc, Loc); + + std::list<clang::Stmt*> StmtList; + StmtList.push_back(RSSetObjectOps); + AppendAfterStmt(C, mCS, DS, StmtList); + return; + } + + clang::FunctionDecl *SetObjectFD = RSObjectRefCount::GetRSSetObjectFD(DT); + slangAssert((SetObjectFD != nullptr) && + "rsSetObject doesn't cover all RS object types"); + + clang::QualType SetObjectFDType = SetObjectFD->getType(); + clang::QualType SetObjectFDArgType[2]; + SetObjectFDArgType[0] = SetObjectFD->getParamDecl(0)->getOriginalType(); + SetObjectFDArgType[1] = SetObjectFD->getParamDecl(1)->getOriginalType(); + + clang::Expr *RefRSSetObjectFD = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + SetObjectFD, + false, + Loc, + SetObjectFDType, + clang::VK_RValue, + nullptr); + + clang::Expr *RSSetObjectFP = + clang::ImplicitCastExpr::Create(C, + C.getPointerType(SetObjectFDType), + clang::CK_FunctionToPointerDecay, + RefRSSetObjectFD, + nullptr, + clang::VK_RValue); + + const clang::Type *T = RSExportType::GetTypeOfDecl(VD); + clang::DeclRefExpr *RefRSVar = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + VD, + false, + Loc, + T->getCanonicalTypeInternal(), + clang::VK_RValue, + nullptr); + + llvm::SmallVector<clang::Expr*, 2> ArgList; + ArgList.push_back(new(C) clang::UnaryOperator(RefRSVar, + clang::UO_AddrOf, + SetObjectFDArgType[0], + clang::VK_RValue, + clang::OK_Ordinary, + Loc)); + ArgList.push_back(InitExpr); + + clang::CallExpr *RSSetObjectCall = + new(C) clang::CallExpr(C, + RSSetObjectFP, + ArgList, + SetObjectFD->getCallResultType(), + clang::VK_RValue, + Loc); + + std::list<clang::Stmt*> StmtList; + StmtList.push_back(RSSetObjectCall); + AppendAfterStmt(C, mCS, DS, StmtList); +} + +void RSObjectRefCount::Scope::InsertLocalVarDestructors() { + if (mRSO.empty()) { + return; + } + + clang::DeclContext* DC = mRSO.front()->getDeclContext(); + clang::ASTContext& C = DC->getParentASTContext(); + clang::SourceManager& SM = C.getSourceManager(); + + const auto& OccursBefore = [&SM] (clang::SourceLocation L1, clang::SourceLocation L2)->bool { + return SM.isBeforeInTranslationUnit(L1, L2); + }; + typedef std::map<clang::SourceLocation, clang::Stmt*, decltype(OccursBefore)> DMap; + + DMap dtors(OccursBefore); + + // Create rsClearObject calls. Note the DMap entries are sorted by the SourceLocation. + for (clang::VarDecl* VD : mRSO) { + clang::SourceLocation Loc = VD->getSourceRange().getBegin(); + clang::Stmt* RSClearObjectCall = ClearRSObject(VD, DC); + dtors.insert(std::make_pair(Loc, RSClearObjectCall)); + } + + DestructorVisitor Visitor; + Visitor.Visit(mCS); + + // Replace each exiting statement with a block that contains the original statement + // and added rsClearObject() calls before it. + for (clang::Stmt* S : Visitor.getExitingStmts()) { + + const clang::SourceLocation currentLoc = S->getLocStart(); + + DMap::iterator firstDtorIter = dtors.begin(); + DMap::iterator currentDtorIter = firstDtorIter; + DMap::iterator lastDtorIter = dtors.end(); + + while (currentDtorIter != lastDtorIter && + OccursBefore(currentDtorIter->first, currentLoc)) { + currentDtorIter++; + } + + if (currentDtorIter == firstDtorIter) { + continue; + } + + std::list<clang::Stmt*> Stmts; + + // Insert rsClearObject() calls for all rsObjects declared before the current statement + for(DMap::iterator it = firstDtorIter; it != currentDtorIter; it++) { + Stmts.push_back(it->second); + } + Stmts.push_back(S); + + RSASTReplace R(C); + clang::CompoundStmt* CS = BuildCompoundStmt(C, Stmts, S->getLocEnd()); + R.ReplaceStmt(mCS, S, CS); + } + + std::list<clang::Stmt*> Stmts; + for(auto LocCallPair : dtors) { + Stmts.push_back(LocCallPair.second); + } + AppendAfterStmt(C, mCS, nullptr, Stmts); +} + +clang::Stmt *RSObjectRefCount::Scope::ClearRSObject( + clang::VarDecl *VD, + clang::DeclContext *DC) { + slangAssert(VD); + clang::ASTContext &C = VD->getASTContext(); + clang::SourceLocation Loc = VD->getLocation(); + clang::SourceLocation StartLoc = VD->getInnerLocStart(); + const clang::Type *T = RSExportType::GetTypeOfDecl(VD); + + // Reference expr to target RS object variable + clang::DeclRefExpr *RefRSVar = + clang::DeclRefExpr::Create(C, + clang::NestedNameSpecifierLoc(), + clang::SourceLocation(), + VD, + false, + Loc, + T->getCanonicalTypeInternal(), + clang::VK_RValue, + nullptr); + + if (T->isArrayType()) { + return ClearArrayRSObject(C, DC, RefRSVar, StartLoc, Loc); + } + + DataType DT = RSExportPrimitiveType::GetRSSpecificType(T); + + if (DT == DataTypeUnknown || + DT == DataTypeIsStruct) { + return ClearStructRSObject(C, DC, RefRSVar, StartLoc, Loc); + } + + slangAssert((RSExportPrimitiveType::IsRSObjectType(DT)) && + "Should be RS object"); + + return ClearSingleRSObject(C, RefRSVar, Loc); +} + +bool RSObjectRefCount::InitializeRSObject(clang::VarDecl *VD, + DataType *DT, + clang::Expr **InitExpr) { + slangAssert(VD && DT && InitExpr); + const clang::Type *T = RSExportType::GetTypeOfDecl(VD); + + // Loop through array types to get to base type + while (T && T->isArrayType()) { + T = T->getArrayElementTypeNoTypeQual(); + } + + bool DataTypeIsStructWithRSObject = false; + *DT = RSExportPrimitiveType::GetRSSpecificType(T); + + if (*DT == DataTypeUnknown) { + if (RSExportPrimitiveType::IsStructureTypeWithRSObject(T)) { + *DT = DataTypeIsStruct; + DataTypeIsStructWithRSObject = true; + } else { + return false; + } + } + + bool DataTypeIsRSObject = false; + if (DataTypeIsStructWithRSObject) { + DataTypeIsRSObject = true; + } else { + DataTypeIsRSObject = RSExportPrimitiveType::IsRSObjectType(*DT); + } + *InitExpr = VD->getInit(); + + if (!DataTypeIsRSObject && *InitExpr) { + // If we already have an initializer for a matrix type, we are done. + return DataTypeIsRSObject; + } + + clang::Expr *ZeroInitializer = + CreateEmptyInitListExpr(VD->getASTContext(), VD->getLocation()); + + if (ZeroInitializer) { + ZeroInitializer->setType(T->getCanonicalTypeInternal()); + VD->setInit(ZeroInitializer); + } + + return DataTypeIsRSObject; +} + +clang::Expr *RSObjectRefCount::CreateEmptyInitListExpr( + clang::ASTContext &C, + const clang::SourceLocation &Loc) { + + // We can cheaply construct a zero initializer by just creating an empty + // initializer list. Clang supports this extension to C(99), and will create + // any necessary constructs to zero out the entire variable. + llvm::SmallVector<clang::Expr*, 1> EmptyInitList; + return new(C) clang::InitListExpr(C, Loc, EmptyInitList, Loc); +} + +clang::CompoundStmt* RSObjectRefCount::CreateRetStmtWithTempVar( + clang::ASTContext& C, + clang::DeclContext* DC, + clang::ReturnStmt* RS, + const unsigned id) { + std::list<clang::Stmt*> NewStmts; + // Since we insert rsClearObj() calls before the return statement, we need + // to make sure none of the cleared RS objects are referenced in the + // return statement. + // For that, we create a new local variable named .rs.retval, assign the + // original return expression to it, make all necessary rsClearObj() + // calls, then return .rs.retval. Note rsClearObj() is not called on + // .rs.retval. + + clang::SourceLocation Loc = RS->getLocStart(); + std::stringstream ss; + ss << ".rs.retval" << id; + llvm::StringRef VarName(ss.str()); + + clang::Expr* RetVal = RS->getRetValue(); + const clang::QualType RetTy = RetVal->getType(); + clang::VarDecl* RSRetValDecl = clang::VarDecl::Create( + C, // AST context + DC, // Decl context + Loc, // Start location + Loc, // Id location + &C.Idents.get(VarName), // Id + RetTy, // Type + C.getTrivialTypeSourceInfo(RetTy), // Type info + clang::SC_None // Storage class + ); + const clang::Type *T = RetTy.getTypePtr(); + clang::Expr *ZeroInitializer = + RSObjectRefCount::CreateEmptyInitListExpr(C, Loc); + ZeroInitializer->setType(T->getCanonicalTypeInternal()); + RSRetValDecl->setInit(ZeroInitializer); + RSRetValDecl->markUsed(C); + clang::Decl* Decls[] = { RSRetValDecl }; + const clang::DeclGroupRef DGR = clang::DeclGroupRef::Create( + C, Decls, sizeof(Decls) / sizeof(*Decls)); + clang::DeclStmt* DS = new (C) clang::DeclStmt(DGR, Loc, Loc); + NewStmts.push_back(DS); + + clang::DeclRefExpr* DRE = clang::DeclRefExpr::Create( + C, + clang::NestedNameSpecifierLoc(), // QualifierLoc + Loc, // TemplateKWLoc + RSRetValDecl, + false, // RefersToEnclosingVariableOrCapture + Loc, // NameLoc + RetTy, + clang::VK_LValue + ); + clang::Stmt* SetRetTempVar = CreateSingleRSSetObject(C, DRE, RetVal, Loc, Loc); + NewStmts.push_back(SetRetTempVar); + + // Creates a new return statement + clang::ReturnStmt* NewRet = new (C) clang::ReturnStmt(RS->getReturnLoc()); + clang::Expr* CastExpr = clang::ImplicitCastExpr::Create( + C, + RetTy, + clang::CK_LValueToRValue, + DRE, + nullptr, + clang::VK_RValue + ); + NewRet->setRetValue(CastExpr); + NewStmts.push_back(NewRet); + + return BuildCompoundStmt(C, NewStmts, Loc); +} + +void RSObjectRefCount::VisitDeclStmt(clang::DeclStmt *DS) { + VisitStmt(DS); + getCurrentScope()->setCurrentStmt(DS); + for (clang::DeclStmt::decl_iterator I = DS->decl_begin(), E = DS->decl_end(); + I != E; + I++) { + clang::Decl *D = *I; + if (D->getKind() == clang::Decl::Var) { + clang::VarDecl *VD = static_cast<clang::VarDecl*>(D); + DataType DT = DataTypeUnknown; + clang::Expr *InitExpr = nullptr; + if (InitializeRSObject(VD, &DT, &InitExpr)) { + // We need to zero-init all RS object types (including matrices), ... + getCurrentScope()->AppendRSObjectInit(VD, DS, DT, InitExpr); + // ... but, only add to the list of RS objects if we have some + // non-matrix RS object fields. + if (CountRSObjectTypes(VD->getType().getTypePtr())) { + getCurrentScope()->addRSObject(VD); + } + } + } + } +} + +void RSObjectRefCount::VisitCallExpr(clang::CallExpr* CE) { + clang::QualType RetTy; + const clang::FunctionDecl* FD = CE->getDirectCallee(); + + if (FD) { + // Direct calls + + RetTy = FD->getReturnType(); + } else { + // Indirect calls through function pointers + + const clang::Expr* Callee = CE->getCallee(); + const clang::Type* CalleeType = Callee->getType().getTypePtr(); + const clang::PointerType* PtrType = CalleeType->getAs<clang::PointerType>(); + + if (!PtrType) { + return; + } + + const clang::Type* PointeeType = PtrType->getPointeeType().getTypePtr(); + const clang::FunctionType* FuncType = PointeeType->getAs<clang::FunctionType>(); + + if (!FuncType) { + return; + } + + RetTy = FuncType->getReturnType(); + } + + if (CountRSObjectTypes(RetTy.getTypePtr())==0) { + return; + } + + clang::SourceLocation Loc = CE->getSourceRange().getBegin(); + std::stringstream ss; + ss << ".rs.tmp" << getNextID(); + llvm::StringRef VarName(ss.str()); + + clang::VarDecl* TempVarDecl = clang::VarDecl::Create( + mCtx, // AST context + GetDeclContext(), // Decl context + Loc, // Start location + Loc, // Id location + &mCtx.Idents.get(VarName), // Id + RetTy, // Type + mCtx.getTrivialTypeSourceInfo(RetTy), // Type info + clang::SC_None // Storage class + ); + TempVarDecl->setInit(CE); + TempVarDecl->markUsed(mCtx); + clang::Decl* Decls[] = { TempVarDecl }; + const clang::DeclGroupRef DGR = clang::DeclGroupRef::Create( + mCtx, Decls, sizeof(Decls) / sizeof(*Decls)); + clang::DeclStmt* DS = new (mCtx) clang::DeclStmt(DGR, Loc, Loc); + + getCurrentScope()->InsertStmt(mCtx, DS); + + clang::DeclRefExpr* DRE = clang::DeclRefExpr::Create( + mCtx, // AST context + clang::NestedNameSpecifierLoc(), // QualifierLoc + Loc, // TemplateKWLoc + TempVarDecl, + false, // RefersToEnclosingVariableOrCapture + Loc, // NameLoc + RetTy, + clang::VK_LValue + ); + clang::Expr* CastExpr = clang::ImplicitCastExpr::Create( + mCtx, + RetTy, + clang::CK_LValueToRValue, + DRE, + nullptr, + clang::VK_RValue + ); + + getCurrentScope()->ReplaceExpr(mCtx, CE, CastExpr); + + // Register TempVarDecl for destruction call (rsClearObj). + getCurrentScope()->addRSObject(TempVarDecl); +} + +void RSObjectRefCount::VisitCompoundStmt(clang::CompoundStmt *CS) { + if (!emptyScope()) { + getCurrentScope()->setCurrentStmt(CS); + } + + if (!CS->body_empty()) { + // Push a new scope + Scope *S = new Scope(CS); + mScopeStack.push_back(S); + + VisitStmt(CS); + + // Destroy the scope + slangAssert((getCurrentScope() == S) && "Corrupted scope stack!"); + S->InsertLocalVarDestructors(); + mScopeStack.pop_back(); + delete S; + } +} + +void RSObjectRefCount::VisitBinAssign(clang::BinaryOperator *AS) { + getCurrentScope()->setCurrentStmt(AS); + clang::QualType QT = AS->getType(); + + if (CountRSObjectTypes(QT.getTypePtr())) { + getCurrentScope()->ReplaceRSObjectAssignment(AS); + } +} + +void RSObjectRefCount::VisitReturnStmt(clang::ReturnStmt *RS) { + getCurrentScope()->setCurrentStmt(RS); + + // If there is no local rsObject declared so far, no need to transform the + // return statement. + + bool RSObjDeclared = false; + + for (const Scope* S : mScopeStack) { + if (S->hasRSObject()) { + RSObjDeclared = true; + break; + } + } + + if (!RSObjDeclared) { + return; + } + + // If the return statement does not return anything, or if it does not return + // a rsObject, no need to transform it. + + clang::Expr* RetVal = RS->getRetValue(); + if (!RetVal || CountRSObjectTypes(RetVal->getType().getTypePtr()) == 0) { + return; + } + + // Transform the return statement so that it does not potentially return or + // reference a rsObject that has been cleared. + + clang::CompoundStmt* NewRS; + NewRS = CreateRetStmtWithTempVar(mCtx, GetDeclContext(), RS, getNextID()); + + getCurrentScope()->ReplaceStmt(mCtx, NewRS); +} + +void RSObjectRefCount::VisitStmt(clang::Stmt *S) { + getCurrentScope()->setCurrentStmt(S); + for (clang::Stmt::child_iterator I = S->child_begin(), E = S->child_end(); + I != E; + I++) { + if (clang::Stmt *Child = *I) { + Visit(Child); + } + } +} + +// This function walks the list of global variables and (potentially) creates +// a single global static destructor function that properly decrements +// reference counts on the contained RS object types. +clang::FunctionDecl *RSObjectRefCount::CreateStaticGlobalDtor() { + Init(); + + clang::DeclContext *DC = mCtx.getTranslationUnitDecl(); + clang::SourceLocation loc; + + llvm::StringRef SR(".rs.dtor"); + clang::IdentifierInfo &II = mCtx.Idents.get(SR); + clang::DeclarationName N(&II); + clang::FunctionProtoType::ExtProtoInfo EPI; + clang::QualType T = mCtx.getFunctionType(mCtx.VoidTy, + llvm::ArrayRef<clang::QualType>(), EPI); + clang::FunctionDecl *FD = nullptr; + + // Generate rsClearObject() call chains for every global variable + // (whether static or extern). + std::list<clang::Stmt *> StmtList; + for (clang::DeclContext::decl_iterator I = DC->decls_begin(), + E = DC->decls_end(); I != E; I++) { + clang::VarDecl *VD = llvm::dyn_cast<clang::VarDecl>(*I); + if (VD) { + if (CountRSObjectTypes(VD->getType().getTypePtr())) { + if (!FD) { + // Only create FD if we are going to use it. + FD = clang::FunctionDecl::Create(mCtx, DC, loc, loc, N, T, nullptr, + clang::SC_None); + } + // Mark VD as used. It might be unused, except for the destructor. + // 'markUsed' has side-effects that are caused only if VD is not already + // used. Hence no need for an extra check here. + VD->markUsed(mCtx); + // Make sure to create any helpers within the function's DeclContext, + // not the one associated with the global translation unit. + clang::Stmt *RSClearObjectCall = Scope::ClearRSObject(VD, FD); + StmtList.push_back(RSClearObjectCall); + } + } + } + + // Nothing needs to be destroyed, so don't emit a dtor. + if (StmtList.empty()) { + return nullptr; + } + + clang::CompoundStmt *CS = BuildCompoundStmt(mCtx, StmtList, loc); + + FD->setBody(CS); + + return FD; +} + +bool HasRSObjectType(const clang::Type *T) { + return CountRSObjectTypes(T) != 0; +} + +} // namespace slang
diff --git a/slang/slang_rs_object_ref_count.h b/slang/slang_rs_object_ref_count.h new file mode 100644 index 0000000..5de60d1 --- /dev/null +++ b/slang/slang_rs_object_ref_count.h
@@ -0,0 +1,213 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_OBJECT_REF_COUNT_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_OBJECT_REF_COUNT_H_ + +#include <list> +#include <stack> + +#include "clang/AST/StmtVisitor.h" + +#include "slang_assert.h" +#include "slang_rs_export_type.h" + +namespace clang { + class Expr; + class Stmt; +} + +namespace slang { + +// Recursive check +bool HasRSObjectType(const clang::Type *T); + +// This class provides the overall reference counting mechanism for handling +// local variables of RS object types (rs_font, rs_allocation, ...). This +// class ensures that appropriate functions (rsSetObject, rsClearObject) are +// called at proper points in the object's lifetime. +// 1) Each local object of appropriate type must be zero-initialized to +// prevent corruption during subsequent rsSetObject()/rsClearObject() calls. +// 2) Assignments using these types must also be converted into the +// appropriate (possibly a series of) rsSetObject() calls. +// 3) Finally, rsClearObject() must be called for each local object when it goes +// out of scope. +class RSObjectRefCount : public clang::StmtVisitor<RSObjectRefCount> { + private: + class Scope { + private: + clang::CompoundStmt *mCS; // Associated compound statement ({ ... }) + clang::Stmt *mCurrent; // The statement currently being analyzed + std::list<clang::VarDecl*> mRSO; // Declared RS objects in this scope (but + // not any scopes nested) + + public: + explicit Scope(clang::CompoundStmt *CS) : mCS(CS) { + } + + bool hasRSObject() const { return !mRSO.empty(); } + + inline void addRSObject(clang::VarDecl* VD) { + mRSO.push_back(VD); + } + + void ReplaceRSObjectAssignment(clang::BinaryOperator *AS); + + void AppendRSObjectInit(clang::VarDecl *VD, + clang::DeclStmt *DS, + DataType DT, + clang::Expr *InitExpr); + + // Inserts rsClearObject() calls at the end and at all exiting points of the + // current scope. At each statement that exits the current scope -- e.g., + // a return, break, or continue statement in the current or a nested scope + // -- rsClearObject() calls are inserted for local variables defined in the + // current scope before that point. + // Note goto statements are not handled. (See the DestructorVisitor class in + // the .cpp file.) + // Also note this function is called for every nested scope. As a result, for a + // return statement, each rsObject declared in all its (nested) enclosing + // scopes would have a rsClearObject() call properly inserted before + // the return statement. + void InsertLocalVarDestructors(); + + // Sets the current statement being analyzed + void setCurrentStmt(clang::Stmt *S) { mCurrent = S; } + + // Inserts a statement before the current statement + void InsertStmt(const clang::ASTContext &C, clang::Stmt *NewStmt); + + // Replaces the current statement with NewStmt; + void ReplaceStmt(const clang::ASTContext &C, clang::Stmt *NewStmt); + + // Replaces OldExpr with NewExpr in the current statement + void ReplaceExpr(const clang::ASTContext& C, clang::Expr* OldExpr, + clang::Expr* NewExpr); + + static clang::Stmt *ClearRSObject(clang::VarDecl *VD, + clang::DeclContext *DC); + }; + + clang::ASTContext &mCtx; + std::deque<Scope*> mScopeStack; // A deque used as a stack to store scopes, but also + // accessed through its iterator in read-only mode. + clang::DeclContext* mCurrentDC; + bool RSInitFD; + unsigned mTempID; // A unique id that can be used to distinguish temporary variables + + // RSSetObjectFD and RSClearObjectFD holds FunctionDecl of rsSetObject() + // and rsClearObject() in the current ASTContext. + static clang::FunctionDecl *RSSetObjectFD[]; + static clang::FunctionDecl *RSClearObjectFD[]; + + inline bool emptyScope() const { return mScopeStack.empty(); } + + inline Scope *getCurrentScope() { + return mScopeStack.back(); + } + + // Returns the next available unique id for temporary variables + unsigned getNextID() { return mTempID++; } + + // Initialize RSSetObjectFD and RSClearObjectFD. + static void GetRSRefCountingFunctions(clang::ASTContext &C); + + // Return false if the type of variable declared in VD does not contain + // an RS object type. + static bool InitializeRSObject(clang::VarDecl *VD, + DataType *DT, + clang::Expr **InitExpr); + + // Return an empty list initializer expression at the appropriate location. + // This construct can then be used to cheaply construct a zero-initializer + // for any RenderScript objects (like rs_allocation) or rs_matrix* types + // (possibly even embedded within other types). These types are expected to + // be zero-initialized always, and so we can use this helper to ensure that + // they at least have an empty initializer. + static clang::Expr *CreateEmptyInitListExpr( + clang::ASTContext &C, + const clang::SourceLocation &Loc); + + // Given a return statement RS that returns an rsObject, creates a temporary + // variable, and sets it to the original return expression using rsSetObject(). + // Creates a new return statement that returns the temporary variable. + // Returns a new compound statement that contains the new variable declaration, + // the rsSetOjbect() call, and the new return statement. + static clang::CompoundStmt* CreateRetStmtWithTempVar( + clang::ASTContext& C, + clang::DeclContext* DC, + clang::ReturnStmt* RS, + const unsigned id); + + public: + explicit RSObjectRefCount(clang::ASTContext &C) + : mCtx(C), RSInitFD(false), mTempID(0) { + } + + void Init() { + if (!RSInitFD) { + GetRSRefCountingFunctions(mCtx); + RSInitFD = true; + } + } + + static clang::FunctionDecl *GetRSSetObjectFD(DataType DT) { + slangAssert(RSExportPrimitiveType::IsRSObjectType(DT)); + if (DT >= 0 && DT < DataTypeMax) { + return RSSetObjectFD[DT]; + } else { + slangAssert(false && "incorrect type"); + return nullptr; + } + } + + static clang::FunctionDecl *GetRSSetObjectFD(const clang::Type *T) { + return GetRSSetObjectFD(RSExportPrimitiveType::GetRSSpecificType(T)); + } + + static clang::FunctionDecl *GetRSClearObjectFD(DataType DT) { + slangAssert(RSExportPrimitiveType::IsRSObjectType(DT)); + if (DT >= 0 && DT < DataTypeMax) { + return RSClearObjectFD[DT]; + } else { + slangAssert(false && "incorrect type"); + return nullptr; + } + } + + static clang::FunctionDecl *GetRSClearObjectFD(const clang::Type *T) { + return GetRSClearObjectFD(RSExportPrimitiveType::GetRSSpecificType(T)); + } + + void SetDeclContext(clang::DeclContext* DC) { mCurrentDC = DC; } + clang::DeclContext* GetDeclContext() const { return mCurrentDC; } + + void VisitStmt(clang::Stmt *S); + void VisitCallExpr(clang::CallExpr *CE); + void VisitDeclStmt(clang::DeclStmt *DS); + void VisitCompoundStmt(clang::CompoundStmt *CS); + void VisitBinAssign(clang::BinaryOperator *AS); + void VisitReturnStmt(clang::ReturnStmt *RS); + // We believe that RS objects are never involved in CompoundAssignOperator. + // I.e., rs_allocation foo; foo += bar; + + // Emit a global destructor to clean up RS objects. + clang::FunctionDecl *CreateStaticGlobalDtor(); +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_OBJECT_REF_COUNT_H_ NOLINT
diff --git a/slang/slang_rs_pragma_handler.cpp b/slang/slang_rs_pragma_handler.cpp new file mode 100644 index 0000000..de9ba92 --- /dev/null +++ b/slang/slang_rs_pragma_handler.cpp
@@ -0,0 +1,592 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_pragma_handler.h" + +#include <map> +#include <sstream> +#include <string> + +#include "clang/AST/ASTContext.h" + +#include "clang/Basic/TokenKinds.h" + +#include "clang/Lex/LiteralSupport.h" +#include "clang/Lex/Preprocessor.h" +#include "clang/Lex/Token.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "slang_rs_export_reduce.h" +#include "slang_version.h" + +namespace slang { + +namespace { // Anonymous namespace + +class RSExportTypePragmaHandler : public RSPragmaHandler { + private: + void handleItem(const std::string &Item) { + mContext->addPragma(this->getName(), Item); + mContext->addExportType(Item); + } + + public: + RSExportTypePragmaHandler(llvm::StringRef Name, RSContext *Context) + : RSPragmaHandler(Name, Context) { } + + void HandlePragma(clang::Preprocessor &PP, + clang::PragmaIntroducerKind Introducer, + clang::Token &FirstToken) { + this->handleItemListPragma(PP, FirstToken); + } +}; + +class RSJavaPackageNamePragmaHandler : public RSPragmaHandler { + public: + RSJavaPackageNamePragmaHandler(llvm::StringRef Name, RSContext *Context) + : RSPragmaHandler(Name, Context) { } + + void HandlePragma(clang::Preprocessor &PP, + clang::PragmaIntroducerKind Introducer, + clang::Token &FirstToken) { + // FIXME: Need to validate the extracted package name from pragma. + // Currently "all chars" specified in pragma will be treated as package + // name. + // + // 18.1 The Grammar of the Java Programming Language + // (http://java.sun.com/docs/books/jls/third_edition/html/syntax.html#18.1) + // + // CompilationUnit: + // [[Annotations] package QualifiedIdentifier ; ] {ImportDeclaration} + // {TypeDeclaration} + // + // QualifiedIdentifier: + // Identifier { . Identifier } + // + // Identifier: + // IDENTIFIER + // + // 3.8 Identifiers + // (http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.8) + // + // + + clang::Token &PragmaToken = FirstToken; + std::string PackageName; + + // Skip first token, "java_package_name" + PP.LexUnexpandedToken(PragmaToken); + + // Now, the current token must be clang::tok::lpara + if (PragmaToken.isNot(clang::tok::l_paren)) + return; + + while (PragmaToken.isNot(clang::tok::eod)) { + // Lex package name + PP.LexUnexpandedToken(PragmaToken); + + bool Invalid; + std::string Spelling = PP.getSpelling(PragmaToken, &Invalid); + if (!Invalid) + PackageName.append(Spelling); + + // Pre-mature end (syntax error will be triggered by preprocessor later) + if (PragmaToken.is(clang::tok::eod) || PragmaToken.is(clang::tok::eof)) { + break; + } else { + // Next token is ')' (end of pragma) + const clang::Token &NextTok = PP.LookAhead(0); + if (NextTok.is(clang::tok::r_paren)) { + mContext->addPragma(this->getName(), PackageName); + mContext->setReflectJavaPackageName(PackageName); + // Lex until meets clang::tok::eod + do { + PP.LexUnexpandedToken(PragmaToken); + } while (PragmaToken.isNot(clang::tok::eod)); + break; + } + } + } + } +}; + +class RSReducePragmaHandler : public RSPragmaHandler { + public: + RSReducePragmaHandler(llvm::StringRef Name, RSContext *Context) + : RSPragmaHandler(Name, Context) { } + + void HandlePragma(clang::Preprocessor &PP, + clang::PragmaIntroducerKind Introducer, + clang::Token &FirstToken) override { + // #pragma rs reduce(name) + // initializer(initializename) + // accumulator(accumulatename) + // combiner(combinename) + // outconverter(outconvertname) + // halter(haltname) + + const clang::SourceLocation PragmaLocation = FirstToken.getLocation(); + + clang::Token &PragmaToken = FirstToken; + + // Grab "reduce(name)" ("reduce" is already known to be the first + // token) and all the "keyword(value)" contributions + KeywordValueMapType KeywordValueMap({std::make_pair(RSExportReduce::KeyReduce, ""), + std::make_pair(RSExportReduce::KeyInitializer, ""), + std::make_pair(RSExportReduce::KeyAccumulator, ""), + std::make_pair(RSExportReduce::KeyCombiner, ""), + std::make_pair(RSExportReduce::KeyOutConverter, "")}); + if (mContext->getTargetAPI() >= SLANG_FEATURE_GENERAL_REDUCTION_HALTER_API) { + // Halter functionality has not been released, nor has its + // specification been finalized with partners. We do not have a + // specification that extends through the full RenderScript + // software stack, either. + KeywordValueMap.insert(std::make_pair(RSExportReduce::KeyHalter, "")); + } + while (PragmaToken.is(clang::tok::identifier)) { + if (!ProcessKeywordAndValue(PP, PragmaToken, KeywordValueMap)) + return; + } + + // Make sure there's no end-of-line garbage + if (PragmaToken.isNot(clang::tok::eod)) { + PP.Diag(PragmaToken.getLocation(), + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "did not expect '%0' here for '#pragma rs %1'")) + << PP.getSpelling(PragmaToken) << getName(); + return; + } + + // Make sure we have an accumulator + if (KeywordValueMap[RSExportReduce::KeyAccumulator].empty()) { + PP.Diag(PragmaLocation, PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "missing '%0' for '#pragma rs %1'")) + << RSExportReduce::KeyAccumulator << getName(); + return; + } + + // Make sure the reduction kernel name is unique. (If we were + // worried there might be a VERY large number of pragmas, then we + // could do something more efficient than walking a list to search + // for duplicates.) + for (auto I = mContext->export_reduce_begin(), + E = mContext->export_reduce_end(); + I != E; ++I) { + if ((*I)->getNameReduce() == KeywordValueMap[RSExportReduce::KeyReduce]) { + PP.Diag(PragmaLocation, PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "reduction kernel '%0' declared multiple " + "times (first one is at %1)")) + << KeywordValueMap[RSExportReduce::KeyReduce] + << (*I)->getLocation().printToString(PP.getSourceManager()); + return; + } + } + + // Check API version. + if (mContext->getTargetAPI() < SLANG_FEATURE_GENERAL_REDUCTION_API) { + PP.Diag(PragmaLocation, + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "reduction kernels are not supported in SDK levels %0-%1")) + << SLANG_MINIMUM_TARGET_API + << (SLANG_FEATURE_GENERAL_REDUCTION_API - 1); + return; + } + + // Handle backward reference from pragma (see Backend::HandleTopLevelDecl for forward reference). + MarkUsed(PP, KeywordValueMap[RSExportReduce::KeyInitializer]); + MarkUsed(PP, KeywordValueMap[RSExportReduce::KeyAccumulator]); + MarkUsed(PP, KeywordValueMap[RSExportReduce::KeyCombiner]); + MarkUsed(PP, KeywordValueMap[RSExportReduce::KeyOutConverter]); + MarkUsed(PP, KeywordValueMap[RSExportReduce::KeyHalter]); + + mContext->addExportReduce(RSExportReduce::Create(mContext, PragmaLocation, + KeywordValueMap[RSExportReduce::KeyReduce], + KeywordValueMap[RSExportReduce::KeyInitializer], + KeywordValueMap[RSExportReduce::KeyAccumulator], + KeywordValueMap[RSExportReduce::KeyCombiner], + KeywordValueMap[RSExportReduce::KeyOutConverter], + KeywordValueMap[RSExportReduce::KeyHalter])); + } + + private: + typedef std::map<std::string, std::string> KeywordValueMapType; + + void MarkUsed(clang::Preprocessor &PP, const std::string &FunctionName) { + if (FunctionName.empty()) + return; + + clang::ASTContext &ASTC = mContext->getASTContext(); + clang::TranslationUnitDecl *TUDecl = ASTC.getTranslationUnitDecl(); + slangAssert(TUDecl); + if (const clang::IdentifierInfo *II = PP.getIdentifierInfo(FunctionName)) { + for (auto Decl : TUDecl->lookup(II)) { + clang::FunctionDecl *FDecl = Decl->getAsFunction(); + if (!FDecl || !FDecl->isThisDeclarationADefinition()) + continue; + // Handle backward reference from pragma (see + // Backend::HandleTopLevelDecl for forward reference). + mContext->markUsedByReducePragma(FDecl, RSContext::CheckNameNo); + } + } + } + + // Return comma-separated list of all keys in the map + static std::string ListKeywords(const KeywordValueMapType &KeywordValueMap) { + std::string Ret; + bool First = true; + for (auto const &entry : KeywordValueMap) { + if (First) + First = false; + else + Ret += ", "; + Ret += "'"; + Ret += entry.first; + Ret += "'"; + } + return Ret; + } + + // Parse "keyword(value)" and set KeywordValueMap[keyword] = value. (Both + // "keyword" and "value" are identifiers.) + // Does both syntactic validation and the following semantic validation: + // - The keyword must be present in the map. + // - The map entry for the keyword must not contain a value. + bool ProcessKeywordAndValue(clang::Preprocessor &PP, + clang::Token &PragmaToken, + KeywordValueMapType &KeywordValueMap) { + // The current token must be an identifier in KeywordValueMap + KeywordValueMapType::iterator Entry; + if (PragmaToken.isNot(clang::tok::identifier) || + ((Entry = KeywordValueMap.find( + PragmaToken.getIdentifierInfo()->getName())) == + KeywordValueMap.end())) { + // Note that we should never get here for the "reduce" token + // itself, which should already have been recognized. + PP.Diag(PragmaToken.getLocation(), + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "did not recognize '%0' for '#pragma %1'; expected one of " + "the following keywords: %2")) + << PragmaToken.getIdentifierInfo()->getName() << getName() + << ListKeywords(KeywordValueMap); + return false; + } + // ... and there must be no value for this keyword yet + if (!Entry->second.empty()) { + PP.Diag(PragmaToken.getLocation(), + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "more than one '%0' for '#pragma rs %1'")) + << Entry->first << getName(); + return false; + } + PP.LexUnexpandedToken(PragmaToken); + + // The current token must be clang::tok::l_paren + if (PragmaToken.isNot(clang::tok::l_paren)) { + PP.Diag(PragmaToken.getLocation(), + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "missing '(' after '%0' for '#pragma rs %1'")) + << Entry->first << getName(); + return false; + } + PP.LexUnexpandedToken(PragmaToken); + + // The current token must be an identifier (a name) + if (PragmaToken.isNot(clang::tok::identifier)) { + PP.Diag(PragmaToken.getLocation(), + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "missing name after '%0(' for '#pragma rs %1'")) + << Entry->first << getName(); + return false; + } + const std::string Name = PragmaToken.getIdentifierInfo()->getName(); + PP.LexUnexpandedToken(PragmaToken); + + // The current token must be clang::tok::r_paren + if (PragmaToken.isNot(clang::tok::r_paren)) { + PP.Diag(PragmaToken.getLocation(), + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "missing ')' after '%0(%1' for '#pragma rs %2'")) + << Entry->first << Name << getName(); + return false; + } + PP.LexUnexpandedToken(PragmaToken); + + // Success + Entry->second = Name; + return true; + } +}; + +class RSReflectLicensePragmaHandler : public RSPragmaHandler { + private: + void handleItem(const std::string &Item) { + mContext->addPragma(this->getName(), Item); + mContext->setLicenseNote(Item); + } + + public: + RSReflectLicensePragmaHandler(llvm::StringRef Name, RSContext *Context) + : RSPragmaHandler(Name, Context) { } + + void HandlePragma(clang::Preprocessor &PP, + clang::PragmaIntroducerKind Introducer, + clang::Token &FirstToken) { + this->handleOptionalStringLiteralParamPragma(PP, FirstToken); + } +}; + +class RSVersionPragmaHandler : public RSPragmaHandler { + private: + void handleInt(clang::Preprocessor &PP, + clang::Token &Tok, + const int v) { + if (v != 1) { + PP.Diag(Tok, + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "pragma for version in source file must be set to 1")); + mContext->setVersion(1); + return; + } + std::stringstream ss; + ss << v; + mContext->addPragma(this->getName(), ss.str()); + mContext->setVersion(v); + } + + public: + RSVersionPragmaHandler(llvm::StringRef Name, RSContext *Context) + : RSPragmaHandler(Name, Context) { } + + void HandlePragma(clang::Preprocessor &PP, + clang::PragmaIntroducerKind Introducer, + clang::Token &FirstToken) { + this->handleIntegerParamPragma(PP, FirstToken); + } +}; + +// Handles the pragmas rs_fp_full, rs_fp_relaxed, and rs_fp_imprecise. +// There's one instance of this handler for each of the above values. +// Only getName() differs between the instances. +class RSPrecisionPragmaHandler : public RSPragmaHandler { +public: + RSPrecisionPragmaHandler(llvm::StringRef Name, RSContext *Context) + : RSPragmaHandler(Name, Context) {} + + void HandlePragma(clang::Preprocessor &PP, + clang::PragmaIntroducerKind Introducer, + clang::Token &Token) { + std::string Precision = getName(); + // We are deprecating rs_fp_imprecise. + if (Precision == "rs_fp_imprecise") { + PP.Diag(Token, PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Warning, + "rs_fp_imprecise is deprecated. Assuming " + "rs_fp_relaxed instead.")); + Precision = "rs_fp_relaxed"; + } + // Check if we have already encountered a precision pragma already. + std::string PreviousPrecision = mContext->getPrecision(); + if (!PreviousPrecision.empty()) { + // If the previous specified a different value, it's an error. + if (PreviousPrecision != Precision) { + PP.Diag(Token, PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "Multiple float precisions specified. Encountered " + "%0 previously.")) + << PreviousPrecision; + } + // Otherwise we ignore redundant entries. + return; + } + + mContext->addPragma(Precision, ""); + mContext->setPrecision(Precision); + } +}; + +} // namespace + +void RSPragmaHandler::handleItemListPragma(clang::Preprocessor &PP, + clang::Token &FirstToken) { + clang::Token &PragmaToken = FirstToken; + + // Skip first token, like "export_var" + PP.LexUnexpandedToken(PragmaToken); + + // Now, the current token must be clang::tok::lpara + if (PragmaToken.isNot(clang::tok::l_paren)) + return; + + while (PragmaToken.isNot(clang::tok::eod)) { + // Lex variable name + PP.LexUnexpandedToken(PragmaToken); + if (PragmaToken.is(clang::tok::identifier)) + this->handleItem(PP.getSpelling(PragmaToken)); + else + break; + + slangAssert(PragmaToken.isNot(clang::tok::eod)); + + PP.LexUnexpandedToken(PragmaToken); + + if (PragmaToken.isNot(clang::tok::comma)) + break; + } +} + +void RSPragmaHandler::handleNonParamPragma(clang::Preprocessor &PP, + clang::Token &FirstToken) { + clang::Token &PragmaToken = FirstToken; + + // Skip first token, like "export_var_all" + PP.LexUnexpandedToken(PragmaToken); + + // Should be end immediately + if (PragmaToken.isNot(clang::tok::eod)) + if (PragmaToken.isNot(clang::tok::r_paren)) { + PP.Diag(PragmaToken, + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "expected a ')'")); + return; + } +} + +void RSPragmaHandler::handleOptionalStringLiteralParamPragma( + clang::Preprocessor &PP, clang::Token &FirstToken) { + clang::Token &PragmaToken = FirstToken; + + // Skip first token, like "set_reflect_license" + PP.LexUnexpandedToken(PragmaToken); + + // Now, the current token must be clang::tok::lpara + if (PragmaToken.isNot(clang::tok::l_paren)) + return; + + // If not ')', eat the following string literal as the license + PP.LexUnexpandedToken(PragmaToken); + if (PragmaToken.isNot(clang::tok::r_paren)) { + // Eat the whole string literal + clang::StringLiteralParser StringLiteral(PragmaToken, PP); + if (StringLiteral.hadError) { + // Diagnostics will be generated automatically + return; + } else { + this->handleItem(std::string(StringLiteral.GetString())); + } + + // The current token should be clang::tok::r_para + PP.LexUnexpandedToken(PragmaToken); + if (PragmaToken.isNot(clang::tok::r_paren)) { + PP.Diag(PragmaToken, + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "expected a ')'")); + return; + } + } else { + // If no argument, remove the license + this->handleItem(""); + } +} + +void RSPragmaHandler::handleIntegerParamPragma( + clang::Preprocessor &PP, clang::Token &FirstToken) { + clang::Token &PragmaToken = FirstToken; + + // Skip first token, like "version" + PP.LexUnexpandedToken(PragmaToken); + + // Now, the current token must be clang::tok::lpara + if (PragmaToken.isNot(clang::tok::l_paren)) { + // If no argument, set the version to 0 + this->handleInt(PP, PragmaToken, 0); + return; + } + PP.LexUnexpandedToken(PragmaToken); + + if (PragmaToken.is(clang::tok::numeric_constant)) { + llvm::SmallString<128> SpellingBuffer; + SpellingBuffer.resize(PragmaToken.getLength() + 1); + llvm::StringRef TokSpelling = PP.getSpelling(PragmaToken, SpellingBuffer); + clang::NumericLiteralParser NumericLiteral(TokSpelling, + PragmaToken.getLocation(), PP); + if (NumericLiteral.hadError) { + // Diagnostics will be generated automatically + return; + } else { + llvm::APInt Val(32, 0); + NumericLiteral.GetIntegerValue(Val); + this->handleInt(PP, PragmaToken, static_cast<int>(Val.getSExtValue())); + } + PP.LexUnexpandedToken(PragmaToken); + } else { + // If no argument, set the version to 0 + this->handleInt(PP, PragmaToken, 0); + } + + if (PragmaToken.isNot(clang::tok::r_paren)) { + PP.Diag(PragmaToken, + PP.getDiagnostics().getCustomDiagID( + clang::DiagnosticsEngine::Error, + "expected a ')'")); + return; + } + + do { + PP.LexUnexpandedToken(PragmaToken); + } while (PragmaToken.isNot(clang::tok::eod)); +} + +void AddPragmaHandlers(clang::Preprocessor &PP, RSContext *RsContext) { + // For #pragma rs export_type + PP.AddPragmaHandler("rs", + new RSExportTypePragmaHandler("export_type", RsContext)); + + // For #pragma rs java_package_name + PP.AddPragmaHandler( + "rs", new RSJavaPackageNamePragmaHandler("java_package_name", RsContext)); + + // For #pragma rs reduce + PP.AddPragmaHandler( + "rs", new RSReducePragmaHandler(RSExportReduce::KeyReduce, RsContext)); + + // For #pragma rs set_reflect_license + PP.AddPragmaHandler( + "rs", new RSReflectLicensePragmaHandler("set_reflect_license", RsContext)); + + // For #pragma version + PP.AddPragmaHandler(new RSVersionPragmaHandler("version", RsContext)); + + // For #pragma rs_fp* + PP.AddPragmaHandler(new RSPrecisionPragmaHandler("rs_fp_full", RsContext)); + PP.AddPragmaHandler(new RSPrecisionPragmaHandler("rs_fp_relaxed", RsContext)); + PP.AddPragmaHandler(new RSPrecisionPragmaHandler("rs_fp_imprecise", RsContext)); +} + + +} // namespace slang
diff --git a/slang/slang_rs_pragma_handler.h b/slang/slang_rs_pragma_handler.h new file mode 100644 index 0000000..1b6fbe6 --- /dev/null +++ b/slang/slang_rs_pragma_handler.h
@@ -0,0 +1,78 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_PRAGMA_HANDLER_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_PRAGMA_HANDLER_H_ + +#include <string> + +#include "clang/Lex/Pragma.h" + +namespace clang { + class Token; + class IdentifierInfo; + class Preprocessor; +} + +namespace slang { + + class RSContext; + +class RSPragmaHandler : public clang::PragmaHandler { + protected: + RSContext *mContext; + + RSPragmaHandler(llvm::StringRef Name, RSContext *Context) + : clang::PragmaHandler(Name), + mContext(Context) { + } + RSContext *getContext() const { + return this->mContext; + } + + virtual void handleItem(const std::string &Item) { } + virtual void handleInt(clang::Preprocessor &PP, clang::Token &Tok, + const int v) { } + + // Handle pragma like #pragma rs [name] ([item #1],[item #2],...,[item #i]) + void handleItemListPragma(clang::Preprocessor &PP, + clang::Token &FirstToken); + + // Handle pragma like #pragma rs [name] + void handleNonParamPragma(clang::Preprocessor &PP, + clang::Token &FirstToken); + + // Handle pragma like #pragma rs [name] ("string literal") + void handleOptionalStringLiteralParamPragma(clang::Preprocessor &PP, + clang::Token &FirstToken); + + // Handle pragma like #pragma version (integer) + void handleIntegerParamPragma(clang::Preprocessor &PP, + clang::Token &FirstToken); + + public: + virtual void HandlePragma(clang::Preprocessor &PP, + clang::PragmaIntroducerKind Introducer, + clang::Token &FirstToken) = 0; +}; + +// Add handlers for the RS pragmas to the preprocessor. These handlers +// validate the pragmas and, if valid, set fields of the RSContext. +void AddPragmaHandlers(clang::Preprocessor &PP, RSContext *RsContext); + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_PRAGMA_HANDLER_H_ NOLINT
diff --git a/slang/slang_rs_reflect_utils.cpp b/slang/slang_rs_reflect_utils.cpp new file mode 100644 index 0000000..c67a1a8 --- /dev/null +++ b/slang/slang_rs_reflect_utils.cpp
@@ -0,0 +1,439 @@ +/* + * Copyright 2010-2014, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_reflect_utils.h" + +#include <cstdio> +#include <cstring> +#include <string> +#include <iomanip> + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Path.h" + +#include "os_sep.h" +#include "slang_assert.h" + +namespace slang { + +using std::string; + +string RSSlangReflectUtils::GetFileNameStem(const char *fileName) { + const char *dot = fileName + strlen(fileName); + const char *slash = dot - 1; + while (slash >= fileName) { + if (*slash == OS_PATH_SEPARATOR) { + break; + } + if ((*slash == '.') && (*dot == 0)) { + dot = slash; + } + --slash; + } + ++slash; + return string(slash, dot - slash); +} + +string RSSlangReflectUtils::ComputePackagedPath(const char *prefixPath, + const char *packageName) { + string packaged_path(prefixPath); + if (!packaged_path.empty() && + (packaged_path[packaged_path.length() - 1] != OS_PATH_SEPARATOR)) { + packaged_path += OS_PATH_SEPARATOR_STR; + } + size_t s = packaged_path.length(); + packaged_path += packageName; + while (s < packaged_path.length()) { + if (packaged_path[s] == '.') { + packaged_path[s] = OS_PATH_SEPARATOR; + } + ++s; + } + return packaged_path; +} + +static string InternalFileNameConvert(const char *rsFileName, bool toLower) { + const char *dot = rsFileName + strlen(rsFileName); + const char *slash = dot - 1; + while (slash >= rsFileName) { + if (*slash == OS_PATH_SEPARATOR) { + break; + } + if ((*slash == '.') && (*dot == 0)) { + dot = slash; + } + --slash; + } + ++slash; + char ret[256]; + int i = 0; + for (; (i < 255) && (slash < dot); ++slash) { + if (isalnum(*slash) || *slash == '_') { + if (toLower) { + ret[i] = tolower(*slash); + } else { + ret[i] = *slash; + } + ++i; + } + } + ret[i] = 0; + return string(ret); +} + +std::string +RSSlangReflectUtils::JavaClassNameFromRSFileName(const char *rsFileName) { + return InternalFileNameConvert(rsFileName, false); +} + +std::string RootNameFromRSFileName(const std::string &rsFileName) { + return InternalFileNameConvert(rsFileName.c_str(), false); +} + +std::string +RSSlangReflectUtils::BCFileNameFromRSFileName(const char *rsFileName) { + return InternalFileNameConvert(rsFileName, true); +} + +std::string RSSlangReflectUtils::JavaBitcodeClassNameFromRSFileName( + const char *rsFileName) { + std::string tmp(InternalFileNameConvert(rsFileName, false)); + return tmp.append("BitCode"); +} + +static bool GenerateAccessorMethod( + const RSSlangReflectUtils::BitCodeAccessorContext &context, + int bitwidth, GeneratedFile &out) { + // the prototype of the accessor method + out.indent() << "// return byte array representation of the " << bitwidth + << "-bit bitcode.\n"; + out.indent() << "public static byte[] getBitCode" << bitwidth << "()"; + out.startBlock(); + out.indent() << "return getBitCode" << bitwidth << "Internal();\n"; + out.endBlock(true); + return true; +} + +// Java method size must not exceed 64k, +// so we have to split the bitcode into multiple segments. +static bool GenerateSegmentMethod(const char *buff, int blen, int bitwidth, + int seg_num, GeneratedFile &out) { + out.indent() << "private static byte[] getSegment" << bitwidth << "_" + << seg_num << "()"; + out.startBlock(); + out.indent() << "byte[] data = {"; + out.increaseIndent(); + + const int kEntriesPerLine = 16; + int position = kEntriesPerLine; // We start with a new line and indent. + for (int written = 0; written < blen; written++) { + if (++position >= kEntriesPerLine) { + out << "\n"; + out.indent(); + position = 0; + } else { + out << " "; + } + out << std::setw(4) << static_cast<int>(buff[written]) << ","; + } + out << "\n"; + + out.decreaseIndent(); + out.indent() << "};\n"; + out.indent() << "return data;\n"; + out.endBlock(); + + return true; +} + +static bool GenerateJavaCodeAccessorMethodForBitwidth( + const RSSlangReflectUtils::BitCodeAccessorContext &context, + int bitwidth, GeneratedFile &out) { + + std::string filename(context.bc32FileName); + if (bitwidth == 64) { + filename = context.bc64FileName; + } + + FILE *pfin = fopen(filename.c_str(), "rb"); + if (pfin == nullptr) { + fprintf(stderr, "Error: could not read file %s\n", filename.c_str()); + return false; + } + + // start the accessor method + GenerateAccessorMethod(context, bitwidth, out); + + // output the data + // make sure the generated function for a segment won't break the Javac + // size limitation (64K). + static const int SEG_SIZE = 0x2000; + char *buff = new char[SEG_SIZE]; + int read_length; + int seg_num = 0; + int total_length = 0; + while ((read_length = fread(buff, 1, SEG_SIZE, pfin)) > 0) { + GenerateSegmentMethod(buff, read_length, bitwidth, seg_num, out); + ++seg_num; + total_length += read_length; + } + delete[] buff; + fclose(pfin); + + // output the internal accessor method + out.indent() << "private static int bitCode" << bitwidth << "Length = " + << total_length << ";\n\n"; + out.indent() << "private static byte[] getBitCode" << bitwidth + << "Internal()"; + out.startBlock(); + out.indent() << "byte[] bc = new byte[bitCode" << bitwidth << "Length];\n"; + out.indent() << "int offset = 0;\n"; + out.indent() << "byte[] seg;\n"; + for (int i = 0; i < seg_num; ++i) { + out.indent() << "seg = getSegment" << bitwidth << "_" << i << "();\n"; + out.indent() << "System.arraycopy(seg, 0, bc, offset, seg.length);\n"; + out.indent() << "offset += seg.length;\n"; + } + out.indent() << "return bc;\n"; + out.endBlock(); + + return true; +} + +static bool GenerateJavaCodeAccessorMethod( + const RSSlangReflectUtils::BitCodeAccessorContext &context, + GeneratedFile &out) { + if (!GenerateJavaCodeAccessorMethodForBitwidth(context, 32, out)) { + slangAssert(false && "Couldn't generate 32-bit embedded bitcode!"); + return false; + } + if (!GenerateJavaCodeAccessorMethodForBitwidth(context, 64, out)) { + slangAssert(false && "Couldn't generate 64-bit embedded bitcode!"); + return false; + } + + return true; +} + +static bool GenerateAccessorClass( + const RSSlangReflectUtils::BitCodeAccessorContext &context, + const char *clazz_name, GeneratedFile &out) { + // begin the class. + out << "/**\n"; + out << " * @hide\n"; + out << " */\n"; + out << "public class " << clazz_name; + out.startBlock(); + + bool ret = true; + switch (context.bcStorage) { + case BCST_APK_RESOURCE: + slangAssert(false && + "Invalid generation of bitcode accessor with resource"); + break; + case BCST_JAVA_CODE: + ret = GenerateJavaCodeAccessorMethod(context, out); + break; + default: + ret = false; + } + + // end the class. + out.endBlock(); + + return ret; +} + +bool RSSlangReflectUtils::GenerateJavaBitCodeAccessor( + const BitCodeAccessorContext &context) { + string output_path = + ComputePackagedPath(context.reflectPath, context.packageName); + if (std::error_code EC = llvm::sys::fs::create_directories( + llvm::sys::path::parent_path(output_path))) { + fprintf(stderr, "Error: could not create dir %s: %s\n", + output_path.c_str(), EC.message().c_str()); + return false; + } + + string clazz_name(JavaBitcodeClassNameFromRSFileName(context.rsFileName)); + string filename(clazz_name); + filename += ".java"; + + GeneratedFile out; + if (!out.startFile(output_path, filename, context.rsFileName, + context.licenseNote, true, context.verbose)) { + return false; + } + + out << "package " << context.packageName << ";\n\n"; + + bool ret = GenerateAccessorClass(context, clazz_name.c_str(), out); + + out.closeFile(); + return ret; +} + +std::string JoinPath(const std::string &path1, const std::string &path2) { + if (path1.empty()) { + return path2; + } + if (path2.empty()) { + return path1; + } + std::string fullPath = path1; + if (fullPath[fullPath.length() - 1] != OS_PATH_SEPARATOR) { + fullPath += OS_PATH_SEPARATOR; + } + if (path2[0] == OS_PATH_SEPARATOR) { + fullPath += path2.substr(1, string::npos); + } else { + fullPath += path2; + } + return fullPath; +} + +// Replace all instances of "\" with "\\" in a single string to prevent +// formatting errors. In Java, this can happen even within comments, as +// Java processes \u before the comments are stripped. E.g. if the generated +// file in Windows contains the note: +// /* Do not modify! Generated from \Users\MyName\MyDir\foo.cs */ +// Java will think that \U tells of a Unicode character. +static void SanitizeString(std::string *s) { + size_t p = 0; + while ((p = s->find('\\', p)) != std::string::npos) { + s->replace(p, 1, "\\\\"); + p += 2; + } +} + +static const char *const gApacheLicenseNote = + "/*\n" + " * Copyright (C) 2011-2014 The Android Open Source Project\n" + " *\n" + " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" + " * you may not use this file except in compliance with the License.\n" + " * You may obtain a copy of the License at\n" + " *\n" + " * http://www.apache.org/licenses/LICENSE-2.0\n" + " *\n" + " * Unless required by applicable law or agreed to in writing, software\n" + " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" + " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " + "implied.\n" + " * See the License for the specific language governing permissions and\n" + " * limitations under the License.\n" + " */\n" + "\n"; + +bool GeneratedFile::startFile(const string &outDirectory, + const string &outFileName, + const string &sourceFileName, + const string *optionalLicense, bool isJava, + bool verbose) { + if (verbose) { + printf("Generating %s\n", outFileName.c_str()); + } + + // Create the parent directories. + if (!outDirectory.empty()) { + if (std::error_code EC = llvm::sys::fs::create_directories( + llvm::sys::path::parent_path(outDirectory))) { + fprintf(stderr, "Error: %s\n", EC.message().c_str()); + return false; + } + } + + std::string FilePath = JoinPath(outDirectory, outFileName); + + // Open the file. + open(FilePath.c_str()); + if (!good()) { + fprintf(stderr, "Error: could not write file %s\n", outFileName.c_str()); + return false; + } + + // Write the license. + if (optionalLicense != nullptr) { + *this << *optionalLicense; + } else { + *this << gApacheLicenseNote; + } + + // Write a notice that this is a generated file. + std::string source(sourceFileName); + if (isJava) { + SanitizeString(&source); + } + + *this << "/*\n" + << " * This file is auto-generated. DO NOT MODIFY!\n" + << " * The source Renderscript file: " << source << "\n" + << " */\n\n"; + + return true; +} + +void GeneratedFile::closeFile() { close(); } + +void GeneratedFile::increaseIndent() { mIndent.append(" "); } + +void GeneratedFile::decreaseIndent() { + slangAssert(!mIndent.empty() && "No indent"); + mIndent.erase(0, 4); +} + +void GeneratedFile::comment(const std::string &s) { + indent() << "/* "; + // +3 for the " * " starting each line. + std::size_t indentLength = mIndent.length() + 3; + std::size_t lengthOfCommentOnLine = 0; + const std::size_t maxPerLine = 80; + for (std::size_t start = 0, length = s.length(), nextStart = 0; + start < length; start = nextStart) { + std::size_t p = s.find_first_of(" \n", start); + std::size_t toCopy = 1; + bool forceBreak = false; + if (p == std::string::npos) { + toCopy = length - start; + nextStart = length; + } else { + toCopy = p - start; + nextStart = p + 1; + forceBreak = s[p] == '\n'; + } + if (lengthOfCommentOnLine > 0) { + if (indentLength + lengthOfCommentOnLine + toCopy >= maxPerLine) { + *this << "\n"; + indent() << " * "; + lengthOfCommentOnLine = 0; + } else { + *this << " "; + } + } + + *this << s.substr(start, toCopy); + if (forceBreak) { + lengthOfCommentOnLine = maxPerLine; + } else { + lengthOfCommentOnLine += toCopy; + } + } + *this << "\n"; + indent() << " */\n"; +} + +} // namespace slang
diff --git a/slang/slang_rs_reflect_utils.h b/slang/slang_rs_reflect_utils.h new file mode 100644 index 0000000..1cbc098 --- /dev/null +++ b/slang/slang_rs_reflect_utils.h
@@ -0,0 +1,151 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_REFLECT_UTILS_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_REFLECT_UTILS_H_ + +#include <fstream> +#include <string> + +namespace slang { + +// BitCode storage type +enum BitCodeStorageType { BCST_APK_RESOURCE, BCST_JAVA_CODE, BCST_CPP_CODE }; + +class RSSlangReflectUtils { +public: + // Encode a binary bitcode file into a Java source file. + // rsFileName: the original .rs file name (with or without path). + // bc32FileName: path of the 32-bit bitcode file + // bc64FileName: path of the 64-bit bitcode file + // reflectPath: where to output the generated Java file, no package name in + // it. + // packageName: the package of the output Java file. + // verbose: whether or not to print out additional info about compilation. + // bcStorage: where to emit bitcode to (resource file or embedded). + struct BitCodeAccessorContext { + const char *rsFileName; + const char *bc32FileName; + const char *bc64FileName; + const char *reflectPath; + const char *packageName; + const std::string *licenseNote; + bool verbose; + BitCodeStorageType bcStorage; + }; + + // Return the stem of the file name, i.e., remove the dir and the extension. + // Eg, foo.ext -> foo + // foo.bar.ext -> foo.bar + // ./path/foo.ext -> foo + static std::string GetFileNameStem(const char *fileName); + + // Compute a Java source file path from a given prefixPath and its package. + // Eg, given prefixPath=./foo/bar and packageName=com.x.y, then it returns + // ./foo/bar/com/x/y + static std::string ComputePackagedPath(const char *prefixPath, + const char *packageName); + + // Compute Java class name from a .rs file name. + // Any non-alnum, non-underscore characters will be discarded. + // E.g. with rsFileName=./foo/bar/my-Renderscript_file.rs it returns + // "myRenderscript_file". + // rsFileName: the input .rs file name (with or without path). + static std::string JavaClassNameFromRSFileName(const char *rsFileName); + + // Compute a bitcode file name (no extension) from a .rs file name. + // Because the bitcode file name may be used as Resource ID in the generated + // class (something like R.raw.<bitcode_filename>), Any non-alnum, + // non-underscore character will be discarded. + // The difference from JavaClassNameFromRSFileName() is that the result is + // converted to lowercase. + // E.g. with rsFileName=./foo/bar/my-Renderscript_file.rs it returns + // "myrenderscript_file" + // rsFileName: the input .rs file name (with or without path). + static std::string BCFileNameFromRSFileName(const char *rsFileName); + + // Compute the bitcode-containing class name from a .rs filename. + // Any non-alnum, non-underscore characters will be discarded. + // E.g. with rsFileName=./foo/bar/my-Renderscript_file.rs it returns + // "myRenderscript_fileBitCode". + // rsFileName: the input .rs file name (with or without path). + static std::string JavaBitcodeClassNameFromRSFileName(const char *rsFileName); + + // Generate the bit code accessor Java source file. + static bool GenerateJavaBitCodeAccessor(const BitCodeAccessorContext &context); +}; + +// Joins two sections of a path, inserting a separator if needed. +// E.g. JoinPath("foo/bar", "baz/a.java") returns "foo/bar/baz/a.java", +// JoinPath("foo", "/bar/baz") returns "foo/bar/baz", and +// JoinPath("foo/", "/bar") returns "foo/bar". +std::string JoinPath(const std::string &path1, const std::string &path2); + +/* Compute a safe root name from a .rs file name. Any non-alphanumeric, + * non-underscore characters will be discarded. + * E.g. RootNameFromRSFileName("./foo/bar/my-Renderscript_file.rs") returns + * "myRenderscript_file". + */ +std::string RootNameFromRSFileName(const std::string &rsFileName); + +/* This class is used to generate one source file. There will be one instance + * for each generated file. + */ +class GeneratedFile : public std::ofstream { +public: + /* Starts the file by: + * - creating the parent directories (if needed), + * - opening the stream, + * - writing out the license, + * - writing a message that this file has been auto-generated. + * If optionalLicense is nullptr, a default license is used. + */ + bool startFile(const std::string &outPath, const std::string &outFileName, + const std::string &sourceFileName, + const std::string *optionalLicense, bool isJava, bool verbose); + void closeFile(); + + void increaseIndent(); // Increases the new line indentation by 4. + void decreaseIndent(); // Decreases the new line indentation by 4. + void comment(const std::string& s); // Outputs a multiline comment. + + // Starts a control block. This works both for Java and C++. + void startBlock() { + *this << " {\n"; + increaseIndent(); + } + + // Ends a control block. + void endBlock(bool addSemicolon = false) { + decreaseIndent(); + indent() << "}" << (addSemicolon ? ";" : "") << "\n\n"; + } + + /* Indents the line. By returning *this, we can use like this: + * mOut.ident() << "a = b;\n"; + */ + std::ofstream &indent() { + *this << mIndent; + return *this; + } + +private: + std::string mIndent; // The correct spacing at the beginning of each line. +}; + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_REFLECT_UTILS_H_ NOLINT
diff --git a/slang/slang_rs_reflection.cpp b/slang/slang_rs_reflection.cpp new file mode 100644 index 0000000..0e1894f --- /dev/null +++ b/slang/slang_rs_reflection.cpp
@@ -0,0 +1,2829 @@ +/* + * Copyright 2010-2014, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_reflection.h" + +#include <sys/stat.h> + +#include <cstdarg> +#include <cctype> + +#include <algorithm> +#include <sstream> +#include <string> +#include <utility> + +#include "llvm/ADT/APFloat.h" +#include "llvm/ADT/StringExtras.h" + +#include "os_sep.h" +#include "slang_rs_context.h" +#include "slang_rs_export_var.h" +#include "slang_rs_export_foreach.h" +#include "slang_rs_export_func.h" +#include "slang_rs_export_reduce.h" +#include "slang_rs_reflect_utils.h" +#include "slang_version.h" + +#define RS_SCRIPT_CLASS_NAME_PREFIX "ScriptC_" +#define RS_SCRIPT_CLASS_SUPER_CLASS_NAME "ScriptC" + +#define RS_TYPE_CLASS_SUPER_CLASS_NAME ".Script.FieldBase" + +#define RS_TYPE_ITEM_CLASS_NAME "Item" + +#define RS_TYPE_ITEM_SIZEOF_LEGACY "Item.sizeof" +#define RS_TYPE_ITEM_SIZEOF_CURRENT "mElement.getBytesSize()" + +#define RS_TYPE_ITEM_BUFFER_NAME "mItemArray" +#define RS_TYPE_ITEM_BUFFER_PACKER_NAME "mIOBuffer" +#define RS_TYPE_ELEMENT_REF_NAME "mElementCache" + +#define RS_EXPORT_VAR_INDEX_PREFIX "mExportVarIdx_" +#define RS_EXPORT_VAR_PREFIX "mExportVar_" +#define RS_EXPORT_VAR_ELEM_PREFIX "mExportVarElem_" +#define RS_EXPORT_VAR_DIM_PREFIX "mExportVarDim_" +#define RS_EXPORT_VAR_CONST_PREFIX "const_" + +#define RS_ELEM_PREFIX "__" + +#define RS_FP_PREFIX "__rs_fp_" + +#define RS_RESOURCE_NAME "__rs_resource_name" + +#define RS_EXPORT_FUNC_INDEX_PREFIX "mExportFuncIdx_" +#define RS_EXPORT_FOREACH_INDEX_PREFIX "mExportForEachIdx_" +#define RS_EXPORT_REDUCE_INDEX_PREFIX "mExportReduceIdx_" + +#define RS_EXPORT_VAR_ALLOCATION_PREFIX "mAlloction_" +#define RS_EXPORT_VAR_DATA_STORAGE_PREFIX "mData_" + +#define SAVED_RS_REFERENCE "mRSLocal" + +namespace slang { + +class RSReflectionJavaElementBuilder { +public: + RSReflectionJavaElementBuilder(const char *ElementBuilderName, + const RSExportRecordType *ERT, + const char *RenderScriptVar, + GeneratedFile *Out, const RSContext *RSContext, + RSReflectionJava *Reflection); + void generate(); + +private: + void genAddElement(const RSExportType *ET, const std::string &VarName, + unsigned ArraySize); + void genAddStatementStart(); + void genAddStatementEnd(const std::string &VarName, unsigned ArraySize); + void genAddPadding(int PaddingSize); + // TODO Will remove later due to field name information is not necessary for + // C-reflect-to-Java + std::string createPaddingField() { + return mPaddingPrefix + llvm::itostr(mPaddingFieldIndex++); + } + + const char *mElementBuilderName; + const RSExportRecordType *mERT; + const char *mRenderScriptVar; + GeneratedFile *mOut; + std::string mPaddingPrefix; + int mPaddingFieldIndex; + const RSContext *mRSContext; + RSReflectionJava *mReflection; +}; + +static const char *GetMatrixTypeName(const RSExportMatrixType *EMT) { + static const char *MatrixTypeJavaNameMap[] = {/* 2x2 */ "Matrix2f", + /* 3x3 */ "Matrix3f", + /* 4x4 */ "Matrix4f", + }; + unsigned Dim = EMT->getDim(); + + if ((Dim - 2) < (sizeof(MatrixTypeJavaNameMap) / sizeof(const char *))) + return MatrixTypeJavaNameMap[EMT->getDim() - 2]; + + slangAssert(false && "GetMatrixTypeName : Unsupported matrix dimension"); + return nullptr; +} + +static const char *GetVectorAccessor(unsigned Index) { + static const char *VectorAccessorMap[] = {/* 0 */ "x", + /* 1 */ "y", + /* 2 */ "z", + /* 3 */ "w", + }; + + slangAssert((Index < (sizeof(VectorAccessorMap) / sizeof(const char *))) && + "Out-of-bound index to access vector member"); + + return VectorAccessorMap[Index]; +} + +static const char *GetPackerAPIName(const RSExportPrimitiveType *EPT) { + static const char *PrimitiveTypePackerAPINameMap[] = { + "addI16", // DataTypeFloat16 + "addF32", // DataTypeFloat32 + "addF64", // DataTypeFloat64 + "addI8", // DataTypeSigned8 + "addI16", // DataTypeSigned16 + "addI32", // DataTypeSigned32 + "addI64", // DataTypeSigned64 + "addU8", // DataTypeUnsigned8 + "addU16", // DataTypeUnsigned16 + "addU32", // DataTypeUnsigned32 + "addU64", // DataTypeUnsigned64 + "addBoolean", // DataTypeBoolean + "addU16", // DataTypeUnsigned565 + "addU16", // DataTypeUnsigned5551 + "addU16", // DataTypeUnsigned4444 + "addMatrix", // DataTypeRSMatrix2x2 + "addMatrix", // DataTypeRSMatrix3x3 + "addMatrix", // DataTypeRSMatrix4x4 + "addObj", // DataTypeRSElement + "addObj", // DataTypeRSType + "addObj", // DataTypeRSAllocation + "addObj", // DataTypeRSSampler + "addObj", // DataTypeRSScript + "addObj", // DataTypeRSMesh + "addObj", // DataTypeRSPath + "addObj", // DataTypeRSProgramFragment + "addObj", // DataTypeRSProgramVertex + "addObj", // DataTypeRSProgramRaster + "addObj", // DataTypeRSProgramStore + "addObj", // DataTypeRSFont + }; + unsigned TypeId = EPT->getType(); + + if (TypeId < (sizeof(PrimitiveTypePackerAPINameMap) / sizeof(const char *))) + return PrimitiveTypePackerAPINameMap[EPT->getType()]; + + slangAssert(false && "GetPackerAPIName : Unknown primitive data type"); + return nullptr; +} + +namespace { + +enum { + TypeNameWithConstantArrayBrackets = 0x01, + TypeNameWithRecordElementName = 0x02, + TypeNameC = 0x04, // else Java + TypeNameDefault = TypeNameWithConstantArrayBrackets|TypeNameWithRecordElementName +}; + +std::string GetTypeName(const RSExportType *ET, unsigned Style = TypeNameDefault) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + const auto ReflectionType = + RSExportPrimitiveType::getRSReflectionType(static_cast<const RSExportPrimitiveType *>(ET)); + return (Style & TypeNameC ? ReflectionType->s_name : ReflectionType->java_name); + } + case RSExportType::ExportClassPointer: { + slangAssert(!(Style & TypeNameC) && + "No need to support C type names for pointer types yet"); + const RSExportType *PointeeType = + static_cast<const RSExportPointerType *>(ET)->getPointeeType(); + + if (PointeeType->getClass() != RSExportType::ExportClassRecord) + return "Allocation"; + else + return PointeeType->getElementName(); + } + case RSExportType::ExportClassVector: { + const RSExportVectorType *EVT = static_cast<const RSExportVectorType *>(ET); + const auto ReflectionType = EVT->getRSReflectionType(EVT); + std::stringstream VecName; + VecName << (Style & TypeNameC ? ReflectionType->s_name : ReflectionType->rs_java_vector_prefix) + << EVT->getNumElement(); + return VecName.str(); + } + case RSExportType::ExportClassMatrix: { + slangAssert(!(Style & TypeNameC) && + "No need to support C type names for matrix types yet"); + return GetMatrixTypeName(static_cast<const RSExportMatrixType *>(ET)); + } + case RSExportType::ExportClassConstantArray: { + const RSExportConstantArrayType *CAT = + static_cast<const RSExportConstantArrayType *>(ET); + std::string ElementTypeName = GetTypeName(CAT->getElementType(), Style); + if (Style & TypeNameWithConstantArrayBrackets) { + slangAssert(!(Style & TypeNameC) && + "No need to support C type names for array types with brackets yet"); + ElementTypeName.append("[]"); + } + return ElementTypeName; + } + case RSExportType::ExportClassRecord: { + slangAssert(!(Style & TypeNameC) && + "No need to support C type names for record types yet"); + if (Style & TypeNameWithRecordElementName) + return ET->getElementName() + "." RS_TYPE_ITEM_CLASS_NAME; + else + return ET->getName(); + } + default: { slangAssert(false && "Unknown class of type"); } + } + + return ""; +} + +std::string GetReduceResultTypeName(const RSExportType *ET) { + switch (ET->getClass()) { + case RSExportType::ExportClassConstantArray: { + const RSExportConstantArrayType *const CAT = static_cast<const RSExportConstantArrayType *>(ET); + return "resultArray" + std::to_string(CAT->getNumElement()) + "_" + + GetTypeName(CAT->getElementType(), + (TypeNameDefault & ~TypeNameWithRecordElementName) | TypeNameC); + } + case RSExportType::ExportClassRecord: + return "resultStruct_" + GetTypeName(ET, + (TypeNameDefault & ~TypeNameWithRecordElementName) | TypeNameC); + default: + return "result_" + GetTypeName(ET, TypeNameDefault | TypeNameC); + } +} + +std::string GetReduceResultTypeName(const RSExportReduce *ER) { + return GetReduceResultTypeName(ER->getResultType()); +} + +} // end anonymous namespace + +static const char *GetTypeNullValue(const RSExportType *ET) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + const RSExportPrimitiveType *EPT = + static_cast<const RSExportPrimitiveType *>(ET); + if (EPT->isRSObjectType()) + return "null"; + else if (EPT->getType() == DataTypeBoolean) + return "false"; + else + return "0"; + break; + } + case RSExportType::ExportClassPointer: + case RSExportType::ExportClassVector: + case RSExportType::ExportClassMatrix: + case RSExportType::ExportClassConstantArray: + case RSExportType::ExportClassRecord: { + return "null"; + break; + } + default: { slangAssert(false && "Unknown class of type"); } + } + return ""; +} + +static std::string GetBuiltinElementConstruct(const RSExportType *ET) { + if (ET->getClass() == RSExportType::ExportClassPrimitive) { + return std::string("Element.") + ET->getElementName(); + } else if (ET->getClass() == RSExportType::ExportClassVector) { + const RSExportVectorType *EVT = static_cast<const RSExportVectorType *>(ET); + if (EVT->getType() == DataTypeFloat32) { + if (EVT->getNumElement() == 2) { + return "Element.F32_2"; + } else if (EVT->getNumElement() == 3) { + return "Element.F32_3"; + } else if (EVT->getNumElement() == 4) { + return "Element.F32_4"; + } else { + slangAssert(false && "Vectors should be size 2, 3, 4"); + } + } else if (EVT->getType() == DataTypeUnsigned8) { + if (EVT->getNumElement() == 4) + return "Element.U8_4"; + } + } else if (ET->getClass() == RSExportType::ExportClassMatrix) { + const RSExportMatrixType *EMT = static_cast<const RSExportMatrixType *>(ET); + switch (EMT->getDim()) { + case 2: + return "Element.MATRIX_2X2"; + case 3: + return "Element.MATRIX_3X3"; + case 4: + return "Element.MATRIX_4X4"; + default: + slangAssert(false && "Unsupported dimension of matrix"); + } + } + // RSExportType::ExportClassPointer can't be generated in a struct. + + return ""; +} + +// If FromIntegerType == DestIntegerType, then Value is returned. +// Otherwise, return a Java expression that zero-extends the value +// Value, assumed to be of type FromIntegerType, to the integer type +// DestIntegerType. +// +// Intended operations: +// byte -> {byte,int,short,long} +// short -> {short,int,long} +// int -> {int,long} +// long -> long +static std::string ZeroExtendValue(const std::string &Value, + const std::string &FromIntegerType, + const std::string &DestIntegerType) { +#ifndef __DISABLE_ASSERTS + // Integer types arranged in increasing order by width + const std::vector<std::string> ValidTypes{"byte", "short", "int", "long"}; + auto FromTypeLoc = std::find(ValidTypes.begin(), ValidTypes.end(), FromIntegerType); + auto DestTypeLoc = std::find(ValidTypes.begin(), ValidTypes.end(), DestIntegerType); + // Check that both types are valid. + slangAssert(FromTypeLoc != ValidTypes.end()); + slangAssert(DestTypeLoc != ValidTypes.end()); + // Check that DestIntegerType is at least as wide as FromIntegerType. + slangAssert(FromTypeLoc - ValidTypes.begin() <= DestTypeLoc - ValidTypes.begin()); +#endif + + if (FromIntegerType == DestIntegerType) { + return Value; + } + + std::string Mask, MaskLiteralType; + if (FromIntegerType == "byte") { + Mask = "0xff"; + MaskLiteralType = "int"; + } else if (FromIntegerType == "short") { + Mask = "0xffff"; + MaskLiteralType = "int"; + } else if (FromIntegerType == "int") { + Mask = "0xffffffffL"; + MaskLiteralType = "long"; + } else { + // long -> long casts should have already been handled. + slangAssert(false && "Unknown integer type"); + } + + // Cast the mask to the appropriate type. + if (MaskLiteralType != DestIntegerType) { + Mask = "(" + DestIntegerType + ") " + Mask; + } + return "((" + DestIntegerType + ") ((" + Value + ") & " + Mask + "))"; +} + +/********************** Methods to generate script class **********************/ +RSReflectionJava::RSReflectionJava(const RSContext *Context, + std::vector<std::string> *GeneratedFileNames, + const std::string &OutputBaseDirectory, + const std::string &RSSourceFileName, + const std::string &BitCodeFileName, + bool EmbedBitcodeInJava) + : mRSContext(Context), mPackageName(Context->getReflectJavaPackageName()), + mRSPackageName(Context->getRSPackageName()), + mOutputBaseDirectory(OutputBaseDirectory), + mRSSourceFileName(RSSourceFileName), mBitCodeFileName(BitCodeFileName), + mResourceId(RSSlangReflectUtils::JavaClassNameFromRSFileName( + mBitCodeFileName.c_str())), + mScriptClassName(RS_SCRIPT_CLASS_NAME_PREFIX + + RSSlangReflectUtils::JavaClassNameFromRSFileName( + mRSSourceFileName.c_str())), + mEmbedBitcodeInJava(EmbedBitcodeInJava), mNextExportVarSlot(0), + mNextExportFuncSlot(0), mNextExportForEachSlot(0), + mNextExportReduceSlot(0), mLastError(""), + mGeneratedFileNames(GeneratedFileNames), mFieldIndex(0) { + slangAssert(mGeneratedFileNames && "Must supply GeneratedFileNames"); + slangAssert(!mPackageName.empty() && mPackageName != "-"); + + mOutputDirectory = RSSlangReflectUtils::ComputePackagedPath( + OutputBaseDirectory.c_str(), mPackageName.c_str()) + + OS_PATH_SEPARATOR_STR; + + // mElement.getBytesSize only exists on JB+ + if (mRSContext->getTargetAPI() >= SLANG_JB_TARGET_API) { + mItemSizeof = RS_TYPE_ITEM_SIZEOF_CURRENT; + } else { + mItemSizeof = RS_TYPE_ITEM_SIZEOF_LEGACY; + } +} + +bool RSReflectionJava::genScriptClass(const std::string &ClassName, + std::string &ErrorMsg) { + if (!startClass(AM_Public, false, ClassName, RS_SCRIPT_CLASS_SUPER_CLASS_NAME, + ErrorMsg)) + return false; + + genScriptClassConstructor(); + + // Reflect exported variables + for (auto I = mRSContext->export_vars_begin(), + E = mRSContext->export_vars_end(); + I != E; I++) + genExportVariable(*I); + + // Reflect exported forEach functions (only available on ICS+) + if (mRSContext->getTargetAPI() >= SLANG_ICS_TARGET_API) { + for (auto I = mRSContext->export_foreach_begin(), + E = mRSContext->export_foreach_end(); + I != E; I++) { + genExportForEach(*I); + } + } + + // Reflect exported new-style reduce functions + for (const RSExportType *ResultType : mRSContext->getReduceResultTypes( + // FilterIn + exportableReduce, + + // Compare + [](const RSExportType *A, const RSExportType *B) + { return GetReduceResultTypeName(A) < GetReduceResultTypeName(B); })) + genExportReduceResultType(ResultType); + for (auto I = mRSContext->export_reduce_begin(), + E = mRSContext->export_reduce_end(); + I != E; ++I) + genExportReduce(*I); + + // Reflect exported functions (invokable) + for (auto I = mRSContext->export_funcs_begin(), + E = mRSContext->export_funcs_end(); + I != E; ++I) + genExportFunction(*I); + + endClass(); + + return true; +} + +void RSReflectionJava::genScriptClassConstructor() { + std::string className(RSSlangReflectUtils::JavaBitcodeClassNameFromRSFileName( + mRSSourceFileName.c_str())); + // Provide a simple way to reference this object. + mOut.indent() << "private static final String " RS_RESOURCE_NAME " = \"" + << getResourceId() << "\";\n"; + + // Generate a simple constructor with only a single parameter (the rest + // can be inferred from information we already have). + mOut.indent() << "// Constructor\n"; + startFunction(AM_Public, false, nullptr, getClassName(), 1, "RenderScript", + "rs"); + + const bool haveReduceExportables = + mRSContext->export_reduce_begin() != mRSContext->export_reduce_end(); + + if (getEmbedBitcodeInJava()) { + // Call new single argument Java-only constructor + mOut.indent() << "super(rs,\n"; + mOut.indent() << " " << RS_RESOURCE_NAME ",\n"; + mOut.indent() << " " << className << ".getBitCode32(),\n"; + mOut.indent() << " " << className << ".getBitCode64());\n"; + } else { + // Call alternate constructor with required parameters. + // Look up the proper raw bitcode resource id via the context. + mOut.indent() << "this(rs,\n"; + mOut.indent() << " rs.getApplicationContext().getResources(),\n"; + mOut.indent() << " rs.getApplicationContext().getResources()." + "getIdentifier(\n"; + mOut.indent() << " " RS_RESOURCE_NAME ", \"raw\",\n"; + mOut.indent() + << " rs.getApplicationContext().getPackageName()));\n"; + endFunction(); + + // Alternate constructor (legacy) with 3 original parameters. + startFunction(AM_Public, false, nullptr, getClassName(), 3, "RenderScript", + "rs", "Resources", "resources", "int", "id"); + // Call constructor of super class + mOut.indent() << "super(rs, resources, id);\n"; + } + + // If an exported variable has initial value, reflect it + + for (auto I = mRSContext->export_vars_begin(), + E = mRSContext->export_vars_end(); + I != E; I++) { + const RSExportVar *EV = *I; + if (!EV->getInit().isUninit()) { + genInitExportVariable(EV->getType(), EV->getName(), EV->getInit()); + } else if (EV->getArraySize()) { + // Always create an initial zero-init array object. + mOut.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = new " + << GetTypeName(EV->getType(), TypeNameDefault & ~TypeNameWithConstantArrayBrackets) << "[" + << EV->getArraySize() << "];\n"; + size_t NumInits = EV->getNumInits(); + const RSExportConstantArrayType *ECAT = + static_cast<const RSExportConstantArrayType *>(EV->getType()); + const RSExportType *ET = ECAT->getElementType(); + for (size_t i = 0; i < NumInits; i++) { + std::stringstream Name; + Name << EV->getName() << "[" << i << "]"; + genInitExportVariable(ET, Name.str(), EV->getInitArray(i)); + } + } + if (mRSContext->getTargetAPI() >= SLANG_JB_TARGET_API) { + genTypeInstance(EV->getType()); + } + genFieldPackerInstance(EV->getType()); + } + + if (haveReduceExportables) { + mOut.indent() << SAVED_RS_REFERENCE << " = rs;\n"; + } + + // Reflect argument / return types in kernels + + for (auto I = mRSContext->export_foreach_begin(), + E = mRSContext->export_foreach_end(); + I != E; I++) { + const RSExportForEach *EF = *I; + + const RSExportForEach::InTypeVec &InTypes = EF->getInTypes(); + for (RSExportForEach::InTypeIter BI = InTypes.begin(), EI = InTypes.end(); + BI != EI; BI++) { + if (*BI != nullptr) { + genTypeInstanceFromPointer(*BI); + } + } + + const RSExportType *OET = EF->getOutType(); + if (OET) { + genTypeInstanceFromPointer(OET); + } + } + + for (auto I = mRSContext->export_reduce_begin(), + E = mRSContext->export_reduce_end(); + I != E; I++) { + const RSExportReduce *ER = *I; + + const RSExportType *RT = ER->getResultType(); + slangAssert(RT != nullptr); + if (!exportableReduce(RT)) + continue; + + genTypeInstance(RT); + + const RSExportReduce::InTypeVec &InTypes = ER->getAccumulatorInTypes(); + for (RSExportReduce::InTypeIter BI = InTypes.begin(), EI = InTypes.end(); + BI != EI; BI++) { + slangAssert(*BI != nullptr); + genTypeInstance(*BI); + } + } + + endFunction(); + + for (std::set<std::string>::iterator I = mTypesToCheck.begin(), + E = mTypesToCheck.end(); + I != E; I++) { + mOut.indent() << "private Element " RS_ELEM_PREFIX << *I << ";\n"; + } + + for (std::set<std::string>::iterator I = mFieldPackerTypes.begin(), + E = mFieldPackerTypes.end(); + I != E; I++) { + mOut.indent() << "private FieldPacker " RS_FP_PREFIX << *I << ";\n"; + } + + if (haveReduceExportables) { + // We save a private copy of rs in order to create temporary + // allocations in the reduce_* entry points. + mOut.indent() << "private RenderScript " << SAVED_RS_REFERENCE << ";\n"; + } +} + +void RSReflectionJava::genInitBoolExportVariable(const std::string &VarName, + const clang::APValue &Val) { + slangAssert(!Val.isUninit() && "Not a valid initializer"); + slangAssert((Val.getKind() == clang::APValue::Int) && + "Bool type has wrong initial APValue"); + + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; + + mOut << ((Val.getInt().getSExtValue() == 0) ? "false" : "true") << ";\n"; +} + +void +RSReflectionJava::genInitPrimitiveExportVariable(const std::string &VarName, + const clang::APValue &Val) { + slangAssert(!Val.isUninit() && "Not a valid initializer"); + + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; + genInitValue(Val, false); + mOut << ";\n"; +} + +void RSReflectionJava::genInitExportVariable(const RSExportType *ET, + const std::string &VarName, + const clang::APValue &Val) { + slangAssert(!Val.isUninit() && "Not a valid initializer"); + + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + const RSExportPrimitiveType *EPT = + static_cast<const RSExportPrimitiveType *>(ET); + if (EPT->getType() == DataTypeBoolean) { + genInitBoolExportVariable(VarName, Val); + } else { + genInitPrimitiveExportVariable(VarName, Val); + } + break; + } + case RSExportType::ExportClassPointer: { + if (!Val.isInt() || Val.getInt().getSExtValue() != 0) + std::cout << "Initializer which is non-NULL to pointer type variable " + "will be ignored\n"; + break; + } + case RSExportType::ExportClassVector: { + const RSExportVectorType *EVT = static_cast<const RSExportVectorType *>(ET); + switch (Val.getKind()) { + case clang::APValue::Int: + case clang::APValue::Float: { + for (unsigned i = 0; i < EVT->getNumElement(); i++) { + std::string Name = VarName + "." + GetVectorAccessor(i); + genInitPrimitiveExportVariable(Name, Val); + } + break; + } + case clang::APValue::Vector: { + std::stringstream VecName; + VecName << EVT->getRSReflectionType(EVT)->rs_java_vector_prefix + << EVT->getNumElement(); + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = new " + << VecName.str() << "();\n"; + + unsigned NumElements = std::min( + static_cast<unsigned>(EVT->getNumElement()), Val.getVectorLength()); + for (unsigned i = 0; i < NumElements; i++) { + const clang::APValue &ElementVal = Val.getVectorElt(i); + std::string Name = VarName + "." + GetVectorAccessor(i); + genInitPrimitiveExportVariable(Name, ElementVal); + } + break; + } + case clang::APValue::MemberPointer: + case clang::APValue::Uninitialized: + case clang::APValue::ComplexInt: + case clang::APValue::ComplexFloat: + case clang::APValue::LValue: + case clang::APValue::Array: + case clang::APValue::Struct: + case clang::APValue::Union: + case clang::APValue::AddrLabelDiff: { + slangAssert(false && "Unexpected type of value of initializer."); + } + } + break; + } + // TODO(zonr): Resolving initializer of a record (and matrix) type variable + // is complex. It cannot obtain by just simply evaluating the initializer + // expression. + case RSExportType::ExportClassMatrix: + case RSExportType::ExportClassConstantArray: + case RSExportType::ExportClassRecord: { +#if 0 + unsigned InitIndex = 0; + const RSExportRecordType *ERT = + static_cast<const RSExportRecordType*>(ET); + + slangAssert((Val.getKind() == clang::APValue::Vector) && + "Unexpected type of initializer for record type variable"); + + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName + << " = new " << ERT->getElementName() + << "." RS_TYPE_ITEM_CLASS_NAME"();\n"; + + for (RSExportRecordType::const_field_iterator I = ERT->fields_begin(), + E = ERT->fields_end(); + I != E; + I++) { + const RSExportRecordType::Field *F = *I; + std::string FieldName = VarName + "." + F->getName(); + + if (InitIndex > Val.getVectorLength()) + break; + + genInitPrimitiveExportVariable(FieldName, + Val.getVectorElt(InitIndex++)); + } +#endif + slangAssert(false && "Unsupported initializer for record/matrix/constant " + "array type variable currently"); + break; + } + default: { slangAssert(false && "Unknown class of type"); } + } +} + +void RSReflectionJava::genExportVariable(const RSExportVar *EV) { + const RSExportType *ET = EV->getType(); + + mOut.indent() << "private final static int " << RS_EXPORT_VAR_INDEX_PREFIX + << EV->getName() << " = " << getNextExportVarSlot() << ";\n"; + + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + genPrimitiveTypeExportVariable(EV); + break; + } + case RSExportType::ExportClassPointer: { + genPointerTypeExportVariable(EV); + break; + } + case RSExportType::ExportClassVector: { + genVectorTypeExportVariable(EV); + break; + } + case RSExportType::ExportClassMatrix: { + genMatrixTypeExportVariable(EV); + break; + } + case RSExportType::ExportClassConstantArray: { + genConstantArrayTypeExportVariable(EV); + break; + } + case RSExportType::ExportClassRecord: { + genRecordTypeExportVariable(EV); + break; + } + default: { slangAssert(false && "Unknown class of type"); } + } +} + +void RSReflectionJava::genExportFunction(const RSExportFunc *EF) { + mOut.indent() << "private final static int " << RS_EXPORT_FUNC_INDEX_PREFIX + << EF->getName() << " = " << getNextExportFuncSlot() << ";\n"; + + // invoke_*() + ArgTy Args; + + if (EF->hasParam()) { + for (RSExportFunc::const_param_iterator I = EF->params_begin(), + E = EF->params_end(); + I != E; I++) { + Args.push_back( + std::make_pair(GetTypeName((*I)->getType()), (*I)->getName())); + } + } + + if (mRSContext->getTargetAPI() >= SLANG_M_TARGET_API) { + startFunction(AM_Public, false, "Script.InvokeID", + "getInvokeID_" + EF->getName(), 0); + + mOut.indent() << "return createInvokeID(" << RS_EXPORT_FUNC_INDEX_PREFIX + << EF->getName() << ");\n"; + + endFunction(); + } + + startFunction(AM_Public, false, "void", + "invoke_" + EF->getName(/*Mangle=*/false), + // We are using un-mangled name since Java + // supports method overloading. + Args); + + if (!EF->hasParam()) { + mOut.indent() << "invoke(" << RS_EXPORT_FUNC_INDEX_PREFIX << EF->getName() + << ");\n"; + } else { + const RSExportRecordType *ERT = EF->getParamPacketType(); + std::string FieldPackerName = EF->getName() + "_fp"; + + if (genCreateFieldPacker(ERT, FieldPackerName.c_str())) + genPackVarOfType(ERT, nullptr, FieldPackerName.c_str()); + + mOut.indent() << "invoke(" << RS_EXPORT_FUNC_INDEX_PREFIX << EF->getName() + << ", " << FieldPackerName << ");\n"; + } + + endFunction(); +} + +void RSReflectionJava::genPairwiseDimCheck(const std::string &name0, + const std::string &name1) { + + mOut.indent() << "// Verify dimensions\n"; + mOut.indent() << "t0 = " << name0 << ".getType();\n"; + mOut.indent() << "t1 = " << name1 << ".getType();\n"; + mOut.indent() << "if ((t0.getCount() != t1.getCount()) ||\n"; + mOut.indent() << " (t0.getX() != t1.getX()) ||\n"; + mOut.indent() << " (t0.getY() != t1.getY()) ||\n"; + mOut.indent() << " (t0.getZ() != t1.getZ()) ||\n"; + mOut.indent() << " (t0.hasFaces() != t1.hasFaces()) ||\n"; + mOut.indent() << " (t0.hasMipmaps() != t1.hasMipmaps())) {\n"; + mOut.indent() << " throw new RSRuntimeException(\"Dimension mismatch " + << "between parameters " << name0 << " and " << name1 + << "!\");\n"; + mOut.indent() << "}\n\n"; +} + +void RSReflectionJava::genNullArrayCheck(const std::string &ArrayName) { + mOut.indent() << "// Verify that \"" << ArrayName << "\" is non-null.\n"; + mOut.indent() << "if (" << ArrayName << " == null) {\n"; + mOut.indent() << " throw new RSIllegalArgumentException(\"Array \\\"" + << ArrayName << "\\\" is null!\");\n"; + mOut.indent() << "}\n"; +} + +void RSReflectionJava::genVectorLengthCompatibilityCheck(const std::string &ArrayName, + unsigned VecSize) { + mOut.indent() << "// Verify that the array length is a multiple of the vector size.\n"; + mOut.indent() << "if (" << ArrayName << ".length % " << std::to_string(VecSize) + << " != 0) {\n"; + mOut.indent() << " throw new RSIllegalArgumentException(\"Array \\\"" << ArrayName + << "\\\" is not a multiple of " << std::to_string(VecSize) + << " in length!\");\n"; + mOut.indent() << "}\n"; +} + +void RSReflectionJava::genExportForEach(const RSExportForEach *EF) { + if (EF->isDummyRoot()) { + // Skip reflection for dummy root() kernels. Note that we have to + // advance the next slot number for ForEach, however. + mOut.indent() << "//private final static int " + << RS_EXPORT_FOREACH_INDEX_PREFIX << EF->getName() << " = " + << getNextExportForEachSlot() << ";\n"; + return; + } + + mOut.indent() << "private final static int " << RS_EXPORT_FOREACH_INDEX_PREFIX + << EF->getName() << " = " << getNextExportForEachSlot() + << ";\n"; + + // forEach_*() + ArgTy Args; + bool HasAllocation = false; // at least one in/out allocation? + + const RSExportForEach::InVec &Ins = EF->getIns(); + const RSExportForEach::InTypeVec &InTypes = EF->getInTypes(); + const RSExportType *OET = EF->getOutType(); + + if (Ins.size() == 1) { + HasAllocation = true; + Args.push_back(std::make_pair("Allocation", "ain")); + + } else if (Ins.size() > 1) { + HasAllocation = true; + for (RSExportForEach::InIter BI = Ins.begin(), EI = Ins.end(); BI != EI; + BI++) { + + Args.push_back(std::make_pair("Allocation", + "ain_" + (*BI)->getName().str())); + } + } + + if (EF->hasOut() || EF->hasReturn()) { + HasAllocation = true; + Args.push_back(std::make_pair("Allocation", "aout")); + } + + const RSExportRecordType *ERT = EF->getParamPacketType(); + if (ERT) { + for (RSExportForEach::const_param_iterator I = EF->params_begin(), + E = EF->params_end(); + I != E; I++) { + Args.push_back( + std::make_pair(GetTypeName((*I)->getType()), (*I)->getName())); + } + } + + if (mRSContext->getTargetAPI() >= SLANG_JB_MR1_TARGET_API) { + startFunction(AM_Public, false, "Script.KernelID", + "getKernelID_" + EF->getName(), 0); + + // TODO: add element checking + mOut.indent() << "return createKernelID(" << RS_EXPORT_FOREACH_INDEX_PREFIX + << EF->getName() << ", " << EF->getSignatureMetadata() + << ", null, null);\n"; + + endFunction(); + } + + if (mRSContext->getTargetAPI() >= SLANG_JB_MR2_TARGET_API) { + if (HasAllocation) { + startFunction(AM_Public, false, "void", "forEach_" + EF->getName(), Args); + + mOut.indent() << "forEach_" << EF->getName(); + mOut << "("; + + if (Ins.size() == 1) { + mOut << "ain, "; + + } else if (Ins.size() > 1) { + for (RSExportForEach::InIter BI = Ins.begin(), EI = Ins.end(); BI != EI; + BI++) { + + mOut << "ain_" << (*BI)->getName().str() << ", "; + } + } + + if (EF->hasOut() || EF->hasReturn()) { + mOut << "aout, "; + } + + if (EF->hasUsrData()) { + mOut << Args.back().second << ", "; + } + + // No clipped bounds to pass in. + mOut << "null);\n"; + + endFunction(); + } + + // Add the clipped kernel parameters to the Args list. + Args.push_back(std::make_pair("Script.LaunchOptions", "sc")); + } + + startFunction(AM_Public, false, "void", "forEach_" + EF->getName(), Args); + + if (InTypes.size() == 1) { + if (InTypes.front() != nullptr) { + genTypeCheck(InTypes.front(), "ain"); + } + + } else if (InTypes.size() > 1) { + size_t Index = 0; + for (RSExportForEach::InTypeIter BI = InTypes.begin(), EI = InTypes.end(); + BI != EI; BI++, ++Index) { + + if (*BI != nullptr) { + genTypeCheck(*BI, ("ain_" + Ins[Index]->getName()).str().c_str()); + } + } + } + + if (OET) { + genTypeCheck(OET, "aout"); + } + + if (Ins.size() == 1 && (EF->hasOut() || EF->hasReturn())) { + mOut.indent() << "Type t0, t1;"; + genPairwiseDimCheck("ain", "aout"); + + } else if (Ins.size() > 1) { + mOut.indent() << "Type t0, t1;"; + + std::string In0Name = "ain_" + Ins[0]->getName().str(); + + for (size_t index = 1; index < Ins.size(); ++index) { + genPairwiseDimCheck(In0Name, "ain_" + Ins[index]->getName().str()); + } + + if (EF->hasOut() || EF->hasReturn()) { + genPairwiseDimCheck(In0Name, "aout"); + } + } + + std::string FieldPackerName = EF->getName() + "_fp"; + if (ERT) { + if (genCreateFieldPacker(ERT, FieldPackerName.c_str())) { + genPackVarOfType(ERT, nullptr, FieldPackerName.c_str()); + } + } + mOut.indent() << "forEach(" << RS_EXPORT_FOREACH_INDEX_PREFIX + << EF->getName(); + + if (Ins.size() == 1) { + mOut << ", ain"; + } else if (Ins.size() > 1) { + mOut << ", new Allocation[]{ain_" << Ins[0]->getName().str(); + + for (size_t index = 1; index < Ins.size(); ++index) { + mOut << ", ain_" << Ins[index]->getName().str(); + } + + mOut << "}"; + + } else { + mOut << ", (Allocation) null"; + } + + if (EF->hasOut() || EF->hasReturn()) + mOut << ", aout"; + else + mOut << ", null"; + + if (EF->hasUsrData()) + mOut << ", " << FieldPackerName; + else + mOut << ", null"; + + if (mRSContext->getTargetAPI() >= SLANG_JB_MR2_TARGET_API) { + mOut << ", sc);\n"; + } else { + mOut << ");\n"; + } + + endFunction(); +} + +////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Reductions with certain legal result types can only be reflected for NDK, not for Java. +bool RSReflectionJava::exportableReduce(const RSExportType *ResultType) { + const RSExportType *CheckType = ResultType; + if (ResultType->getClass() == RSExportType::ExportClassConstantArray) + CheckType = static_cast<const RSExportConstantArrayType *>(ResultType)->getElementType(); + if (CheckType->getClass() == RSExportType::ExportClassRecord) { + // No Java reflection for struct until http://b/22236498 is resolved. + return false; + } + + return true; +} + +namespace { +enum MappingComment { MappingCommentWithoutType, MappingCommentWithCType }; + +// OUTPUTS +// InputParamName = name to use for input parameter +// InputMappingComment = text showing the mapping from InputParamName to the corresponding +// accumulator function parameter name (and possibly type) +// INPUTS +// NamePrefix = beginning of parameter name (e.g., "in") +// MappingComment = whether or not InputMappingComment should contain type +// ER = description of the reduction +// InIdx = which input (numbered from zero) +void getReduceInputStrings(std::string &InputParamName, std::string &InputMappingComment, + const std::string &NamePrefix, MappingComment Mapping, + const RSExportReduce *ER, size_t InIdx) { + InputParamName = NamePrefix + std::to_string(InIdx+1); + std::string TypeString; + if (Mapping == MappingCommentWithCType) { + const RSExportType *InType = ER->getAccumulatorInTypes()[InIdx]; + if (InType->getClass() == RSExportType::ExportClassRecord) { + // convertToRTD doesn't understand this type + TypeString = "/* struct <> */ "; + } else { + RSReflectionTypeData InTypeData; + ER->getAccumulatorInTypes()[InIdx]->convertToRTD(&InTypeData); + slangAssert(InTypeData.type->s_name != nullptr); + if (InTypeData.vecSize > 1) { + TypeString = InTypeData.type->s_name + std::to_string(InTypeData.vecSize) + " "; + } else { + TypeString = InTypeData.type->s_name + std::string(" "); + } + } + } + InputMappingComment = InputParamName + " = \"" + TypeString + std::string(ER->getAccumulatorIns()[InIdx]->getName()) + "\""; +} + +} // end anonymous namespace + +void RSReflectionJava::genExportReduce(const RSExportReduce *ER) { + if (!exportableReduce(ER->getResultType())) + return; + + // Generate the reflected function index. + mOut.indent() << "private final static int " << RS_EXPORT_REDUCE_INDEX_PREFIX + << ER->getNameReduce() << " = " << getNextExportReduceSlot() + << ";\n"; + + /****** remember resultSvType generation **********************************************************/ + + // Two variants of reduce_* entry points get generated. + // Array variant: + // result_<resultSvType> reduce_<name>(<devecSiIn1Type>[] in1, ..., <devecSiInNType>[] inN) + // Allocation variant: + // result_<resultSvType> reduce_<name>(Allocation in1, ..., Allocation inN) + // result_<resultSvType> reduce_<name>(Allocation in1, ..., Allocation inN, Script.LaunchOptions sc) + + genExportReduceArrayVariant(ER); + genExportReduceAllocationVariant(ER); +} + +void RSReflectionJava::genExportReduceArrayVariant(const RSExportReduce *ER) { + // Analysis of result type. Returns early if result type is not + // suitable for array method reflection. + const RSExportType *const ResultType = ER->getResultType(); + auto ResultTypeClass = ResultType->getClass(); + switch (ResultTypeClass) { + case RSExportType::ExportClassConstantArray: + case RSExportType::ExportClassMatrix: + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + // Ok + break; + + case RSExportType::ExportClassPointer: + slangAssert(!"Should not get here with pointer type"); + return; + + case RSExportType::ExportClassRecord: + // TODO: convertToRTD() cannot handle this. Why not? + return; + + default: + slangAssert(!"Unknown export class"); + return; + } + RSReflectionTypeData ResultTypeData; + ResultType->convertToRTD(&ResultTypeData); + if (!ResultTypeData.type->java_name || !ResultTypeData.type->java_array_element_name || + (ResultTypeData.vecSize > 1 && !ResultTypeData.type->rs_java_vector_prefix)) { + slangAssert(false); + return; + } + const std::string ResultTypeName = GetReduceResultTypeName(ER); + + // Analysis of inputs. Returns early if some input type is not + // suitable for array method reflection. + llvm::SmallVector<RSReflectionTypeData, 1> InsTypeData; + ArgTy Args; + const auto &Ins = ER->getAccumulatorIns(); + const auto &InTypes = ER->getAccumulatorInTypes(); + slangAssert(Ins.size() == InTypes.size()); + InsTypeData.resize(Ins.size()); + llvm::SmallVector<std::string, 1> InComments; + for (size_t InIdx = 0, InEnd = Ins.size(); InIdx < InEnd; ++InIdx) { + const RSExportType *const InType = InTypes[InIdx]; + switch (InType->getClass()) { + case RSExportType::ExportClassMatrix: + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + // Ok + break; + + case RSExportType::ExportClassConstantArray: + // No + return; + + case RSExportType::ExportClassPointer: + slangAssert(!"Should not get here with pointer type"); + return; + + case RSExportType::ExportClassRecord: + // TODO: convertToRTD() cannot handle this. Why not? + return; + + default: + slangAssert(!"Unknown export class"); + return; + } + + RSReflectionTypeData &InTypeData = InsTypeData[InIdx]; + InType->convertToRTD(&InTypeData); + if (!InTypeData.type->java_name || !InTypeData.type->java_array_element_name || + (InTypeData.vecSize > 1 && !InTypeData.type->rs_java_vector_prefix)) { + return; + } + + std::string InputParamName, InputComment; + getReduceInputStrings(InputParamName, InputComment, "in", MappingCommentWithoutType, ER, InIdx); + if (InTypeData.vecSize > 1) + InputComment += (", flattened " + std::to_string(InTypeData.vecSize) + "-vectors"); + InComments.push_back(InputComment); + + const std::string InputTypeName = std::string(InTypeData.type->java_array_element_name) + "[]"; + Args.push_back(std::make_pair(InputTypeName, InputParamName)); + } + + const std::string MethodName = "reduce_" + ER->getNameReduce(); + + // result_<resultSvType> reduce_<name>(<devecSiIn1Type>[] in1, ..., <devecSiInNType>[] inN) + + for (const std::string &InComment : InComments) + mOut.indent() << "// " << InComment << "\n"; + startFunction(AM_Public, false, ResultTypeName.c_str(), MethodName, Args); + slangAssert(Ins.size() == InTypes.size()); + slangAssert(Ins.size() == InsTypeData.size()); + slangAssert(Ins.size() == Args.size()); + std::string In1Length; + std::string InputAllocationOutgoingArgumentList; + std::vector<std::string> InputAllocationNames; + for (size_t InIdx = 0, InEnd = Ins.size(); InIdx < InEnd; ++InIdx) { + const std::string &ArgName = Args[InIdx].second; + genNullArrayCheck(ArgName); + std::string InLength = ArgName + ".length"; + const uint32_t VecSize = InsTypeData[InIdx].vecSize; + if (VecSize > 1) { + InLength += " / " + std::to_string(VecSize); + genVectorLengthCompatibilityCheck(ArgName, VecSize); + } + if (InIdx == 0) { + In1Length = InLength; + } else { + mOut.indent() << "// Verify that input array lengths are the same.\n"; + mOut.indent() << "if (" << In1Length << " != " << InLength << ") {\n"; + mOut.indent() << " throw new RSRuntimeException(\"Array length mismatch " + << "between parameters \\\"" << Args[0].second << "\\\" and \\\"" << ArgName + << "\\\"!\");\n"; + mOut.indent() << "}\n"; + } + // Create a temporary input allocation + const std::string TempName = "a" + ArgName; + mOut.indent() << "Allocation " << TempName << " = Allocation.createSized(" + << SAVED_RS_REFERENCE << ", " + << RS_ELEM_PREFIX << InTypes[InIdx]->getElementName() << ", " + << InLength << ");\n"; + mOut.indent() << TempName << ".setAutoPadding(true);\n"; + mOut.indent() << TempName << ".copyFrom(" << ArgName << ");\n"; + // ... and put that input allocation on the outgoing argument list + if (!InputAllocationOutgoingArgumentList.empty()) + InputAllocationOutgoingArgumentList += ", "; + InputAllocationOutgoingArgumentList += TempName; + // ... and keep track of it for setting result.mTempIns + InputAllocationNames.push_back(TempName); + } + + mOut << "\n"; + mOut.indent() << ResultTypeName << " result = " << MethodName << "(" << InputAllocationOutgoingArgumentList << ", null);\n"; + if (!InputAllocationNames.empty()) { + mOut.indent() << "result.mTempIns = new Allocation[]{"; + bool EmittedFirst = false; + for (const std::string &InputAllocationName : InputAllocationNames) { + if (!EmittedFirst) { + EmittedFirst = true; + } else { + mOut << ", "; + } + mOut << InputAllocationName; + } + mOut << "};\n"; + } + mOut.indent() << "return result;\n"; + endFunction(); +} + +void RSReflectionJava::genExportReduceAllocationVariant(const RSExportReduce *ER) { + const auto &Ins = ER->getAccumulatorIns(); + const auto &InTypes = ER->getAccumulatorInTypes(); + const RSExportType *ResultType = ER->getResultType(); + + llvm::SmallVector<std::string, 1> InComments; + ArgTy Args; + for (size_t InIdx = 0, InEnd = Ins.size(); InIdx < InEnd; ++InIdx) { + std::string InputParamName, InputComment; + getReduceInputStrings(InputParamName, InputComment, "ain", MappingCommentWithCType, ER, InIdx); + InComments.push_back(InputComment); + Args.push_back(std::make_pair("Allocation", InputParamName)); + } + + const std::string MethodName = "reduce_" + ER->getNameReduce(); + const std::string ResultTypeName = GetReduceResultTypeName(ER); + + // result_<resultSvType> reduce_<name>(Allocation in1, ..., Allocation inN) + + for (const std::string &InComment : InComments) + mOut.indent() << "// " << InComment << "\n"; + startFunction(AM_Public, false, ResultTypeName.c_str(), MethodName, Args); + mOut.indent() << "return " << MethodName << "("; + bool EmittedFirstArg = false; + for (const auto &Arg : Args) { + if (!EmittedFirstArg) { + EmittedFirstArg = true; + } else { + mOut << ", "; + } + mOut << Arg.second; + } + mOut << ", null);\n"; + endFunction(); + + // result_<resultSvType> reduce_<name>(Allocation in1, ..., Allocation inN, Script.LaunchOptions sc) + + static const char FormalOptionsName[] = "sc"; + Args.push_back(std::make_pair("Script.LaunchOptions", FormalOptionsName)); + for (const std::string &InComment : InComments) + mOut.indent() << "// " << InComment << "\n"; + startFunction(AM_Public, false, ResultTypeName.c_str(), MethodName, Args); + const std::string &In0Name = Args[0].second; + // Sanity-check inputs + if (Ins.size() > 1) + mOut.indent() << "Type t0, t1;\n"; + for (size_t InIdx = 0, InEnd = Ins.size(); InIdx < InEnd; ++InIdx) { + const std::string &InName = Args[InIdx].second; + genTypeCheck(InTypes[InIdx], InName.c_str()); + if (InIdx > 0) + genPairwiseDimCheck(In0Name.c_str(), InName.c_str()); + } + // Create a temporary output allocation + const char OutputAllocName[] = "aout"; + const size_t OutputAllocLength = + ResultType->getClass() == RSExportType::ExportClassConstantArray + ? static_cast<const RSExportConstantArrayType *>(ResultType)->getNumElement() + : 1; + mOut.indent() << "Allocation " << OutputAllocName << " = Allocation.createSized(" + << SAVED_RS_REFERENCE << ", " + << RS_ELEM_PREFIX << ResultType->getElementName() << ", " + << OutputAllocLength << ");\n"; + mOut.indent() << OutputAllocName << ".setAutoPadding(true);\n"; + // Call the underlying reduce entry point + mOut.indent() << "reduce(" << RS_EXPORT_REDUCE_INDEX_PREFIX << ER->getNameReduce() + << ", new Allocation[]{" << In0Name; + for (size_t InIdx = 1, InEnd = Ins.size(); InIdx < InEnd; ++InIdx) + mOut << ", " << Args[InIdx].second; + mOut << "}, " << OutputAllocName << ", " << FormalOptionsName << ");\n"; + mOut.indent() << "return new " << ResultTypeName << "(" << OutputAllocName << ");\n"; + endFunction(); +} + +namespace { + +// When we've copied the Allocation to a Java array, how do we +// further process the elements of that array? +enum MapFromAllocation { + MapFromAllocationTrivial, // no further processing + MapFromAllocationPositive, // need to ensure elements are positive (range check) + MapFromAllocationBoolean, // need to convert elements from byte to boolean + MapFromAllocationPromote // need to zero extend elements +}; + +// Return Java expression that maps from an Allocation element to a Java non-vector result. +// +// MFA = mapping kind +// ArrayElementTypeName = type of InVal (having been copied out of Allocation to Java array) +// ReflectedScalarTypeName = type of mapped value +// InVal = input value that must be mapped +// +std::string genReduceResultMapping(MapFromAllocation MFA, + const std::string &ArrayElementTypeName, + const std::string &ReflectedScalarTypeName, + const char *InVal) { + switch (MFA) { + default: + slangAssert(!"Unknown MapFromAllocation"); + // and fall through + case MapFromAllocationPositive: // range checking must be done separately + case MapFromAllocationTrivial: + return InVal; + case MapFromAllocationBoolean: + return std::string(InVal) + std::string(" != 0"); + case MapFromAllocationPromote: + return ZeroExtendValue(InVal, + ArrayElementTypeName, + ReflectedScalarTypeName); + } +} + +// Return Java expression that maps from an Allocation element to a Java vector result. +// +// MFA = mapping kind +// ArrayElementTypeName = type of InVal (having been copied out of Allocation to Java array) +// ReflectedScalarTypeName = type of mapped value +// VectorTypeName = type of vector +// VectorElementCount = number of elements in the vector +// InArray = input array containing vector elements +// InIdx = index of first vector element within InArray (or nullptr, if 0) +// +std::string genReduceResultVectorMapping(MapFromAllocation MFA, + const std::string &ArrayElementTypeName, + const std::string &ReflectedScalarTypeName, + const std::string &VectorTypeName, + unsigned VectorElementCount, + const char *InArray, const char *InIdx = nullptr) { + std::string result = "new " + VectorTypeName + "("; + for (unsigned VectorElementIdx = 0; VectorElementIdx < VectorElementCount; ++VectorElementIdx) { + if (VectorElementIdx) + result += ", "; + + std::string ArrayElementName = std::string(InArray) + "["; + if (InIdx) + ArrayElementName += std::string(InIdx) + "+"; + ArrayElementName += std::to_string(VectorElementIdx) + "]"; + + result += genReduceResultMapping(MFA, ArrayElementTypeName, ReflectedScalarTypeName, + ArrayElementName.c_str()); + } + result += ")"; + return result; +} + +void genReduceResultRangeCheck(GeneratedFile &Out, const char *InVal) { + Out.indent() << "if (" << InVal << " < 0)\n"; + Out.indent() << " throw new RSRuntimeException(\"Result is not representible in Java\");\n"; +} + +} // end anonymous namespace + +void RSReflectionJava::genExportReduceResultType(const RSExportType *ResultType) { + if (!exportableReduce(ResultType)) + return; + + const std::string ClassName = GetReduceResultTypeName(ResultType); + const std::string GetMethodReturnTypeName = GetTypeName(ResultType); + mOut.indent() << "// To obtain the result, invoke get(), which blocks\n"; + mOut.indent() << "// until the asynchronously-launched operation has completed.\n"; + mOut.indent() << "public static class " << ClassName; + mOut.startBlock(); + startFunction(AM_Public, false, GetMethodReturnTypeName.c_str(), "get", 0); + + RSReflectionTypeData TypeData; + ResultType->convertToRTD(&TypeData); + + const std::string UnbracketedResultTypeName = + GetTypeName(ResultType, TypeNameDefault & ~TypeNameWithConstantArrayBrackets); + const std::string ReflectedScalarTypeName = TypeData.type->java_name; + // Note: MATRIX* types do not have a java_array_element_name + const std::string ArrayElementTypeName = + TypeData.type->java_array_element_name + ? std::string(TypeData.type->java_array_element_name) + : ReflectedScalarTypeName; + + MapFromAllocation MFA = MapFromAllocationTrivial; + if (std::string(TypeData.type->rs_type) == "UNSIGNED_64") + MFA = MapFromAllocationPositive; + else if (ReflectedScalarTypeName == "boolean") + MFA = MapFromAllocationBoolean; + else if (ReflectedScalarTypeName != ArrayElementTypeName) + MFA = MapFromAllocationPromote; + + mOut.indent() << "if (!mGotResult)"; + mOut.startBlock(); + + if (TypeData.vecSize == 1) { // result type is non-vector + // <ArrayElementType>[] outArray = new <ArrayElementType>[1]; + // mOut.copyTo(outArray); + mOut.indent() << ArrayElementTypeName << "[] outArray = new " << ArrayElementTypeName + << "[" << std::max(TypeData.arraySize, 1U) << "];\n"; + mOut.indent() << "mOut.copyTo(outArray);\n"; + if (TypeData.arraySize == 0) { // result type is non-array non-vector + // mResult = outArray[0]; // but there are several special cases + if (MFA == MapFromAllocationPositive) + genReduceResultRangeCheck(mOut, "outArray[0]"); + mOut.indent() << "mResult = " + << genReduceResultMapping(MFA, ArrayElementTypeName, ReflectedScalarTypeName, + "outArray[0]") + << ";\n"; + } else { // result type is array of non-vector + if (MFA == MapFromAllocationTrivial) { + // mResult = outArray; + mOut.indent() << "mResult = outArray;\n"; + } else { + // <ResultType> result = new <UnbracketedResultType>[<ArrayElementCount>]; + // for (unsigned Idx = 0; Idx < <ArrayElementCount>; ++Idx) + // result[Idx] = <Transform>(outArray[Idx]); + // mResult = result; // but there are several special cases + if (MFA != MapFromAllocationPositive) { + mOut.indent() << GetTypeName(ResultType) << " result = new " + << UnbracketedResultTypeName + << "[" << TypeData.arraySize << "];\n"; + } + mOut.indent() << "for (int Idx = 0; Idx < " << TypeData.arraySize << "; ++Idx)"; + mOut.startBlock(); + if (MFA == MapFromAllocationPositive) { + genReduceResultRangeCheck(mOut, "outArray[Idx]"); + } else { + mOut.indent() << "result[Idx] = " + << genReduceResultMapping(MFA, ArrayElementTypeName, ReflectedScalarTypeName, + "outArray[Idx]") + << ";\n"; + } + mOut.endBlock(); + mOut.indent() << "mResult = " << (MFA == MapFromAllocationPositive ? "outArray" : "result") << ";\n"; + } + } + } else { // result type is vector or array of vector + // <ArrayElementType>[] outArray = new <ArrayElementType>[<VectorElementCount> * <ArrayElementCount>]; + // mOut.copyTo(outArray); + const unsigned VectorElementCount = TypeData.vecSize; + const unsigned OutArrayElementCount = VectorElementCount * std::max(TypeData.arraySize, 1U); + mOut.indent() << ArrayElementTypeName << "[] outArray = new " << ArrayElementTypeName + << "[" << OutArrayElementCount << "];\n"; + mOut.indent() << "mOut.copyTo(outArray);\n"; + if (MFA == MapFromAllocationPositive) { + mOut.indent() << "for (int Idx = 0; Idx < " << OutArrayElementCount << "; ++Idx)"; + mOut.startBlock(); + genReduceResultRangeCheck(mOut, "outArray[Idx]"); + mOut.endBlock(); + } + if (TypeData.arraySize == 0) { // result type is vector + // mResult = new <ResultType>(outArray[0], outArray[1] ...); // but there are several special cases + mOut.indent() << "mResult = " + << genReduceResultVectorMapping(MFA, + ArrayElementTypeName, ReflectedScalarTypeName, + GetTypeName(ResultType), VectorElementCount, + "outArray") + << ";\n"; + } else { // result type is array of vector + // <ResultType> result = new <UnbracketedResultType>[<ArrayElementCount>]; + // for (unsigned Idx = 0; Idx < <ArrayElementCount>; ++Idx) + // result[Idx] = new <UnbracketedResultType>(outArray[<ArrayElementCount>*Idx+0], + // outArray[<ArrayElementCount>*Idx+1]...); + // mResult = result; // but there are several special cases + mOut.indent() << GetTypeName(ResultType) << " result = new " + << UnbracketedResultTypeName + << "[" << TypeData.arraySize << "];\n"; + mOut.indent() << "for (int Idx = 0; Idx < " << TypeData.arraySize << "; ++Idx)"; + mOut.startBlock(); + mOut.indent() << "result[Idx] = " + << genReduceResultVectorMapping(MFA, + ArrayElementTypeName, ReflectedScalarTypeName, + UnbracketedResultTypeName, VectorElementCount, + "outArray", (std::to_string(VectorElementCount) + "*Idx").c_str()) + << ";\n"; + mOut.endBlock(); + mOut.indent() << "mResult = result;\n"; + } + } + + mOut.indent() << "mOut.destroy();\n"; + mOut.indent() << "mOut = null; // make Java object eligible for garbage collection\n"; + mOut.indent() << "if (mTempIns != null)"; + mOut.startBlock(); + mOut.indent() << "for (Allocation tempIn : mTempIns)"; + mOut.startBlock(); + mOut.indent() << "tempIn.destroy();\n"; + mOut.endBlock(); + mOut.indent() << "mTempIns = null; // make Java objects eligible for garbage collection\n"; + mOut.endBlock(); + mOut.indent() << "mGotResult = true;\n"; + mOut.endBlock(); + + mOut.indent() << "return mResult;\n"; + endFunction(); + + startFunction(AM_Private, false, nullptr, ClassName, 1, "Allocation", "out"); + // TODO: Generate allocation type check and size check? Or move + // responsibility for instantiating the Allocation here, instead of + // the reduce_* method? + mOut.indent() << "mTempIns = null;\n"; + mOut.indent() << "mOut = out;\n"; + mOut.indent() << "mGotResult = false;\n"; + endFunction(); + mOut.indent() << "private Allocation[] mTempIns;\n"; + mOut.indent() << "private Allocation mOut;\n"; + // TODO: If result is reference type rather than primitive type, we + // could omit mGotResult and use mResult==null to indicate that we + // haven't obtained the result yet. + mOut.indent() << "private boolean mGotResult;\n"; + mOut.indent() << "private " << GetMethodReturnTypeName << " mResult;\n"; + mOut.endBlock(); +} + +////////////////////////////////////////////////////////////////////////////////////////////////////// + +void RSReflectionJava::genTypeInstanceFromPointer(const RSExportType *ET) { + if (ET->getClass() == RSExportType::ExportClassPointer) { + // For pointer parameters to original forEach kernels. + const RSExportPointerType *EPT = + static_cast<const RSExportPointerType *>(ET); + genTypeInstance(EPT->getPointeeType()); + } else { + // For handling pass-by-value kernel parameters. + genTypeInstance(ET); + } +} + +void RSReflectionJava::genTypeInstance(const RSExportType *ET) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + case RSExportType::ExportClassConstantArray: { + std::string TypeName = ET->getElementName(); + if (addTypeNameForElement(TypeName)) { + mOut.indent() << RS_ELEM_PREFIX << TypeName << " = Element." << TypeName + << "(rs);\n"; + } + break; + } + + case RSExportType::ExportClassRecord: { + std::string ClassName = ET->getElementName(); + if (addTypeNameForElement(ClassName)) { + mOut.indent() << RS_ELEM_PREFIX << ClassName << " = " << ClassName + << ".createElement(rs);\n"; + } + break; + } + + default: + break; + } +} + +void RSReflectionJava::genFieldPackerInstance(const RSExportType *ET) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + case RSExportType::ExportClassConstantArray: + case RSExportType::ExportClassRecord: { + std::string TypeName = ET->getElementName(); + addTypeNameForFieldPacker(TypeName); + break; + } + + default: + break; + } +} + +void RSReflectionJava::genTypeCheck(const RSExportType *ET, + const char *VarName) { + mOut.indent() << "// check " << VarName << "\n"; + + if (ET->getClass() == RSExportType::ExportClassPointer) { + const RSExportPointerType *EPT = + static_cast<const RSExportPointerType *>(ET); + ET = EPT->getPointeeType(); + } + + std::string TypeName; + + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + case RSExportType::ExportClassRecord: { + TypeName = ET->getElementName(); + break; + } + + default: + break; + } + + if (!TypeName.empty()) { + mOut.indent() << "if (!" << VarName + << ".getType().getElement().isCompatible(" RS_ELEM_PREFIX + << TypeName << ")) {\n"; + mOut.indent() << " throw new RSRuntimeException(\"Type mismatch with " + << TypeName << "!\");\n"; + mOut.indent() << "}\n"; + } +} + +void RSReflectionJava::genPrimitiveTypeExportVariable(const RSExportVar *EV) { + slangAssert( + (EV->getType()->getClass() == RSExportType::ExportClassPrimitive) && + "Variable should be type of primitive here"); + + const RSExportPrimitiveType *EPT = + static_cast<const RSExportPrimitiveType *>(EV->getType()); + std::string TypeName = GetTypeName(EPT); + const std::string &VarName = EV->getName(); + + genPrivateExportVariable(TypeName, EV->getName()); + + if (EV->isConst()) { + mOut.indent() << "public final static " << TypeName + << " " RS_EXPORT_VAR_CONST_PREFIX << VarName << " = "; + const clang::APValue &Val = EV->getInit(); + genInitValue(Val, EPT->getType() == DataTypeBoolean); + mOut << ";\n"; + } else { + // set_*() + // This must remain synchronized, since multiple Dalvik threads may + // be calling setters. + startFunction(AM_PublicSynchronized, false, "void", "set_" + VarName, 1, + TypeName.c_str(), "v"); + if ((EPT->getElementSizeInBytes() < 4) || EV->isUnsigned()) { + // We create/cache a per-type FieldPacker. This allows us to reuse the + // validation logic (for catching negative inputs from Dalvik, as well + // as inputs that are too large to be represented in the unsigned type). + // Sub-integer types are also handled specially here, so that we don't + // overwrite bytes accidentally. + std::string ElemName = EPT->getElementName(); + std::string FPName; + FPName = RS_FP_PREFIX + ElemName; + mOut.indent() << "if (" << FPName << "!= null) {\n"; + mOut.increaseIndent(); + mOut.indent() << FPName << ".reset();\n"; + mOut.decreaseIndent(); + mOut.indent() << "} else {\n"; + mOut.increaseIndent(); + mOut.indent() << FPName << " = new FieldPacker(" << EPT->getElementSizeInBytes() + << ");\n"; + mOut.decreaseIndent(); + mOut.indent() << "}\n"; + + genPackVarOfType(EPT, "v", FPName.c_str()); + mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName + << ", " << FPName << ");\n"; + } else { + mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName + << ", v);\n"; + } + + // Dalvik update comes last, since the input may be invalid (and hence + // throw an exception). + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; + + endFunction(); + } + + genGetExportVariable(TypeName, VarName); + genGetFieldID(VarName); +} + +void RSReflectionJava::genInitValue(const clang::APValue &Val, bool asBool) { + switch (Val.getKind()) { + case clang::APValue::Int: { + const llvm::APInt &api = Val.getInt(); + if (asBool) { + mOut << ((api.getSExtValue() == 0) ? "false" : "true"); + } else { + // TODO: Handle unsigned correctly + mOut << api.getSExtValue(); + if (api.getBitWidth() > 32) { + mOut << "L"; + } + } + break; + } + + case clang::APValue::Float: { + const llvm::APFloat &apf = Val.getFloat(); + llvm::SmallString<30> s; + apf.toString(s); + mOut << s.c_str(); + if (&apf.getSemantics() == &llvm::APFloat::IEEEsingle) { + if (s.count('.') == 0) { + mOut << ".f"; + } else { + mOut << "f"; + } + } + break; + } + + case clang::APValue::ComplexInt: + case clang::APValue::ComplexFloat: + case clang::APValue::LValue: + case clang::APValue::Vector: { + slangAssert(false && "Primitive type cannot have such kind of initializer"); + break; + } + + default: { slangAssert(false && "Unknown kind of initializer"); } + } +} + +void RSReflectionJava::genPointerTypeExportVariable(const RSExportVar *EV) { + const RSExportType *ET = EV->getType(); + const RSExportType *PointeeType; + + slangAssert((ET->getClass() == RSExportType::ExportClassPointer) && + "Variable should be type of pointer here"); + + PointeeType = static_cast<const RSExportPointerType *>(ET)->getPointeeType(); + std::string TypeName = GetTypeName(ET); + const std::string &VarName = EV->getName(); + + genPrivateExportVariable(TypeName, VarName); + + // bind_*() + startFunction(AM_Public, false, "void", "bind_" + VarName, 1, + TypeName.c_str(), "v"); + + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; + mOut.indent() << "if (v == null) bindAllocation(null, " + << RS_EXPORT_VAR_INDEX_PREFIX << VarName << ");\n"; + + if (PointeeType->getClass() == RSExportType::ExportClassRecord) { + mOut.indent() << "else bindAllocation(v.getAllocation(), " + << RS_EXPORT_VAR_INDEX_PREFIX << VarName << ");\n"; + } else { + mOut.indent() << "else bindAllocation(v, " << RS_EXPORT_VAR_INDEX_PREFIX + << VarName << ");\n"; + } + + endFunction(); + + genGetExportVariable(TypeName, VarName); +} + +void RSReflectionJava::genVectorTypeExportVariable(const RSExportVar *EV) { + slangAssert((EV->getType()->getClass() == RSExportType::ExportClassVector) && + "Variable should be type of vector here"); + + std::string TypeName = GetTypeName(EV->getType()); + std::string VarName = EV->getName(); + + genPrivateExportVariable(TypeName, VarName); + genSetExportVariable(TypeName, EV, 1); + genGetExportVariable(TypeName, VarName); + genGetFieldID(VarName); +} + +void RSReflectionJava::genMatrixTypeExportVariable(const RSExportVar *EV) { + slangAssert((EV->getType()->getClass() == RSExportType::ExportClassMatrix) && + "Variable should be type of matrix here"); + + const RSExportType *ET = EV->getType(); + std::string TypeName = GetTypeName(ET); + const std::string &VarName = EV->getName(); + + genPrivateExportVariable(TypeName, VarName); + + // set_*() + if (!EV->isConst()) { + const char *FieldPackerName = "fp"; + startFunction(AM_PublicSynchronized, false, "void", "set_" + VarName, 1, + TypeName.c_str(), "v"); + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; + + if (genCreateFieldPacker(ET, FieldPackerName)) + genPackVarOfType(ET, "v", FieldPackerName); + mOut.indent() << "setVar(" RS_EXPORT_VAR_INDEX_PREFIX << VarName << ", " + << FieldPackerName << ");\n"; + + endFunction(); + } + + genGetExportVariable(TypeName, VarName); + genGetFieldID(VarName); +} + +void +RSReflectionJava::genConstantArrayTypeExportVariable(const RSExportVar *EV) { + const RSExportType *const ET = EV->getType(); + slangAssert( + (ET->getClass() == RSExportType::ExportClassConstantArray) && + "Variable should be type of constant array here"); + + std::string TypeName = GetTypeName(EV->getType()); + std::string VarName = EV->getName(); + + genPrivateExportVariable(TypeName, VarName); + genSetExportVariable(TypeName, EV, static_cast<const RSExportConstantArrayType *>(ET)->getNumElement()); + genGetExportVariable(TypeName, VarName); + genGetFieldID(VarName); +} + +void RSReflectionJava::genRecordTypeExportVariable(const RSExportVar *EV) { + slangAssert((EV->getType()->getClass() == RSExportType::ExportClassRecord) && + "Variable should be type of struct here"); + + std::string TypeName = GetTypeName(EV->getType()); + std::string VarName = EV->getName(); + + genPrivateExportVariable(TypeName, VarName); + genSetExportVariable(TypeName, EV, 1); + genGetExportVariable(TypeName, VarName); + genGetFieldID(VarName); +} + +void RSReflectionJava::genPrivateExportVariable(const std::string &TypeName, + const std::string &VarName) { + mOut.indent() << "private " << TypeName << " " << RS_EXPORT_VAR_PREFIX + << VarName << ";\n"; +} + +// Dimension = array element count; otherwise, 1. +void RSReflectionJava::genSetExportVariable(const std::string &TypeName, + const RSExportVar *EV, + unsigned Dimension) { + if (!EV->isConst()) { + const char *FieldPackerName = "fp"; + const std::string &VarName = EV->getName(); + const RSExportType *ET = EV->getType(); + startFunction(AM_PublicSynchronized, false, "void", "set_" + VarName, 1, + TypeName.c_str(), "v"); + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; + + if (genCreateFieldPacker(ET, FieldPackerName)) + genPackVarOfType(ET, "v", FieldPackerName); + + if (mRSContext->getTargetAPI() < SLANG_JB_TARGET_API) { + // Legacy apps must use the old setVar() without Element/dim components. + mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName + << ", " << FieldPackerName << ");\n"; + } else { + // We only have support for one-dimensional array reflection today, + // but the entry point (i.e. setVar()) takes an array of dimensions. + mOut.indent() << "int []__dimArr = new int[1];\n"; + mOut.indent() << "__dimArr[0] = " << Dimension << ";\n"; + mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName + << ", " << FieldPackerName << ", " << RS_ELEM_PREFIX + << ET->getElementName() << ", __dimArr);\n"; + } + + endFunction(); + } +} + +void RSReflectionJava::genGetExportVariable(const std::string &TypeName, + const std::string &VarName) { + startFunction(AM_Public, false, TypeName.c_str(), "get_" + VarName, 0); + + mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << VarName << ";\n"; + + endFunction(); +} + +void RSReflectionJava::genGetFieldID(const std::string &VarName) { + // We only generate getFieldID_*() for non-Pointer (bind) types. + if (mRSContext->getTargetAPI() >= SLANG_JB_MR1_TARGET_API) { + startFunction(AM_Public, false, "Script.FieldID", "getFieldID_" + VarName, + 0); + + mOut.indent() << "return createFieldID(" << RS_EXPORT_VAR_INDEX_PREFIX + << VarName << ", null);\n"; + + endFunction(); + } +} + +/******************* Methods to generate script class /end *******************/ + +bool RSReflectionJava::genCreateFieldPacker(const RSExportType *ET, + const char *FieldPackerName) { + size_t AllocSize = ET->getAllocSize(); + if (AllocSize > 0) + mOut.indent() << "FieldPacker " << FieldPackerName << " = new FieldPacker(" + << AllocSize << ");\n"; + else + return false; + return true; +} + +void RSReflectionJava::genPackVarOfType(const RSExportType *ET, + const char *VarName, + const char *FieldPackerName) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: { + mOut.indent() << FieldPackerName << "." + << GetPackerAPIName( + static_cast<const RSExportPrimitiveType *>(ET)) << "(" + << VarName << ");\n"; + break; + } + case RSExportType::ExportClassPointer: { + // Must reflect as type Allocation in Java + const RSExportType *PointeeType = + static_cast<const RSExportPointerType *>(ET)->getPointeeType(); + + if (PointeeType->getClass() != RSExportType::ExportClassRecord) { + mOut.indent() << FieldPackerName << ".addI32(" << VarName + << ".getPtr());\n"; + } else { + mOut.indent() << FieldPackerName << ".addI32(" << VarName + << ".getAllocation().getPtr());\n"; + } + break; + } + case RSExportType::ExportClassMatrix: { + mOut.indent() << FieldPackerName << ".addMatrix(" << VarName << ");\n"; + break; + } + case RSExportType::ExportClassConstantArray: { + const RSExportConstantArrayType *ECAT = + static_cast<const RSExportConstantArrayType *>(ET); + + // TODO(zonr): more elegant way. Currently, we obtain the unique index + // variable (this method involves recursive call which means + // we may have more than one level loop, therefore we can't + // always use the same index variable name here) name given + // in the for-loop from counting the '.' in @VarName. + unsigned Level = 0; + size_t LastDotPos = 0; + std::string ElementVarName(VarName); + + while (LastDotPos != std::string::npos) { + LastDotPos = ElementVarName.find_first_of('.', LastDotPos + 1); + Level++; + } + std::string IndexVarName("ct"); + IndexVarName.append(llvm::utostr_32(Level)); + + mOut.indent() << "for (int " << IndexVarName << " = 0; " << IndexVarName + << " < " << ECAT->getNumElement() << "; " << IndexVarName << "++)"; + mOut.startBlock(); + + ElementVarName.append("[" + IndexVarName + "]"); + genPackVarOfType(ECAT->getElementType(), ElementVarName.c_str(), + FieldPackerName); + + mOut.endBlock(); + break; + } + case RSExportType::ExportClassRecord: { + const RSExportRecordType *ERT = static_cast<const RSExportRecordType *>(ET); + // Relative pos from now on in field packer + unsigned Pos = 0; + + for (RSExportRecordType::const_field_iterator I = ERT->fields_begin(), + E = ERT->fields_end(); + I != E; I++) { + const RSExportRecordType::Field *F = *I; + std::string FieldName; + size_t FieldOffset = F->getOffsetInParent(); + const RSExportType *T = F->getType(); + size_t FieldStoreSize = T->getStoreSize(); + size_t FieldAllocSize = T->getAllocSize(); + + if (VarName != nullptr) + FieldName = VarName + ("." + F->getName()); + else + FieldName = F->getName(); + + if (FieldOffset > Pos) { + mOut.indent() << FieldPackerName << ".skip(" << (FieldOffset - Pos) + << ");\n"; + } + + genPackVarOfType(F->getType(), FieldName.c_str(), FieldPackerName); + + // There is padding in the field type + if (FieldAllocSize > FieldStoreSize) { + mOut.indent() << FieldPackerName << ".skip(" + << (FieldAllocSize - FieldStoreSize) << ");\n"; + } + + Pos = FieldOffset + FieldAllocSize; + } + + // There maybe some padding after the struct + if (ERT->getAllocSize() > Pos) { + mOut.indent() << FieldPackerName << ".skip(" << ERT->getAllocSize() - Pos + << ");\n"; + } + break; + } + default: { slangAssert(false && "Unknown class of type"); } + } +} + +void RSReflectionJava::genAllocateVarOfType(const RSExportType *T, + const std::string &VarName) { + switch (T->getClass()) { + case RSExportType::ExportClassPrimitive: { + // Primitive type like int in Java has its own storage once it's declared. + // + // FIXME: Should we allocate storage for RS object? + // if (static_cast<const RSExportPrimitiveType *>(T)->isRSObjectType()) + // mOut.indent() << VarName << " = new " << GetTypeName(T) << "();\n"; + break; + } + case RSExportType::ExportClassPointer: { + // Pointer type is an instance of Allocation or a TypeClass whose value is + // expected to be assigned by programmer later in Java program. Therefore + // we don't reflect things like [VarName] = new Allocation(); + mOut.indent() << VarName << " = null;\n"; + break; + } + case RSExportType::ExportClassConstantArray: { + const RSExportConstantArrayType *ECAT = + static_cast<const RSExportConstantArrayType *>(T); + const RSExportType *ElementType = ECAT->getElementType(); + + mOut.indent() << VarName << " = new " << GetTypeName(ElementType) << "[" + << ECAT->getNumElement() << "];\n"; + + // Primitive type element doesn't need allocation code. + if (ElementType->getClass() != RSExportType::ExportClassPrimitive) { + mOut.indent() << "for (int $ct = 0; $ct < " << ECAT->getNumElement() + << "; $ct++)"; + mOut.startBlock(); + + std::string ElementVarName(VarName); + ElementVarName.append("[$ct]"); + genAllocateVarOfType(ElementType, ElementVarName); + + mOut.endBlock(); + } + break; + } + case RSExportType::ExportClassVector: + case RSExportType::ExportClassMatrix: + case RSExportType::ExportClassRecord: { + mOut.indent() << VarName << " = new " << GetTypeName(T) << "();\n"; + break; + } + } +} + +void RSReflectionJava::genNewItemBufferIfNull(const char *Index) { + mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME " == null) "; + mOut << RS_TYPE_ITEM_BUFFER_NAME << " = new " << RS_TYPE_ITEM_CLASS_NAME + << "[getType().getX() /* count */];\n"; + if (Index != nullptr) { + mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME << "[" << Index + << "] == null) "; + mOut << RS_TYPE_ITEM_BUFFER_NAME << "[" << Index << "] = new " + << RS_TYPE_ITEM_CLASS_NAME << "();\n"; + } +} + +void RSReflectionJava::genNewItemBufferPackerIfNull() { + mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " == null) "; + mOut << RS_TYPE_ITEM_BUFFER_PACKER_NAME " = new FieldPacker(" + << mItemSizeof << " * getType().getX()/* count */);\n"; +} + +/********************** Methods to generate type class **********************/ +bool RSReflectionJava::genTypeClass(const RSExportRecordType *ERT, + std::string &ErrorMsg) { + std::string ClassName = ERT->getElementName(); + std::string superClassName = getRSPackageName(); + superClassName += RS_TYPE_CLASS_SUPER_CLASS_NAME; + + if (!startClass(AM_Public, false, ClassName, superClassName.c_str(), + ErrorMsg)) + return false; + + mGeneratedFileNames->push_back(ClassName); + + genTypeItemClass(ERT); + + // Declare item buffer and item buffer packer + mOut.indent() << "private " << RS_TYPE_ITEM_CLASS_NAME << " " + << RS_TYPE_ITEM_BUFFER_NAME << "[];\n"; + mOut.indent() << "private FieldPacker " << RS_TYPE_ITEM_BUFFER_PACKER_NAME + << ";\n"; + mOut.indent() << "private static java.lang.ref.WeakReference<Element> " + << RS_TYPE_ELEMENT_REF_NAME + << " = new java.lang.ref.WeakReference<Element>(null);\n"; + + genTypeClassConstructor(ERT); + genTypeClassCopyToArrayLocal(ERT); + genTypeClassCopyToArray(ERT); + genTypeClassItemSetter(ERT); + genTypeClassItemGetter(ERT); + genTypeClassComponentSetter(ERT); + genTypeClassComponentGetter(ERT); + genTypeClassCopyAll(ERT); + if (!mRSContext->isCompatLib()) { + // Skip the resize method if we are targeting a compatibility library. + genTypeClassResize(); + } + + endClass(); + + resetFieldIndex(); + clearFieldIndexMap(); + + return true; +} + +void RSReflectionJava::genTypeItemClass(const RSExportRecordType *ERT) { + mOut.indent() << "static public class " RS_TYPE_ITEM_CLASS_NAME; + mOut.startBlock(); + + // Sizeof should not be exposed for 64-bit; it is not accurate + if (mRSContext->getTargetAPI() < 21) { + mOut.indent() << "public static final int sizeof = " << ERT->getAllocSize() + << ";\n"; + } + + // Member elements + mOut << "\n"; + for (RSExportRecordType::const_field_iterator FI = ERT->fields_begin(), + FE = ERT->fields_end(); + FI != FE; FI++) { + mOut.indent() << GetTypeName((*FI)->getType()) << " " << (*FI)->getName() + << ";\n"; + } + + // Constructor + mOut << "\n"; + mOut.indent() << RS_TYPE_ITEM_CLASS_NAME << "()"; + mOut.startBlock(); + + for (RSExportRecordType::const_field_iterator FI = ERT->fields_begin(), + FE = ERT->fields_end(); + FI != FE; FI++) { + const RSExportRecordType::Field *F = *FI; + genAllocateVarOfType(F->getType(), F->getName()); + } + + // end Constructor + mOut.endBlock(); + + // end Item class + mOut.endBlock(); +} + +void RSReflectionJava::genTypeClassConstructor(const RSExportRecordType *ERT) { + const char *RenderScriptVar = "rs"; + + startFunction(AM_Public, true, "Element", "createElement", 1, "RenderScript", + RenderScriptVar); + + // TODO(all): Fix weak-refs + multi-context issue. + // mOut.indent() << "Element e = " << RS_TYPE_ELEMENT_REF_NAME + // << ".get();\n"; + // mOut.indent() << "if (e != null) return e;\n"; + RSReflectionJavaElementBuilder builder("eb", ERT, RenderScriptVar, &mOut, + mRSContext, this); + builder.generate(); + + mOut.indent() << "return eb.create();\n"; + // mOut.indent() << "e = eb.create();\n"; + // mOut.indent() << RS_TYPE_ELEMENT_REF_NAME + // << " = new java.lang.ref.WeakReference<Element>(e);\n"; + // mOut.indent() << "return e;\n"; + endFunction(); + + // private with element + startFunction(AM_Private, false, nullptr, getClassName(), 1, "RenderScript", + RenderScriptVar); + mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; + mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; + mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; + endFunction(); + + // 1D without usage + startFunction(AM_Public, false, nullptr, getClassName(), 2, "RenderScript", + RenderScriptVar, "int", "count"); + + mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; + mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; + mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; + // Call init() in super class + mOut.indent() << "init(" << RenderScriptVar << ", count);\n"; + endFunction(); + + // 1D with usage + startFunction(AM_Public, false, nullptr, getClassName(), 3, "RenderScript", + RenderScriptVar, "int", "count", "int", "usages"); + + mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; + mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; + mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; + // Call init() in super class + mOut.indent() << "init(" << RenderScriptVar << ", count, usages);\n"; + endFunction(); + + // create1D with usage + startFunction(AM_Public, true, getClassName().c_str(), "create1D", 3, + "RenderScript", RenderScriptVar, "int", "dimX", "int", + "usages"); + mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" + << RenderScriptVar << ");\n"; + mOut.indent() << "obj.mAllocation = Allocation.createSized(" + "rs, obj.mElement, dimX, usages);\n"; + mOut.indent() << "return obj;\n"; + endFunction(); + + // create1D without usage + startFunction(AM_Public, true, getClassName().c_str(), "create1D", 2, + "RenderScript", RenderScriptVar, "int", "dimX"); + mOut.indent() << "return create1D(" << RenderScriptVar + << ", dimX, Allocation.USAGE_SCRIPT);\n"; + endFunction(); + + // create2D without usage + startFunction(AM_Public, true, getClassName().c_str(), "create2D", 3, + "RenderScript", RenderScriptVar, "int", "dimX", "int", "dimY"); + mOut.indent() << "return create2D(" << RenderScriptVar + << ", dimX, dimY, Allocation.USAGE_SCRIPT);\n"; + endFunction(); + + // create2D with usage + startFunction(AM_Public, true, getClassName().c_str(), "create2D", 4, + "RenderScript", RenderScriptVar, "int", "dimX", "int", "dimY", + "int", "usages"); + + mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" + << RenderScriptVar << ");\n"; + mOut.indent() << "Type.Builder b = new Type.Builder(rs, obj.mElement);\n"; + mOut.indent() << "b.setX(dimX);\n"; + mOut.indent() << "b.setY(dimY);\n"; + mOut.indent() << "Type t = b.create();\n"; + mOut.indent() << "obj.mAllocation = Allocation.createTyped(rs, t, usages);\n"; + mOut.indent() << "return obj;\n"; + endFunction(); + + // createTypeBuilder + startFunction(AM_Public, true, "Type.Builder", "createTypeBuilder", 1, + "RenderScript", RenderScriptVar); + mOut.indent() << "Element e = createElement(" << RenderScriptVar << ");\n"; + mOut.indent() << "return new Type.Builder(rs, e);\n"; + endFunction(); + + // createCustom with usage + startFunction(AM_Public, true, getClassName().c_str(), "createCustom", 3, + "RenderScript", RenderScriptVar, "Type.Builder", "tb", "int", + "usages"); + mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" + << RenderScriptVar << ");\n"; + mOut.indent() << "Type t = tb.create();\n"; + mOut.indent() << "if (t.getElement() != obj.mElement) {\n"; + mOut.indent() << " throw new RSIllegalArgumentException(" + "\"Type.Builder did not match expected element type.\");\n"; + mOut.indent() << "}\n"; + mOut.indent() << "obj.mAllocation = Allocation.createTyped(rs, t, usages);\n"; + mOut.indent() << "return obj;\n"; + endFunction(); +} + +void RSReflectionJava::genTypeClassCopyToArray(const RSExportRecordType *ERT) { + startFunction(AM_Private, false, "void", "copyToArray", 2, + RS_TYPE_ITEM_CLASS_NAME, "i", "int", "index"); + + genNewItemBufferPackerIfNull(); + mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " + << mItemSizeof << ");\n"; + + mOut.indent() << "copyToArrayLocal(i, " RS_TYPE_ITEM_BUFFER_PACKER_NAME + ");\n"; + + endFunction(); +} + +void +RSReflectionJava::genTypeClassCopyToArrayLocal(const RSExportRecordType *ERT) { + startFunction(AM_Private, false, "void", "copyToArrayLocal", 2, + RS_TYPE_ITEM_CLASS_NAME, "i", "FieldPacker", "fp"); + + genPackVarOfType(ERT, "i", "fp"); + + endFunction(); +} + +void RSReflectionJava::genTypeClassItemSetter(const RSExportRecordType *ERT) { + startFunction(AM_PublicSynchronized, false, "void", "set", 3, + RS_TYPE_ITEM_CLASS_NAME, "i", "int", "index", "boolean", + "copyNow"); + genNewItemBufferIfNull(nullptr); + mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << "[index] = i;\n"; + + mOut.indent() << "if (copyNow) "; + mOut.startBlock(); + + mOut.indent() << "copyToArray(i, index);\n"; + mOut.indent() << "FieldPacker fp = new FieldPacker(" << mItemSizeof << ");\n"; + mOut.indent() << "copyToArrayLocal(i, fp);\n"; + mOut.indent() << "mAllocation.setFromFieldPacker(index, fp);\n"; + + // End of if (copyNow) + mOut.endBlock(); + + endFunction(); +} + +void RSReflectionJava::genTypeClassItemGetter(const RSExportRecordType *ERT) { + startFunction(AM_PublicSynchronized, false, RS_TYPE_ITEM_CLASS_NAME, "get", 1, + "int", "index"); + mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME + << " == null) return null;\n"; + mOut.indent() << "return " << RS_TYPE_ITEM_BUFFER_NAME << "[index];\n"; + endFunction(); +} + +void +RSReflectionJava::genTypeClassComponentSetter(const RSExportRecordType *ERT) { + for (RSExportRecordType::const_field_iterator FI = ERT->fields_begin(), + FE = ERT->fields_end(); + FI != FE; FI++) { + const RSExportRecordType::Field *F = *FI; + size_t FieldOffset = F->getOffsetInParent(); + size_t FieldStoreSize = F->getType()->getStoreSize(); + unsigned FieldIndex = getFieldIndex(F); + + startFunction(AM_PublicSynchronized, false, "void", "set_" + F->getName(), + 3, "int", "index", GetTypeName(F->getType()).c_str(), "v", + "boolean", "copyNow"); + genNewItemBufferPackerIfNull(); + genNewItemBufferIfNull("index"); + mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << "[index]." << F->getName() + << " = v;\n"; + + mOut.indent() << "if (copyNow) "; + mOut.startBlock(); + + if (FieldOffset > 0) { + mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " + << mItemSizeof << " + " << FieldOffset + << ");\n"; + } else { + mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " + << mItemSizeof << ");\n"; + } + genPackVarOfType(F->getType(), "v", RS_TYPE_ITEM_BUFFER_PACKER_NAME); + + mOut.indent() << "FieldPacker fp = new FieldPacker(" << FieldStoreSize + << ");\n"; + genPackVarOfType(F->getType(), "v", "fp"); + mOut.indent() << "mAllocation.setFromFieldPacker(index, " << FieldIndex + << ", fp);\n"; + + // End of if (copyNow) + mOut.endBlock(); + + endFunction(); + } +} + +void +RSReflectionJava::genTypeClassComponentGetter(const RSExportRecordType *ERT) { + for (RSExportRecordType::const_field_iterator FI = ERT->fields_begin(), + FE = ERT->fields_end(); + FI != FE; FI++) { + const RSExportRecordType::Field *F = *FI; + startFunction(AM_PublicSynchronized, false, + GetTypeName(F->getType()).c_str(), "get_" + F->getName(), 1, + "int", "index"); + mOut.indent() << "if (" RS_TYPE_ITEM_BUFFER_NAME << " == null) return " + << GetTypeNullValue(F->getType()) << ";\n"; + mOut.indent() << "return " RS_TYPE_ITEM_BUFFER_NAME << "[index]." + << F->getName() << ";\n"; + endFunction(); + } +} + +void RSReflectionJava::genTypeClassCopyAll(const RSExportRecordType *ERT) { + startFunction(AM_PublicSynchronized, false, "void", "copyAll", 0); + + mOut.indent() << "for (int ct = 0; ct < " << RS_TYPE_ITEM_BUFFER_NAME + << ".length; ct++)" + << " copyToArray(" << RS_TYPE_ITEM_BUFFER_NAME + << "[ct], ct);\n"; + mOut.indent() << "mAllocation.setFromFieldPacker(0, " + << RS_TYPE_ITEM_BUFFER_PACKER_NAME ");\n"; + + endFunction(); +} + +void RSReflectionJava::genTypeClassResize() { + startFunction(AM_PublicSynchronized, false, "void", "resize", 1, "int", + "newSize"); + + mOut.indent() << "if (mItemArray != null) "; + mOut.startBlock(); + mOut.indent() << "int oldSize = mItemArray.length;\n"; + mOut.indent() << "int copySize = Math.min(oldSize, newSize);\n"; + mOut.indent() << "if (newSize == oldSize) return;\n"; + mOut.indent() << "Item ni[] = new Item[newSize];\n"; + mOut.indent() << "System.arraycopy(mItemArray, 0, ni, 0, copySize);\n"; + mOut.indent() << "mItemArray = ni;\n"; + mOut.endBlock(); + mOut.indent() << "mAllocation.resize(newSize);\n"; + + mOut.indent() << "if (" RS_TYPE_ITEM_BUFFER_PACKER_NAME + " != null) " RS_TYPE_ITEM_BUFFER_PACKER_NAME " = " + "new FieldPacker(" << mItemSizeof << " * getType().getX()/* count */);\n"; + + endFunction(); +} + +/******************** Methods to generate type class /end ********************/ + +/********** Methods to create Element in Java of given record type ***********/ + +RSReflectionJavaElementBuilder::RSReflectionJavaElementBuilder( + const char *ElementBuilderName, const RSExportRecordType *ERT, + const char *RenderScriptVar, GeneratedFile *Out, const RSContext *RSContext, + RSReflectionJava *Reflection) + : mElementBuilderName(ElementBuilderName), mERT(ERT), + mRenderScriptVar(RenderScriptVar), mOut(Out), mPaddingFieldIndex(1), + mRSContext(RSContext), mReflection(Reflection) { + if (mRSContext->getTargetAPI() < SLANG_ICS_TARGET_API) { + mPaddingPrefix = "#padding_"; + } else { + mPaddingPrefix = "#rs_padding_"; + } +} + +void RSReflectionJavaElementBuilder::generate() { + mOut->indent() << "Element.Builder " << mElementBuilderName + << " = new Element.Builder(" << mRenderScriptVar << ");\n"; + genAddElement(mERT, "", /* ArraySize = */ 0); +} + +void RSReflectionJavaElementBuilder::genAddElement(const RSExportType *ET, + const std::string &VarName, + unsigned ArraySize) { + std::string ElementConstruct = GetBuiltinElementConstruct(ET); + + if (ElementConstruct != "") { + genAddStatementStart(); + *mOut << ElementConstruct << "(" << mRenderScriptVar << ")"; + genAddStatementEnd(VarName, ArraySize); + } else { + + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + const RSExportPrimitiveType *EPT = + static_cast<const RSExportPrimitiveType *>(ET); + const char *DataTypeName = + RSExportPrimitiveType::getRSReflectionType(EPT)->rs_type; + genAddStatementStart(); + *mOut << "Element.createUser(" << mRenderScriptVar + << ", Element.DataType." << DataTypeName << ")"; + genAddStatementEnd(VarName, ArraySize); + break; + } + case RSExportType::ExportClassVector: { + const RSExportVectorType *EVT = + static_cast<const RSExportVectorType *>(ET); + const char *DataTypeName = + RSExportPrimitiveType::getRSReflectionType(EVT)->rs_type; + genAddStatementStart(); + *mOut << "Element.createVector(" << mRenderScriptVar + << ", Element.DataType." << DataTypeName << ", " + << EVT->getNumElement() << ")"; + genAddStatementEnd(VarName, ArraySize); + break; + } + case RSExportType::ExportClassPointer: + // Pointer type variable should be resolved in + // GetBuiltinElementConstruct() + slangAssert(false && "??"); + break; + case RSExportType::ExportClassMatrix: + // Matrix type variable should be resolved + // in GetBuiltinElementConstruct() + slangAssert(false && "??"); + break; + case RSExportType::ExportClassConstantArray: { + const RSExportConstantArrayType *ECAT = + static_cast<const RSExportConstantArrayType *>(ET); + + const RSExportType *ElementType = ECAT->getElementType(); + if (ElementType->getClass() != RSExportType::ExportClassRecord) { + genAddElement(ECAT->getElementType(), VarName, ECAT->getNumElement()); + } else { + std::string NewElementBuilderName(mElementBuilderName); + NewElementBuilderName.append(1, '_'); + + RSReflectionJavaElementBuilder builder( + NewElementBuilderName.c_str(), + static_cast<const RSExportRecordType *>(ElementType), + mRenderScriptVar, mOut, mRSContext, mReflection); + builder.generate(); + + ArraySize = ECAT->getNumElement(); + genAddStatementStart(); + *mOut << NewElementBuilderName << ".create()"; + genAddStatementEnd(VarName, ArraySize); + } + break; + } + case RSExportType::ExportClassRecord: { + // Simalar to case of RSExportType::ExportClassRecord in genPackVarOfType. + // + // TODO(zonr): Generalize these two function such that there's no + // duplicated codes. + const RSExportRecordType *ERT = + static_cast<const RSExportRecordType *>(ET); + int Pos = 0; // relative pos from now on + + for (RSExportRecordType::const_field_iterator I = ERT->fields_begin(), + E = ERT->fields_end(); + I != E; I++) { + const RSExportRecordType::Field *F = *I; + int FieldOffset = F->getOffsetInParent(); + const RSExportType *T = F->getType(); + int FieldStoreSize = T->getStoreSize(); + int FieldAllocSize = T->getAllocSize(); + + std::string FieldName; + if (!VarName.empty()) + FieldName = VarName + "." + F->getName(); + else + FieldName = F->getName(); + + // Alignment + genAddPadding(FieldOffset - Pos); + + // eb.add(...) + mReflection->addFieldIndexMapping(F); + if (F->getType()->getClass() != RSExportType::ExportClassRecord) { + genAddElement(F->getType(), FieldName, 0); + } else { + std::string NewElementBuilderName(mElementBuilderName); + NewElementBuilderName.append(1, '_'); + + RSReflectionJavaElementBuilder builder( + NewElementBuilderName.c_str(), + static_cast<const RSExportRecordType *>(F->getType()), + mRenderScriptVar, mOut, mRSContext, mReflection); + builder.generate(); + + genAddStatementStart(); + *mOut << NewElementBuilderName << ".create()"; + genAddStatementEnd(FieldName, ArraySize); + } + + if (mRSContext->getTargetAPI() < SLANG_ICS_TARGET_API) { + // There is padding within the field type. This is only necessary + // for HC-targeted APIs. + genAddPadding(FieldAllocSize - FieldStoreSize); + } + + Pos = FieldOffset + FieldAllocSize; + } + + // There maybe some padding after the struct + size_t RecordAllocSize = ERT->getAllocSize(); + + genAddPadding(RecordAllocSize - Pos); + break; + } + default: + slangAssert(false && "Unknown class of type"); + break; + } + } +} + +void RSReflectionJavaElementBuilder::genAddPadding(int PaddingSize) { + while (PaddingSize > 0) { + const std::string &VarName = createPaddingField(); + genAddStatementStart(); + if (PaddingSize >= 4) { + *mOut << "Element.U32(" << mRenderScriptVar << ")"; + PaddingSize -= 4; + } else if (PaddingSize >= 2) { + *mOut << "Element.U16(" << mRenderScriptVar << ")"; + PaddingSize -= 2; + } else if (PaddingSize >= 1) { + *mOut << "Element.U8(" << mRenderScriptVar << ")"; + PaddingSize -= 1; + } + genAddStatementEnd(VarName, 0); + } +} + +void RSReflectionJavaElementBuilder::genAddStatementStart() { + mOut->indent() << mElementBuilderName << ".add("; +} + +void +RSReflectionJavaElementBuilder::genAddStatementEnd(const std::string &VarName, + unsigned ArraySize) { + *mOut << ", \"" << VarName << "\""; + if (ArraySize > 0) { + *mOut << ", " << ArraySize; + } + *mOut << ");\n"; + // TODO Review incFieldIndex. It's probably better to assign the numbers at + // the start rather + // than as we're generating the code. + mReflection->incFieldIndex(); +} + +/******** Methods to create Element in Java of given record type /end ********/ + +bool RSReflectionJava::reflect() { + std::string ErrorMsg; + if (!genScriptClass(mScriptClassName, ErrorMsg)) { + std::cerr << "Failed to generate class " << mScriptClassName << " (" + << ErrorMsg << ")\n"; + return false; + } + + mGeneratedFileNames->push_back(mScriptClassName); + + // class ScriptField_<TypeName> + for (RSContext::const_export_type_iterator + TI = mRSContext->export_types_begin(), + TE = mRSContext->export_types_end(); + TI != TE; TI++) { + const RSExportType *ET = TI->getValue(); + + if (ET->getClass() == RSExportType::ExportClassRecord) { + const RSExportRecordType *ERT = + static_cast<const RSExportRecordType *>(ET); + + if (!ERT->isArtificial() && !genTypeClass(ERT, ErrorMsg)) { + std::cerr << "Failed to generate type class for struct '" + << ERT->getName() << "' (" << ErrorMsg << ")\n"; + return false; + } + } + } + + return true; +} + +const char *RSReflectionJava::AccessModifierStr(AccessModifier AM) { + switch (AM) { + case AM_Public: + return "public"; + break; + case AM_Protected: + return "protected"; + break; + case AM_Private: + return "private"; + break; + case AM_PublicSynchronized: + return "public synchronized"; + break; + default: + return ""; + break; + } +} + +bool RSReflectionJava::startClass(AccessModifier AM, bool IsStatic, + const std::string &ClassName, + const char *SuperClassName, + std::string &ErrorMsg) { + // Open file for class + std::string FileName = ClassName + ".java"; + if (!mOut.startFile(mOutputDirectory, FileName, mRSSourceFileName, + mRSContext->getLicenseNote(), true, + mRSContext->getVerbose())) { + return false; + } + + // Package + if (!mPackageName.empty()) { + mOut << "package " << mPackageName << ";\n"; + } + mOut << "\n"; + + // Imports + mOut << "import " << mRSPackageName << ".*;\n"; + if (getEmbedBitcodeInJava()) { + mOut << "import " << mPackageName << "." + << RSSlangReflectUtils::JavaBitcodeClassNameFromRSFileName( + mRSSourceFileName.c_str()) << ";\n"; + } else { + mOut << "import android.content.res.Resources;\n"; + } + mOut << "\n"; + + // All reflected classes should be annotated as hidden, so that they won't + // be exposed in SDK. + mOut << "/**\n"; + mOut << " * @hide\n"; + mOut << " */\n"; + + mOut << AccessModifierStr(AM) << ((IsStatic) ? " static" : "") << " class " + << ClassName; + if (SuperClassName != nullptr) + mOut << " extends " << SuperClassName; + + mOut.startBlock(); + + mClassName = ClassName; + + return true; +} + +void RSReflectionJava::endClass() { + mOut.endBlock(); + mOut.closeFile(); + clear(); +} + +void RSReflectionJava::startTypeClass(const std::string &ClassName) { + mOut.indent() << "public static class " << ClassName; + mOut.startBlock(); +} + +void RSReflectionJava::endTypeClass() { mOut.endBlock(); } + +void RSReflectionJava::startFunction(AccessModifier AM, bool IsStatic, + const char *ReturnType, + const std::string &FunctionName, int Argc, + ...) { + ArgTy Args; + va_list vl; + va_start(vl, Argc); + + for (int i = 0; i < Argc; i++) { + const char *ArgType = va_arg(vl, const char *); + const char *ArgName = va_arg(vl, const char *); + + Args.push_back(std::make_pair(ArgType, ArgName)); + } + va_end(vl); + + startFunction(AM, IsStatic, ReturnType, FunctionName, Args); +} + +void RSReflectionJava::startFunction(AccessModifier AM, bool IsStatic, + const char *ReturnType, + const std::string &FunctionName, + const ArgTy &Args) { + mOut.indent() << AccessModifierStr(AM) << ((IsStatic) ? " static " : " ") + << ((ReturnType) ? ReturnType : "") << " " << FunctionName + << "("; + + bool FirstArg = true; + for (ArgTy::const_iterator I = Args.begin(), E = Args.end(); I != E; I++) { + if (!FirstArg) + mOut << ", "; + else + FirstArg = false; + + mOut << I->first << " " << I->second; + } + + mOut << ")"; + mOut.startBlock(); +} + +void RSReflectionJava::endFunction() { mOut.endBlock(); } + +bool RSReflectionJava::addTypeNameForElement(const std::string &TypeName) { + if (mTypesToCheck.find(TypeName) == mTypesToCheck.end()) { + mTypesToCheck.insert(TypeName); + return true; + } else { + return false; + } +} + +bool RSReflectionJava::addTypeNameForFieldPacker(const std::string &TypeName) { + if (mFieldPackerTypes.find(TypeName) == mFieldPackerTypes.end()) { + mFieldPackerTypes.insert(TypeName); + return true; + } else { + return false; + } +} + +} // namespace slang
diff --git a/slang/slang_rs_reflection.h b/slang/slang_rs_reflection.h new file mode 100644 index 0000000..7d54a6a --- /dev/null +++ b/slang/slang_rs_reflection.h
@@ -0,0 +1,270 @@ +/* + * Copyright 2010-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_REFLECTION_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_REFLECTION_H_ + +#include <fstream> +#include <iostream> +#include <map> +#include <set> +#include <string> +#include <vector> + +#include "llvm/ADT/StringExtras.h" + +#include "slang_assert.h" +#include "slang_rs_export_type.h" +#include "slang_rs_reflect_utils.h" + +namespace slang { + +class RSContext; +class RSExportVar; +class RSExportFunc; +class RSExportForEach; + +class RSReflectionJava { +private: + const RSContext *mRSContext; + + // The name of the Java package name we're creating this file for, + // e.g. com.example.android.rs.flashlight + std::string mPackageName; + // The name of the Java Renderscript package we'll be using, + // e.g. android.renderscript + // e.g. android.support.v8.renderscript + std::string mRSPackageName; + + // The directory under which we'll create the Java files, in appropriate subdirectories, + // e.g. /tmp/myout + std::string mOutputBaseDirectory; + // The output directory for the specfied package (mPackageName), + // e.g. /tmp/myout/com/example/android/rs/flashlight/ + // TODO This includes the terminating separator. Needed? + std::string mOutputDirectory; + + // The full path of the .rs file that we are reflecting. + std::string mRSSourceFileName; + // The full path where the generated bit code can be read. + std::string mBitCodeFileName; + + // The name of the resource we pass to the RenderScript constructor + // e.g. flashlight + std::string mResourceId; + // The name of the Java class we are generating for this script. + // e.g. ScriptC_flashlight + std::string mScriptClassName; + + + // This is set by startClass() and will change for the multiple classes generated. + std::string mClassName; + + // This is the token used for determining the size of a given ScriptField.Item. + std::string mItemSizeof; + + bool mEmbedBitcodeInJava; + + int mNextExportVarSlot; + int mNextExportFuncSlot; + int mNextExportForEachSlot; + int mNextExportReduceSlot; + + GeneratedFile mOut; + + std::string mLastError; + std::vector<std::string> *mGeneratedFileNames; + + // A mapping from a field in a record type to its index in the rsType + // instance. Only used when generates TypeClass (ScriptField_*). + typedef std::map<const RSExportRecordType::Field *, unsigned> FieldIndexMapTy; + FieldIndexMapTy mFieldIndexMap; + // Field index of current processing TypeClass. + unsigned mFieldIndex; + + inline void setError(const std::string &Error) { mLastError = Error; } + + inline void clear() { + mClassName = ""; + mNextExportVarSlot = 0; + mNextExportFuncSlot = 0; + mNextExportForEachSlot = 0; + mNextExportReduceSlot = 0; + } + +public: + typedef enum { + AM_Public, + AM_Protected, + AM_Private, + AM_PublicSynchronized + } AccessModifier; + + // Generated RS Elements for type-checking code. + std::set<std::string> mTypesToCheck; + + // Generated FieldPackers for unsigned setters/validation. + std::set<std::string> mFieldPackerTypes; + + bool addTypeNameForElement(const std::string &TypeName); + bool addTypeNameForFieldPacker(const std::string &TypeName); + + static const char *AccessModifierStr(AccessModifier AM); + + inline bool getEmbedBitcodeInJava() const { return mEmbedBitcodeInJava; } + + inline int getNextExportVarSlot() { return mNextExportVarSlot++; } + inline int getNextExportFuncSlot() { return mNextExportFuncSlot++; } + inline int getNextExportForEachSlot() { return mNextExportForEachSlot++; } + inline int getNextExportReduceSlot() { return mNextExportReduceSlot++; } + + bool startClass(AccessModifier AM, bool IsStatic, + const std::string &ClassName, const char *SuperClassName, + std::string &ErrorMsg); + void endClass(); + + void startFunction(AccessModifier AM, bool IsStatic, const char *ReturnType, + const std::string &FunctionName, int Argc, ...); + + typedef std::vector<std::pair<std::string, std::string>> ArgTy; + void startFunction(AccessModifier AM, bool IsStatic, const char *ReturnType, + const std::string &FunctionName, const ArgTy &Args); + void endFunction(); + + inline const std::string &getPackageName() const { return mPackageName; } + inline const std::string &getRSPackageName() const { return mRSPackageName; } + inline const std::string &getClassName() const { return mClassName; } + inline const std::string &getResourceId() const { return mResourceId; } + + void startTypeClass(const std::string &ClassName); + void endTypeClass(); + + inline void incFieldIndex() { mFieldIndex++; } + + inline void resetFieldIndex() { mFieldIndex = 0; } + + inline void addFieldIndexMapping(const RSExportRecordType::Field *F) { + slangAssert((mFieldIndexMap.find(F) == mFieldIndexMap.end()) && + "Nested structure never occurs in C language."); + mFieldIndexMap.insert(std::make_pair(F, mFieldIndex)); + } + + inline unsigned getFieldIndex(const RSExportRecordType::Field *F) const { + FieldIndexMapTy::const_iterator I = mFieldIndexMap.find(F); + slangAssert((I != mFieldIndexMap.end()) && + "Requesting field is out of scope."); + return I->second; + } + + inline void clearFieldIndexMap() { mFieldIndexMap.clear(); } + +private: + static bool exportableReduce(const RSExportType *ResultType); + + bool genScriptClass(const std::string &ClassName, std::string &ErrorMsg); + void genScriptClassConstructor(); + + void genInitBoolExportVariable(const std::string &VarName, + const clang::APValue &Val); + void genInitPrimitiveExportVariable(const std::string &VarName, + const clang::APValue &Val); + void genInitExportVariable(const RSExportType *ET, const std::string &VarName, + const clang::APValue &Val); + void genInitValue(const clang::APValue &Val, bool asBool); + void genExportVariable(const RSExportVar *EV); + void genPrimitiveTypeExportVariable(const RSExportVar *EV); + void genPointerTypeExportVariable(const RSExportVar *EV); + void genVectorTypeExportVariable(const RSExportVar *EV); + void genMatrixTypeExportVariable(const RSExportVar *EV); + void genConstantArrayTypeExportVariable(const RSExportVar *EV); + void genRecordTypeExportVariable(const RSExportVar *EV); + void genPrivateExportVariable(const std::string &TypeName, + const std::string &VarName); + void genSetExportVariable(const std::string &TypeName, const RSExportVar *EV, unsigned Dimension); + void genGetExportVariable(const std::string &TypeName, + const std::string &VarName); + void genGetFieldID(const std::string &VarName); + + void genExportFunction(const RSExportFunc *EF); + + void genExportForEach(const RSExportForEach *EF); + + void genExportReduce(const RSExportReduce *ER); + void genExportReduceAllocationVariant(const RSExportReduce *ER); + void genExportReduceArrayVariant(const RSExportReduce *ER); + void genExportReduceResultType(const RSExportType *ResultType); + + void genTypeCheck(const RSExportType *ET, const char *VarName); + + void genTypeInstanceFromPointer(const RSExportType *ET); + + void genTypeInstance(const RSExportType *ET); + + void genFieldPackerInstance(const RSExportType *ET); + + bool genTypeClass(const RSExportRecordType *ERT, std::string &ErrorMsg); + void genTypeItemClass(const RSExportRecordType *ERT); + void genTypeClassConstructor(const RSExportRecordType *ERT); + void genTypeClassCopyToArray(const RSExportRecordType *ERT); + void genTypeClassCopyToArrayLocal(const RSExportRecordType *ERT); + void genTypeClassItemSetter(const RSExportRecordType *ERT); + void genTypeClassItemGetter(const RSExportRecordType *ERT); + void genTypeClassComponentSetter(const RSExportRecordType *ERT); + void genTypeClassComponentGetter(const RSExportRecordType *ERT); + void genTypeClassCopyAll(const RSExportRecordType *ERT); + void genTypeClassResize(); + + void genBuildElement(const char *ElementBuilderName, + const RSExportRecordType *ERT, + const char *RenderScriptVar, bool IsInline); + void genAddElementToElementBuilder(const RSExportType *ERT, + const std::string &VarName, + const char *ElementBuilderName, + const char *RenderScriptVar, + unsigned ArraySize); + + bool genCreateFieldPacker(const RSExportType *T, const char *FieldPackerName); + void genPackVarOfType(const RSExportType *T, const char *VarName, + const char *FieldPackerName); + void genAllocateVarOfType(const RSExportType *T, const std::string &VarName); + void genNewItemBufferIfNull(const char *Index); + void genNewItemBufferPackerIfNull(); + + void genPairwiseDimCheck(const std::string &name0, const std::string &name1); + void genVectorLengthCompatibilityCheck(const std::string &ArrayName, unsigned VecSize); + void genNullArrayCheck(const std::string &ArrayName); + +public: + RSReflectionJava(const RSContext *Context, + std::vector<std::string> *GeneratedFileNames, + const std::string &OutputBaseDirectory, + const std::string &RSSourceFilename, + const std::string &BitCodeFileName, + bool EmbedBitcodeInJava); + + bool reflect(); + + inline const char *getLastError() const { + if (mLastError.empty()) + return nullptr; + else + return mLastError.c_str(); + } +}; // class RSReflectionJava + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_REFLECTION_H_ NOLINT
diff --git a/slang/slang_rs_reflection_cpp.cpp b/slang/slang_rs_reflection_cpp.cpp new file mode 100644 index 0000000..e0a78f2 --- /dev/null +++ b/slang/slang_rs_reflection_cpp.cpp
@@ -0,0 +1,1066 @@ +/* + * Copyright 2013, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <sys/stat.h> +#include <stdio.h> +#include <stdlib.h> +#include <iostream> + +#include <cstdarg> +#include <cctype> + +#include <algorithm> +#include <sstream> +#include <string> + +#include "os_sep.h" +#include "slang_rs_context.h" +#include "slang_rs_export_var.h" +#include "slang_rs_export_foreach.h" +#include "slang_rs_export_func.h" +#include "slang_rs_reflect_utils.h" +#include "slang_version.h" + +#include "slang_rs_reflection_cpp.h" + +using namespace std; + +namespace slang { + +const char kRsTypeItemClassName[] = "Item"; +const char kRsElemPrefix[] = "__rs_elem_"; +// The name of the Allocation type that is reflected in C++ +const char kAllocationSp[] = "android::RSC::sp<android::RSC::Allocation>"; + +static const char *GetMatrixTypeName(const RSExportMatrixType *EMT) { + static const char *MatrixTypeCNameMap[] = { + "rs_matrix2x2", "rs_matrix3x3", "rs_matrix4x4", + }; + unsigned Dim = EMT->getDim(); + + if ((Dim - 2) < (sizeof(MatrixTypeCNameMap) / sizeof(const char *))) + return MatrixTypeCNameMap[EMT->getDim() - 2]; + + slangAssert(false && "GetMatrixTypeName : Unsupported matrix dimension"); + return nullptr; +} + +static std::string GetTypeName(const RSExportType *ET, bool PreIdentifier = true) { + if((!PreIdentifier) && (ET->getClass() != RSExportType::ExportClassConstantArray)) { + slangAssert(false && "Non-array type post identifier?"); + return ""; + } + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + const RSExportPrimitiveType *EPT = + static_cast<const RSExportPrimitiveType *>(ET); + if (EPT->isRSObjectType()) { + return std::string("android::RSC::sp<const android::RSC::") + + RSExportPrimitiveType::getRSReflectionType(EPT)->c_name + ">"; + } else { + return RSExportPrimitiveType::getRSReflectionType(EPT)->c_name; + } + } + case RSExportType::ExportClassPointer: { + const RSExportType *PointeeType = + static_cast<const RSExportPointerType *>(ET)->getPointeeType(); + + if (PointeeType->getClass() != RSExportType::ExportClassRecord) + return kAllocationSp; + else + return PointeeType->getElementName(); + } + case RSExportType::ExportClassVector: { + const RSExportVectorType *EVT = static_cast<const RSExportVectorType *>(ET); + std::stringstream VecName; + VecName << EVT->getRSReflectionType(EVT)->rs_c_vector_prefix + << EVT->getNumElement(); + return VecName.str(); + } + case RSExportType::ExportClassMatrix: { + return GetMatrixTypeName(static_cast<const RSExportMatrixType *>(ET)); + } + case RSExportType::ExportClassConstantArray: { + const RSExportConstantArrayType *CAT = + static_cast<const RSExportConstantArrayType *>(ET); + if (PreIdentifier) { + std::string ElementTypeName = GetTypeName(CAT->getElementType()); + return ElementTypeName; + } + else { + std::stringstream ArraySpec; + ArraySpec << "[" << CAT->getNumElement() << "]"; + return ArraySpec.str(); + } + } + case RSExportType::ExportClassRecord: { + // TODO: Fix for C structs! + return ET->getElementName() + "." + kRsTypeItemClassName; + } + default: { slangAssert(false && "Unknown class of type"); } + } + + return ""; +} + +RSReflectionCpp::RSReflectionCpp(const RSContext *Context, + const string &OutputDirectory, + const string &RSSourceFileName, + const string &BitCodeFileName) + : mRSContext(Context), mRSSourceFilePath(RSSourceFileName), + mBitCodeFilePath(BitCodeFileName), mOutputDirectory(OutputDirectory), + mNextExportVarSlot(0), mNextExportFuncSlot(0), mNextExportForEachSlot(0) { + mCleanedRSFileName = RootNameFromRSFileName(mRSSourceFilePath); + mClassName = "ScriptC_" + mCleanedRSFileName; +} + +RSReflectionCpp::~RSReflectionCpp() {} + +bool RSReflectionCpp::reflect() { + writeHeaderFile(); + writeImplementationFile(); + + return true; +} + +#define RS_TYPE_CLASS_NAME_PREFIX "ScriptField_" + +bool RSReflectionCpp::writeHeaderFile() { + // Create the file and write the license note. + if (!mOut.startFile(mOutputDirectory, mClassName + ".h", mRSSourceFilePath, + mRSContext->getLicenseNote(), false, + mRSContext->getVerbose())) { + return false; + } + + mOut.indent() << "#include \"RenderScript.h\"\n\n"; + mOut.indent() << "using namespace android::RSC;\n\n"; + + mOut.comment("This class encapsulates access to the exported elements of the script. " + "Typically, you would instantiate this class once, call the set_* methods " + "for each of the exported global variables you want to change, then call " + "one of the forEach_ methods to invoke a kernel."); + mOut.indent() << "class " << mClassName << " : public android::RSC::ScriptC"; + mOut.startBlock(); + + mOut.decreaseIndent(); + mOut.indent() << "private:\n"; + mOut.increaseIndent(); + + genFieldsToStoreExportVariableValues(); + genTypeInstancesUsedInForEach(); + genFieldsForAllocationTypeVerification(); + + mOut.decreaseIndent(); + mOut.indent() << "public:\n"; + mOut.increaseIndent(); + + // Generate the constructor and destructor declarations. + mOut.indent() << mClassName << "(android::RSC::sp<android::RSC::RS> rs);\n"; + mOut.indent() << "virtual ~" << mClassName << "();\n\n"; + + genExportVariablesGetterAndSetter(); + genForEachDeclarations(); + genExportFunctionDeclarations(); + + mOut.endBlock(true); + mOut.closeFile(); + return true; +} + +void RSReflectionCpp::genTypeInstancesUsedInForEach() { + for (auto I = mRSContext->export_foreach_begin(), + E = mRSContext->export_foreach_end(); + I != E; I++) { + const RSExportForEach *EF = *I; + const RSExportType *OET = EF->getOutType(); + + if (OET) { + genTypeInstanceFromPointer(OET); + } + + const RSExportForEach::InTypeVec &InTypes = EF->getInTypes(); + + for (RSExportForEach::InTypeIter BI = InTypes.begin(), + EI = InTypes.end(); BI != EI; BI++) { + + genTypeInstanceFromPointer(*BI); + } + } +} + +void RSReflectionCpp::genFieldsForAllocationTypeVerification() { + bool CommentAdded = false; + for (std::set<std::string>::iterator I = mTypesToCheck.begin(), + E = mTypesToCheck.end(); + I != E; I++) { + if (!CommentAdded) { + mOut.comment("The following elements are used to verify the types of " + "allocations passed to kernels."); + CommentAdded = true; + } + mOut.indent() << "android::RSC::sp<const android::RSC::Element> " + << kRsElemPrefix << *I << ";\n"; + } +} + +void RSReflectionCpp::genFieldsToStoreExportVariableValues() { + bool CommentAdded = false; + for (RSContext::const_export_var_iterator I = mRSContext->export_vars_begin(), + E = mRSContext->export_vars_end(); + I != E; I++) { + const RSExportVar *ev = *I; + if (ev->isConst()) { + continue; + } + if (!CommentAdded) { + mOut.comment("For each non-const variable exported by the script, we " + "have an equivalent field. This field contains the last " + "value this variable was set to using the set_ method. " + "This may not be current value of the variable in the " + "script, as the script is free to modify its internal " + "variable without changing this field. If the script " + "initializes the exported variable, the constructor will " + "initialize this field to the same value."); + CommentAdded = true; + } + mOut.indent() << GetTypeName(ev->getType()) << " " RS_EXPORT_VAR_PREFIX + << ev->getName() << ";\n"; + } +} + +void RSReflectionCpp::genForEachDeclarations() { + bool CommentAdded = false; + for (RSContext::const_export_foreach_iterator + I = mRSContext->export_foreach_begin(), + E = mRSContext->export_foreach_end(); + I != E; I++) { + const RSExportForEach *ForEach = *I; + + if (ForEach->isDummyRoot()) { + mOut.indent() << "// No forEach_root(...)\n"; + continue; + } + + if (!CommentAdded) { + mOut.comment("For each kernel of the script corresponds one method. " + "That method queues the kernel for execution. The kernel " + "may not have completed nor even started by the time this " + "function returns. Calls that extract the data out of the " + "output allocation will wait for the kernels to complete."); + CommentAdded = true; + } + + std::string FunctionStart = "void forEach_" + ForEach->getName() + "("; + mOut.indent() << FunctionStart; + + ArgumentList Arguments; + const RSExportForEach::InVec &Ins = ForEach->getIns(); + for (RSExportForEach::InIter BI = Ins.begin(), EI = Ins.end(); + BI != EI; BI++) { + + Arguments.push_back(Argument(kAllocationSp, (*BI)->getName())); + } + + if (ForEach->hasOut() || ForEach->hasReturn()) { + Arguments.push_back(Argument(kAllocationSp, "aout")); + } + + const RSExportRecordType *ERT = ForEach->getParamPacketType(); + if (ERT) { + for (RSExportForEach::const_param_iterator i = ForEach->params_begin(), + e = ForEach->params_end(); + i != e; i++) { + RSReflectionTypeData rtd; + (*i)->getType()->convertToRTD(&rtd); + Arguments.push_back(Argument(rtd.type->c_name, (*i)->getName())); + } + } + genArguments(Arguments, FunctionStart.length()); + mOut << ");\n"; + } +} + +void RSReflectionCpp::genExportFunctionDeclarations() { + for (RSContext::const_export_func_iterator + I = mRSContext->export_funcs_begin(), + E = mRSContext->export_funcs_end(); + I != E; I++) { + const RSExportFunc *ef = *I; + + makeFunctionSignature(false, ef); + } +} + +// forEach_* implementation +void RSReflectionCpp::genExportForEachBodies() { + uint32_t slot = 0; + for (auto I = mRSContext->export_foreach_begin(), + E = mRSContext->export_foreach_end(); + I != E; I++, slot++) { + const RSExportForEach *ef = *I; + if (ef->isDummyRoot()) { + mOut.indent() << "// No forEach_root(...)\n"; + continue; + } + + ArgumentList Arguments; + std::string FunctionStart = + "void " + mClassName + "::forEach_" + ef->getName() + "("; + mOut.indent() << FunctionStart; + + if (ef->hasIns()) { + // FIXME: Add support for kernels with multiple inputs. + slangAssert(ef->getIns().size() == 1); + Arguments.push_back(Argument(kAllocationSp, "ain")); + } + + if (ef->hasOut() || ef->hasReturn()) { + Arguments.push_back(Argument(kAllocationSp, "aout")); + } + + const RSExportRecordType *ERT = ef->getParamPacketType(); + if (ERT) { + for (RSExportForEach::const_param_iterator i = ef->params_begin(), + e = ef->params_end(); + i != e; i++) { + RSReflectionTypeData rtd; + (*i)->getType()->convertToRTD(&rtd); + Arguments.push_back(Argument(rtd.type->c_name, (*i)->getName())); + } + } + genArguments(Arguments, FunctionStart.length()); + mOut << ")"; + mOut.startBlock(); + + const RSExportType *OET = ef->getOutType(); + const RSExportForEach::InTypeVec &InTypes = ef->getInTypes(); + if (ef->hasIns()) { + // FIXME: Add support for kernels with multiple inputs. + slangAssert(ef->getIns().size() == 1); + genTypeCheck(InTypes[0], "ain"); + } + if (OET) { + genTypeCheck(OET, "aout"); + } + + // TODO Add the appropriate dimension checking code, as seen in + // slang_rs_reflection.cpp. + + std::string FieldPackerName = ef->getName() + "_fp"; + if (ERT) { + if (genCreateFieldPacker(ERT, FieldPackerName.c_str())) { + genPackVarOfType(ERT, nullptr, FieldPackerName.c_str()); + } + } + mOut.indent() << "forEach(" << slot << ", "; + + if (ef->hasIns()) { + // FIXME: Add support for kernels with multiple inputs. + slangAssert(ef->getIns().size() == 1); + mOut << "ain, "; + } else { + mOut << "NULL, "; + } + + if (ef->hasOut() || ef->hasReturn()) { + mOut << "aout, "; + } else { + mOut << "NULL, "; + } + + // FIXME (no support for usrData with C++ kernels) + mOut << "NULL, 0);\n"; + mOut.endBlock(); + } +} + +// invoke_* implementation +void RSReflectionCpp::genExportFunctionBodies() { + uint32_t slot = 0; + // Reflect export function + for (auto I = mRSContext->export_funcs_begin(), + E = mRSContext->export_funcs_end(); + I != E; I++) { + const RSExportFunc *ef = *I; + + makeFunctionSignature(true, ef); + mOut.startBlock(); + const RSExportRecordType *params = ef->getParamPacketType(); + size_t param_len = 0; + if (params) { + param_len = params->getAllocSize(); + if (genCreateFieldPacker(params, "__fp")) { + genPackVarOfType(params, nullptr, "__fp"); + } + } + + mOut.indent() << "invoke(" << slot; + if (params) { + mOut << ", __fp.getData(), " << param_len << ");\n"; + } else { + mOut << ", NULL, 0);\n"; + } + mOut.endBlock(); + + slot++; + } +} + +bool RSReflectionCpp::genEncodedBitCode() { + FILE *pfin = fopen(mBitCodeFilePath.c_str(), "rb"); + if (pfin == nullptr) { + fprintf(stderr, "Error: could not read file %s\n", + mBitCodeFilePath.c_str()); + return false; + } + + unsigned char buf[16]; + int read_length; + mOut.indent() << "static const unsigned char __txt[] ="; + mOut.startBlock(); + while ((read_length = fread(buf, 1, sizeof(buf), pfin)) > 0) { + mOut.indent(); + for (int i = 0; i < read_length; i++) { + char buf2[16]; + snprintf(buf2, sizeof(buf2), "0x%02x,", buf[i]); + mOut << buf2; + } + mOut << "\n"; + } + mOut.endBlock(true); + mOut << "\n"; + return true; +} + +bool RSReflectionCpp::writeImplementationFile() { + if (!mOut.startFile(mOutputDirectory, mClassName + ".cpp", mRSSourceFilePath, + mRSContext->getLicenseNote(), false, + mRSContext->getVerbose())) { + return false; + } + + // Front matter + mOut.indent() << "#include \"" << mClassName << ".h\"\n\n"; + + genEncodedBitCode(); + mOut.indent() << "\n\n"; + + // Constructor + const std::string &packageName = mRSContext->getReflectJavaPackageName(); + mOut.indent() << mClassName << "::" << mClassName + << "(android::RSC::sp<android::RSC::RS> rs):\n" + " ScriptC(rs, __txt, sizeof(__txt), \"" + << mCleanedRSFileName << "\", " << mCleanedRSFileName.length() + << ", \"/data/data/" << packageName << "/app\", sizeof(\"" + << packageName << "\"))"; + mOut.startBlock(); + for (std::set<std::string>::iterator I = mTypesToCheck.begin(), + E = mTypesToCheck.end(); + I != E; I++) { + mOut.indent() << kRsElemPrefix << *I << " = android::RSC::Element::" << *I + << "(mRS);\n"; + } + + for (RSContext::const_export_var_iterator I = mRSContext->export_vars_begin(), + E = mRSContext->export_vars_end(); + I != E; I++) { + const RSExportVar *EV = *I; + if (!EV->getInit().isUninit()) { + genInitExportVariable(EV->getType(), EV->getName(), EV->getInit()); + } else { + genZeroInitExportVariable(EV->getName()); + } + } + mOut.endBlock(); + + // Destructor + mOut.indent() << mClassName << "::~" << mClassName << "()"; + mOut.startBlock(); + mOut.endBlock(); + + // Function bodies + genExportForEachBodies(); + genExportFunctionBodies(); + + mOut.closeFile(); + return true; +} + +void RSReflectionCpp::genExportVariablesGetterAndSetter() { + mOut.comment("Methods to set and get the variables exported by the script. " + "Const variables will not have a setter.\n\n" + "Note that the value returned by the getter may not be the " + "current value of the variable in the script. The getter will " + "return the initial value of the variable (as defined in the " + "script) or the the last value set by using the setter method. " + "The script is free to modify its value independently."); + for (RSContext::const_export_var_iterator I = mRSContext->export_vars_begin(), + E = mRSContext->export_vars_end(); + I != E; I++) { + const RSExportVar *EV = *I; + const RSExportType *ET = EV->getType(); + + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + genGetterAndSetter(static_cast<const RSExportPrimitiveType *>(ET), EV); + break; + } + case RSExportType::ExportClassPointer: { + // TODO Deprecate this. + genPointerTypeExportVariable(EV); + break; + } + case RSExportType::ExportClassVector: { + genGetterAndSetter(static_cast<const RSExportVectorType *>(ET), EV); + break; + } + case RSExportType::ExportClassMatrix: { + genMatrixTypeExportVariable(EV); + break; + } + case RSExportType::ExportClassConstantArray: { + genGetterAndSetter(static_cast<const RSExportConstantArrayType *>(ET), + EV); + break; + } + case RSExportType::ExportClassRecord: { + genGetterAndSetter(static_cast<const RSExportRecordType *>(ET), EV); + break; + } + default: { slangAssert(false && "Unknown class of type"); } + } + } +} + +void RSReflectionCpp::genGetterAndSetter(const RSExportPrimitiveType *EPT, + const RSExportVar *EV) { + RSReflectionTypeData rtd; + EPT->convertToRTD(&rtd); + std::string TypeName = GetTypeName(EPT); + + if (!EV->isConst()) { + mOut.indent() << "void set_" << EV->getName() << "(" << TypeName << " v)"; + mOut.startBlock(); + mOut.indent() << "setVar(" << getNextExportVarSlot() << ", "; + if (EPT->isRSObjectType()) { + mOut << "v"; + } else { + mOut << "&v, sizeof(v)"; + } + mOut << ");\n"; + mOut.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;\n"; + mOut.endBlock(); + } + mOut.indent() << TypeName << " get_" << EV->getName() << "() const"; + mOut.startBlock(); + if (EV->isConst()) { + const clang::APValue &val = EV->getInit(); + bool isBool = !strcmp(TypeName.c_str(), "bool"); + mOut.indent() << "return "; + genInitValue(val, isBool); + mOut << ";\n"; + } else { + mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << EV->getName() + << ";\n"; + } + mOut.endBlock(); +} + +void RSReflectionCpp::genPointerTypeExportVariable(const RSExportVar *EV) { + const RSExportType *ET = EV->getType(); + + slangAssert((ET->getClass() == RSExportType::ExportClassPointer) && + "Variable should be type of pointer here"); + + std::string TypeName = GetTypeName(ET); + const std::string &VarName = EV->getName(); + + RSReflectionTypeData rtd; + EV->getType()->convertToRTD(&rtd); + uint32_t slot = getNextExportVarSlot(); + + if (!EV->isConst()) { + mOut.indent() << "void bind_" << VarName << "(" << TypeName << " v)"; + mOut.startBlock(); + mOut.indent() << "bindAllocation(v, " << slot << ");\n"; + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; + mOut.endBlock(); + } + mOut.indent() << TypeName << " get_" << VarName << "() const"; + mOut.startBlock(); + if (EV->isConst()) { + const clang::APValue &val = EV->getInit(); + bool isBool = !strcmp(TypeName.c_str(), "bool"); + mOut.indent() << "return "; + genInitValue(val, isBool); + mOut << ";\n"; + } else { + mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << VarName << ";\n"; + } + mOut.endBlock(); +} + +void RSReflectionCpp::genGetterAndSetter(const RSExportVectorType *EVT, + const RSExportVar *EV) { + slangAssert(EVT != nullptr); + + RSReflectionTypeData rtd; + EVT->convertToRTD(&rtd); + + if (!EV->isConst()) { + mOut.indent() << "void set_" << EV->getName() << "(" + << rtd.type->rs_c_vector_prefix << EVT->getNumElement() + << " v)"; + mOut.startBlock(); + mOut.indent() << "setVar(" << getNextExportVarSlot() + << ", &v, sizeof(v));\n"; + mOut.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;\n"; + mOut.endBlock(); + } + mOut.indent() << rtd.type->rs_c_vector_prefix << EVT->getNumElement() + << " get_" << EV->getName() << "() const"; + mOut.startBlock(); + if (EV->isConst()) { + const clang::APValue &val = EV->getInit(); + mOut.indent() << "return "; + genInitValue(val, false); + mOut << ";\n"; + } else { + mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << EV->getName() + << ";\n"; + } + mOut.endBlock(); +} + +void RSReflectionCpp::genMatrixTypeExportVariable(const RSExportVar *EV) { + uint32_t slot = getNextExportVarSlot(); + stringstream tmp; + tmp << slot; + + const RSExportType *ET = EV->getType(); + if (ET->getName() == "rs_matrix4x4") { + mOut.indent() << "void set_" << EV->getName() << "(float v[16])"; + mOut.startBlock(); + mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(float)*16);\n"; + mOut.endBlock(); + } else if (ET->getName() == "rs_matrix3x3") { + mOut.indent() << "void set_" << EV->getName() << "(float v[9])"; + mOut.startBlock(); + mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(float)*9);"; + mOut.endBlock(); + } else if (ET->getName() == "rs_matrix2x2") { + mOut.indent() << "void set_" << EV->getName() << "(float v[4])"; + mOut.startBlock(); + mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(float)*4);"; + mOut.endBlock(); + } else { + mOut.indent() << "#error: TODO: " << ET->getName(); + slangAssert(false); + } +} + +void RSReflectionCpp::genGetterAndSetter(const RSExportConstantArrayType *AT, + const RSExportVar *EV) { + std::stringstream ArraySpec; + const RSExportType *ET = EV->getType(); + + const RSExportConstantArrayType *CAT = + static_cast<const RSExportConstantArrayType *>(ET); + + uint32_t slot = getNextExportVarSlot(); + stringstream tmp; + tmp << slot; + + ArraySpec << CAT->getNumElement(); + mOut.indent() << "void set_" << EV->getName() << "(" << GetTypeName(EV->getType()) << " v " + << GetTypeName(EV->getType(), false) << ")"; + mOut.startBlock(); + mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(" << GetTypeName(EV->getType()) + ") *" + << ArraySpec.str() << ");"; + mOut.endBlock(); +} + +void RSReflectionCpp::genGetterAndSetter(const RSExportRecordType *ERT, + const RSExportVar *EV) { + slangAssert(false); +} + +void RSReflectionCpp::makeFunctionSignature(bool isDefinition, + const RSExportFunc *ef) { + mOut.indent() << "void "; + if (isDefinition) { + mOut << mClassName << "::"; + } + mOut << "invoke_" << ef->getName() << "("; + + if (ef->getParamPacketType()) { + bool FirstArg = true; + for (RSExportFunc::const_param_iterator i = ef->params_begin(), + e = ef->params_end(); + i != e; i++) { + if (!FirstArg) { + mOut << ", "; + } else { + FirstArg = false; + } + mOut << GetTypeName((*i)->getType()) << " " << (*i)->getName(); + } + } + + if (isDefinition) { + mOut << ")"; + } else { + mOut << ");\n"; + } +} + +void RSReflectionCpp::genArguments(const ArgumentList &Arguments, int Offset) { + bool FirstArg = true; + + for (ArgumentList::const_iterator I = Arguments.begin(), E = Arguments.end(); + I != E; I++) { + if (!FirstArg) { + mOut << ",\n"; + mOut.indent() << string(Offset, ' '); + } else { + FirstArg = false; + } + + mOut << I->Type << " " << I->Name; + if (!I->DefaultValue.empty()) { + mOut << " = " << I->DefaultValue; + } + } +} + +bool RSReflectionCpp::genCreateFieldPacker(const RSExportType *ET, + const char *FieldPackerName) { + size_t AllocSize = ET->getAllocSize(); + + if (AllocSize > 0) { + mOut.indent() << "android::RSC::FieldPacker " << FieldPackerName << "(" + << AllocSize << ");\n"; + return true; + } + + return false; +} + +void RSReflectionCpp::genPackVarOfType(const RSExportType *ET, + const char *VarName, + const char *FieldPackerName) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + case RSExportType::ExportClassPointer: + case RSExportType::ExportClassMatrix: { + mOut.indent() << FieldPackerName << ".add(" << VarName << ");\n"; + break; + } + case RSExportType::ExportClassConstantArray: { + /*const RSExportConstantArrayType *ECAT = + static_cast<const RSExportConstantArrayType *>(ET); + + // TODO(zonr): more elegant way. Currently, we obtain the unique index + // variable (this method involves recursive call which means + // we may have more than one level loop, therefore we can't + // always use the same index variable name here) name given + // in the for-loop from counting the '.' in @VarName. + unsigned Level = 0; + size_t LastDotPos = 0; + std::string ElementVarName(VarName); + + while (LastDotPos != std::string::npos) { + LastDotPos = ElementVarName.find_first_of('.', LastDotPos + 1); + Level++; + } + std::string IndexVarName("ct"); + IndexVarName.append(llvm::utostr_32(Level)); + + C.indent() << "for (int " << IndexVarName << " = 0; " << + IndexVarName << " < " << ECAT->getSize() << "; " << + IndexVarName << "++)"; + C.startBlock(); + + ElementVarName.append("[" + IndexVarName + "]"); + genPackVarOfType(C, ECAT->getElementType(), ElementVarName.c_str(), + FieldPackerName); + + C.endBlock();*/ + break; + } + case RSExportType::ExportClassRecord: { + const RSExportRecordType *ERT = static_cast<const RSExportRecordType *>(ET); + // Relative pos from now on in field packer + unsigned Pos = 0; + + for (RSExportRecordType::const_field_iterator I = ERT->fields_begin(), + E = ERT->fields_end(); + I != E; I++) { + const RSExportRecordType::Field *F = *I; + std::string FieldName; + size_t FieldOffset = F->getOffsetInParent(); + const RSExportType *T = F->getType(); + size_t FieldStoreSize = T->getStoreSize(); + size_t FieldAllocSize = T->getAllocSize(); + + if (VarName != nullptr) + FieldName = VarName + ("." + F->getName()); + else + FieldName = F->getName(); + + if (FieldOffset > Pos) { + mOut.indent() << FieldPackerName << ".skip(" << (FieldOffset - Pos) + << ");\n"; + } + + genPackVarOfType(F->getType(), FieldName.c_str(), FieldPackerName); + + // There is padding in the field type + if (FieldAllocSize > FieldStoreSize) { + mOut.indent() << FieldPackerName << ".skip(" + << (FieldAllocSize - FieldStoreSize) << ");\n"; + } + + Pos = FieldOffset + FieldAllocSize; + } + + // There maybe some padding after the struct + if (ERT->getAllocSize() > Pos) { + mOut.indent() << FieldPackerName << ".skip(" << ERT->getAllocSize() - Pos + << ");\n"; + } + break; + } + default: { slangAssert(false && "Unknown class of type"); } + } +} + +void RSReflectionCpp::genTypeCheck(const RSExportType *ET, + const char *VarName) { + mOut.indent() << "// Type check for " << VarName << "\n"; + + if (ET->getClass() == RSExportType::ExportClassPointer) { + const RSExportPointerType *EPT = + static_cast<const RSExportPointerType *>(ET); + ET = EPT->getPointeeType(); + } + + std::string TypeName; + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + case RSExportType::ExportClassRecord: { + TypeName = ET->getElementName(); + break; + } + + default: + break; + } + + if (!TypeName.empty()) { + mOut.indent() << "if (!" << VarName + << "->getType()->getElement()->isCompatible(" + << kRsElemPrefix << TypeName << "))"; + mOut.startBlock(); + mOut.indent() << "mRS->throwError(RS_ERROR_RUNTIME_ERROR, " + "\"Incompatible type\");\n"; + mOut.indent() << "return;\n"; + mOut.endBlock(); + } +} + +void RSReflectionCpp::genTypeInstanceFromPointer(const RSExportType *ET) { + if (ET->getClass() == RSExportType::ExportClassPointer) { + // For pointer parameters to original forEach kernels. + const RSExportPointerType *EPT = + static_cast<const RSExportPointerType *>(ET); + genTypeInstance(EPT->getPointeeType()); + } else { + // For handling pass-by-value kernel parameters. + genTypeInstance(ET); + } +} + +void RSReflectionCpp::genTypeInstance(const RSExportType *ET) { + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: + case RSExportType::ExportClassVector: + case RSExportType::ExportClassConstantArray: + case RSExportType::ExportClassRecord: { + std::string TypeName = ET->getElementName(); + mTypesToCheck.insert(TypeName); + break; + } + + default: + break; + } +} + +void RSReflectionCpp::genInitExportVariable(const RSExportType *ET, + const std::string &VarName, + const clang::APValue &Val) { + slangAssert(!Val.isUninit() && "Not a valid initializer"); + + switch (ET->getClass()) { + case RSExportType::ExportClassPrimitive: { + const RSExportPrimitiveType *EPT = + static_cast<const RSExportPrimitiveType *>(ET); + if (EPT->getType() == DataTypeBoolean) { + genInitBoolExportVariable(VarName, Val); + } else { + genInitPrimitiveExportVariable(VarName, Val); + } + break; + } + case RSExportType::ExportClassPointer: { + if (!Val.isInt() || Val.getInt().getSExtValue() != 0) + std::cerr << "Initializer which is non-NULL to pointer type variable " + "will be ignored" << std::endl; + break; + } + case RSExportType::ExportClassVector: { + const RSExportVectorType *EVT = static_cast<const RSExportVectorType *>(ET); + switch (Val.getKind()) { + case clang::APValue::Int: + case clang::APValue::Float: { + for (unsigned i = 0; i < EVT->getNumElement(); i++) { + std::string Name = VarName + "." + getVectorAccessor(i); + genInitPrimitiveExportVariable(Name, Val); + } + break; + } + case clang::APValue::Vector: { + unsigned NumElements = std::min( + static_cast<unsigned>(EVT->getNumElement()), Val.getVectorLength()); + for (unsigned i = 0; i < NumElements; i++) { + const clang::APValue &ElementVal = Val.getVectorElt(i); + std::string Name = VarName + "." + getVectorAccessor(i); + genInitPrimitiveExportVariable(Name, ElementVal); + } + break; + } + case clang::APValue::MemberPointer: + case clang::APValue::Uninitialized: + case clang::APValue::ComplexInt: + case clang::APValue::ComplexFloat: + case clang::APValue::LValue: + case clang::APValue::Array: + case clang::APValue::Struct: + case clang::APValue::Union: + case clang::APValue::AddrLabelDiff: { + slangAssert(false && "Unexpected type of value of initializer."); + } + } + break; + } + case RSExportType::ExportClassMatrix: + case RSExportType::ExportClassConstantArray: + case RSExportType::ExportClassRecord: { + slangAssert(false && "Unsupported initializer for record/matrix/constant " + "array type variable currently"); + break; + } + default: { slangAssert(false && "Unknown class of type"); } + } +} + +const char *RSReflectionCpp::getVectorAccessor(unsigned Index) { + static const char *VectorAccessorMap[] = {/* 0 */ "x", + /* 1 */ "y", + /* 2 */ "z", + /* 3 */ "w", + }; + + slangAssert((Index < (sizeof(VectorAccessorMap) / sizeof(const char *))) && + "Out-of-bound index to access vector member"); + + return VectorAccessorMap[Index]; +} + +void RSReflectionCpp::genZeroInitExportVariable(const std::string &VarName) { + mOut.indent() << "memset(&" << RS_EXPORT_VAR_PREFIX << VarName + << ", 0, sizeof(" << RS_EXPORT_VAR_PREFIX << VarName << "));\n"; +} + +void +RSReflectionCpp::genInitPrimitiveExportVariable(const std::string &VarName, + const clang::APValue &Val) { + slangAssert(!Val.isUninit() && "Not a valid initializer"); + + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; + genInitValue(Val); + mOut << ";\n"; +} + +void RSReflectionCpp::genInitValue(const clang::APValue &Val, bool asBool) { + switch (Val.getKind()) { + case clang::APValue::Int: { + const llvm::APInt &api = Val.getInt(); + if (asBool) { + mOut << ((api.getSExtValue() == 0) ? "false" : "true"); + } else { + // TODO: Handle unsigned correctly for C++ + mOut << api.getSExtValue(); + if (api.getBitWidth() > 32) { + mOut << "L"; + } + } + break; + } + + case clang::APValue::Float: { + const llvm::APFloat &apf = Val.getFloat(); + llvm::SmallString<30> s; + apf.toString(s); + mOut << s.c_str(); + if (&apf.getSemantics() == &llvm::APFloat::IEEEsingle) { + if (s.count('.') == 0) { + mOut << ".f"; + } else { + mOut << "f"; + } + } + break; + } + + case clang::APValue::ComplexInt: + case clang::APValue::ComplexFloat: + case clang::APValue::LValue: + case clang::APValue::Vector: { + slangAssert(false && "Primitive type cannot have such kind of initializer"); + break; + } + + default: { slangAssert(false && "Unknown kind of initializer"); } + } +} + +void RSReflectionCpp::genInitBoolExportVariable(const std::string &VarName, + const clang::APValue &Val) { + slangAssert(!Val.isUninit() && "Not a valid initializer"); + slangAssert((Val.getKind() == clang::APValue::Int) && + "Bool type has wrong initial APValue"); + + mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = " + << ((Val.getInt().getSExtValue() == 0) ? "false" : "true") + << ";"; +} + +} // namespace slang
diff --git a/slang/slang_rs_reflection_cpp.h b/slang/slang_rs_reflection_cpp.h new file mode 100644 index 0000000..c613d79 --- /dev/null +++ b/slang/slang_rs_reflection_cpp.h
@@ -0,0 +1,156 @@ +/* + * Copyright 2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_REFLECTION_CPP_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_REFLECTION_CPP_H_ + +#include "slang_rs_reflect_utils.h" + +#include <set> +#include <string> + +#define RS_EXPORT_VAR_PREFIX "mExportVar_" + +namespace slang { + +class RSReflectionCpp { + public: + RSReflectionCpp(const RSContext *Context, const std::string &OutputDirectory, + const std::string &RSSourceFileName, + const std::string &BitCodeFileName); + virtual ~RSReflectionCpp(); + + bool reflect(); + + private: + struct Argument { + std::string Type; + std::string Name; + std::string DefaultValue; + Argument(std::string Type, std::string Name, std::string DefaultValue = "") + : Type(Type), Name(Name), DefaultValue(DefaultValue) {} + }; + typedef std::vector<Argument> ArgumentList; + + // Information coming from the compiler about the code we're reflecting. + const RSContext *mRSContext; + + // Path to the *.rs file for which we're generating C++ code. + std::string mRSSourceFilePath; + // Path to the file that contains the byte code generated from the *.rs file. + std::string mBitCodeFilePath; + // The directory where we'll generate the C++ files. + std::string mOutputDirectory; + // A cleaned up version of the *.rs file name that can be used in generating + // C++ identifiers. + std::string mCleanedRSFileName; + // The name of the generated C++ class. + std::string mClassName; + + // TODO document + unsigned int mNextExportVarSlot; + unsigned int mNextExportFuncSlot; + unsigned int mNextExportForEachSlot; + + // Generated RS Elements for type-checking code. + std::set<std::string> mTypesToCheck; + + inline void clear() { + mNextExportVarSlot = 0; + mNextExportFuncSlot = 0; + mNextExportForEachSlot = 0; + mTypesToCheck.clear(); + } + + // The file we are currently generating, either the header or the + // implementation file. + GeneratedFile mOut; + + void genInitValue(const clang::APValue &Val, bool asBool = false); + static const char *getVectorAccessor(unsigned index); + + inline unsigned int getNextExportVarSlot() { return mNextExportVarSlot++; } + + inline unsigned int getNextExportFuncSlot() { return mNextExportFuncSlot++; } + + inline unsigned int getNextExportForEachSlot() { + return mNextExportForEachSlot++; + } + + bool writeHeaderFile(); + bool writeImplementationFile(); + + // Write out signatures both in the header and implementation. + void makeFunctionSignature(bool isDefinition, const RSExportFunc *ef); + + bool genEncodedBitCode(); + void genFieldsToStoreExportVariableValues(); + void genTypeInstancesUsedInForEach(); + void genFieldsForAllocationTypeVerification(); + + // Write out the code for the getters and setters. + void genExportVariablesGetterAndSetter(); + + // Write out the code for the declaration of the kernel entry points. + void genForEachDeclarations(); + void genExportFunctionDeclarations(); + + // Write out code for the definitions of the kernel entry points. + void genExportForEachBodies(); + void genExportFunctionBodies(); + + bool startScriptHeader(); + + // Write out code for an export variable initialization. + void genInitExportVariable(const RSExportType *ET, const std::string &VarName, + const clang::APValue &Val); + void genZeroInitExportVariable(const std::string &VarName); + void genInitBoolExportVariable(const std::string &VarName, + const clang::APValue &Val); + void genInitPrimitiveExportVariable(const std::string &VarName, + const clang::APValue &Val); + + // Produce an argument string of the form "T1 t, T2 u, T3 v". + void genArguments(const ArgumentList &Args, int Offset); + + void genPointerTypeExportVariable(const RSExportVar *EV); + void genMatrixTypeExportVariable(const RSExportVar *EV); + void genRecordTypeExportVariable(const RSExportVar *EV); + + void genGetterAndSetter(const RSExportPrimitiveType *EPT, const RSExportVar* EV); + void genGetterAndSetter(const RSExportVectorType *EVT, const RSExportVar* EV); + void genGetterAndSetter(const RSExportConstantArrayType *AT, const RSExportVar* EV); + void genGetterAndSetter(const RSExportRecordType *ERT, const RSExportVar *EV); + + // Write out a local FieldPacker (if necessary). + bool genCreateFieldPacker(const RSExportType *T, const char *FieldPackerName); + + // Populate (write) the FieldPacker with add() operations. + void genPackVarOfType(const RSExportType *ET, const char *VarName, + const char *FieldPackerName); + + // Generate a runtime type check for VarName. + void genTypeCheck(const RSExportType *ET, const char *VarName); + + // Generate a type instance for a given type. + void genTypeInstanceFromPointer(const RSExportType *ET); + void genTypeInstance(const RSExportType *ET); + +}; // class RSReflectionCpp + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_REFLECTION_CPP_H_ NOLINT
diff --git a/slang/slang_rs_special_func.cpp b/slang/slang_rs_special_func.cpp new file mode 100644 index 0000000..56ae590 --- /dev/null +++ b/slang/slang_rs_special_func.cpp
@@ -0,0 +1,106 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_special_func.h" + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Attr.h" + +#include "slang_assert.h" +#include "slang_version.h" + +namespace slang { + +bool RSSpecialFunc::isGraphicsRootRSFunc(unsigned int targetAPI, + const clang::FunctionDecl *FD) { + if (FD->hasAttr<clang::KernelAttr>()) { + return false; + } + + if (!FD->getName().equals("root")) { + return false; + } + + if (FD->getNumParams() == 0) { + // Graphics root function + return true; + } + + // Check for legacy graphics root function (with single parameter). + if ((targetAPI < SLANG_ICS_TARGET_API) && (FD->getNumParams() == 1)) { + const clang::QualType &IntType = FD->getASTContext().IntTy; + if (FD->getReturnType().getCanonicalType() == IntType) { + return true; + } + } + + return false; +} + +bool +RSSpecialFunc::validateSpecialFuncDecl(unsigned int targetAPI, + slang::RSContext *Context, + clang::FunctionDecl const *FD) { + slangAssert(Context && FD); + bool valid = true; + const clang::ASTContext &C = FD->getASTContext(); + const clang::QualType &IntType = FD->getASTContext().IntTy; + + if (isGraphicsRootRSFunc(targetAPI, FD)) { + if ((targetAPI < SLANG_ICS_TARGET_API) && (FD->getNumParams() == 1)) { + // Legacy graphics root function + const clang::ParmVarDecl *PVD = FD->getParamDecl(0); + clang::QualType QT = PVD->getType().getCanonicalType(); + if (QT != IntType) { + Context->ReportError(PVD->getLocation(), + "invalid parameter type for legacy " + "graphics root() function: %0") + << PVD->getType(); + valid = false; + } + } + + // Graphics root function, so verify that it returns an int + if (FD->getReturnType().getCanonicalType() != IntType) { + Context->ReportError(FD->getLocation(), + "root() is required to return " + "an int for graphics usage"); + valid = false; + } + } else if (isInitRSFunc(FD) || isDtorRSFunc(FD)) { + if (FD->getNumParams() != 0) { + Context->ReportError(FD->getLocation(), + "%0(void) is required to have no " + "parameters") + << FD->getName(); + valid = false; + } + + if (FD->getReturnType().getCanonicalType() != C.VoidTy) { + Context->ReportError(FD->getLocation(), + "%0(void) is required to have a void " + "return type") + << FD->getName(); + valid = false; + } + } else { + slangAssert(false && "must be called on root, init or .rs.dtor function!"); + } + + return valid; +} + +} // namespace slang
diff --git a/slang/slang_rs_special_func.h b/slang/slang_rs_special_func.h new file mode 100644 index 0000000..7390871 --- /dev/null +++ b/slang/slang_rs_special_func.h
@@ -0,0 +1,65 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_SPECIAL_FUNC_H_ +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_SPECIAL_FUNC_H_ + +#include "llvm/ADT/StringRef.h" + +#include "clang/AST/Decl.h" + +#include "slang_rs_context.h" + +namespace slang { + +namespace RSSpecialFunc { + +inline bool isInitRSFunc(const clang::FunctionDecl *FD) { + if (!FD) { + return false; + } + const llvm::StringRef Name = FD->getName(); + static llvm::StringRef FuncInit("init"); + return Name.equals(FuncInit); +} + +inline bool isDtorRSFunc(const clang::FunctionDecl *FD) { + if (!FD) { + return false; + } + const llvm::StringRef Name = FD->getName(); + static llvm::StringRef FuncDtor(".rs.dtor"); + return Name.equals(FuncDtor); +} + +bool isGraphicsRootRSFunc(unsigned int targetAPI, + const clang::FunctionDecl *FD); + +inline bool isSpecialRSFunc(unsigned int targetAPI, + const clang::FunctionDecl *FD) { + return isGraphicsRootRSFunc(targetAPI, FD) || isInitRSFunc(FD) || + isDtorRSFunc(FD); +} + +bool validateSpecialFuncDecl(unsigned int targetAPI, + slang::RSContext *Context, + const clang::FunctionDecl *FD); + +} // namespace RSSpecialFunc + +} // namespace slang + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_SPECIAL_FUNC_H
diff --git a/slang/slang_rs_special_kernel_param.cpp b/slang/slang_rs_special_kernel_param.cpp new file mode 100644 index 0000000..aa67d81 --- /dev/null +++ b/slang/slang_rs_special_kernel_param.cpp
@@ -0,0 +1,234 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "slang_rs_special_kernel_param.h" + +#include "clang/AST/ASTContext.h" + +#include "bcinfo/MetadataExtractor.h" + +#include "slang_assert.h" +#include "slang_rs_context.h" +#include "slang_version.h" + +namespace { + +enum SpecialParameterKind { + SPK_LOCATION, // 'int' or 'unsigned int' + SPK_CONTEXT, // rs_kernel_context +}; + +struct SpecialParameter { + const char *name; + bcinfo::MetadataSignatureBitval bitval; + SpecialParameterKind kind; + SlangTargetAPI minAPI; +}; + +// Table entries are in the order parameters must occur in a kernel parameter list. +const SpecialParameter specialParameterTable[] = { + { "context", bcinfo::MD_SIG_Ctxt, SPK_CONTEXT, SLANG_M_TARGET_API }, + { "x", bcinfo::MD_SIG_X, SPK_LOCATION, SLANG_MINIMUM_TARGET_API }, + { "y", bcinfo::MD_SIG_Y, SPK_LOCATION, SLANG_MINIMUM_TARGET_API }, + { "z", bcinfo::MD_SIG_Z, SPK_LOCATION, SLANG_M_TARGET_API }, + { nullptr, bcinfo::MD_SIG_None, SPK_LOCATION, SLANG_MINIMUM_TARGET_API }, // marks end of table +}; + +// If the specified name matches the name of an entry in +// specialParameterTable, return the corresponding table index. +// Return -1 if not found. +int lookupSpecialKernelParameter(const llvm::StringRef name) { + for (int i = 0; specialParameterTable[i].name != nullptr; ++i) { + if (name.equals(specialParameterTable[i].name)) { + return i; + } + } + + return -1; +} + +} // end anonymous namespace + +namespace slang { + +// Is the specified name the name of an entry in the specialParameterTable? +bool isSpecialKernelParameter(const llvm::StringRef Name) { + return lookupSpecialKernelParameter(Name) >= 0; +} + +// Return a comma-separated list of names in specialParameterTable +// that are available at the specified API level. +std::string listSpecialKernelParameters(unsigned int api) { + std::string ret; + bool first = true; + for (int i = 0; specialParameterTable[i].name != nullptr; ++i) { + if (specialParameterTable[i].minAPI > api) + continue; + if (first) + first = false; + else + ret += ", "; + ret += "'"; + ret += specialParameterTable[i].name; + ret += "'"; + } + return ret; +} + +// Process the optional special parameters: +// - Sets *IndexOfFirstSpecialParameter to the index of the first special parameter, or +// FD->getNumParams() if none are found. +// - Add bits to *SignatureMetadata for the found special parameters. +// Returns true if no errors. +bool processSpecialKernelParameters( + slang::RSContext *Context, + const std::function<std::string ()> &DiagnosticDescription, + const clang::FunctionDecl *FD, + size_t *IndexOfFirstSpecialParameter, + unsigned int *SignatureMetadata) { + slangAssert(IndexOfFirstSpecialParameter != nullptr); + slangAssert(SignatureMetadata != nullptr); + slangAssert(*SignatureMetadata == 0); + clang::ASTContext &C = Context->getASTContext(); + + // Find all special parameters if present. + int LastSpecialParameterIdx = -1; // index into specialParameterTable + int FirstLocationSpecialParameterIdx = -1; // index into specialParameterTable + clang::QualType FirstLocationSpecialParameterType; + size_t NumParams = FD->getNumParams(); + *IndexOfFirstSpecialParameter = NumParams; + bool valid = true; + for (size_t i = 0; i < NumParams; i++) { + const clang::ParmVarDecl *PVD = FD->getParamDecl(i); + const llvm::StringRef ParamName = PVD->getName(); + const clang::QualType Type = PVD->getType(); + const clang::QualType QT = Type.getCanonicalType(); + const clang::QualType UT = QT.getUnqualifiedType(); + int SpecialParameterIdx = lookupSpecialKernelParameter(ParamName); + + static const char KernelContextUnqualifiedTypeName[] = + "const struct rs_kernel_context_t *"; + static const char KernelContextTypeName[] = "rs_kernel_context"; + + // If the type is rs_context, it should have been named "context" and classified + // as a special parameter. + if (SpecialParameterIdx < 0 && UT.getAsString() == KernelContextUnqualifiedTypeName) { + Context->ReportError( + PVD->getLocation(), + "The special parameter of type '%0' must be called " + "'context' instead of '%1'.") + << KernelContextTypeName << ParamName; + SpecialParameterIdx = lookupSpecialKernelParameter("context"); + } + + // If it's not a special parameter, check that it appears before any special + // parameter. + if (SpecialParameterIdx < 0) { + if (*IndexOfFirstSpecialParameter < NumParams) { + Context->ReportError(PVD->getLocation(), + "In %0, parameter '%1' cannot " + "appear after any of the special parameters (%2).") + << DiagnosticDescription() + << ParamName + << listSpecialKernelParameters(Context->getTargetAPI()); + valid = false; + } + continue; + } + + const SpecialParameter &SP = specialParameterTable[SpecialParameterIdx]; + + // Verify that this special parameter is OK for the current API level. + if (Context->getTargetAPI() < SP.minAPI) { + Context->ReportError(PVD->getLocation(), + "%0 targeting SDK levels " + "%1-%2 may not use special parameter '%3'.") + << DiagnosticDescription() + << SLANG_MINIMUM_TARGET_API << (SP.minAPI - 1) + << SP.name; + valid = false; + } + + // Check that the order of the special parameters is correct. + if (SpecialParameterIdx < LastSpecialParameterIdx) { + Context->ReportError( + PVD->getLocation(), + "In %0, special parameter '%1' must " + "be defined before special parameter '%2'.") + << DiagnosticDescription() + << SP.name + << specialParameterTable[LastSpecialParameterIdx].name; + valid = false; + } + + // Validate the data type of the special parameter. + switch (SP.kind) { + case SPK_LOCATION: { + // Location special parameters can only be int or uint. + if (UT != C.UnsignedIntTy && UT != C.IntTy) { + Context->ReportError(PVD->getLocation(), + "Special parameter '%0' must be of type 'int' or " + "'unsigned int'. It is of type '%1'.") + << ParamName << Type.getAsString(); + valid = false; + } + + // Ensure that all location special parameters have the same type. + if (FirstLocationSpecialParameterIdx >= 0) { + if (Type != FirstLocationSpecialParameterType) { + Context->ReportError( + PVD->getLocation(), + "Special parameters '%0' and '%1' must be of the same type. " + "'%0' is of type '%2' while '%1' is of type '%3'.") + << specialParameterTable[FirstLocationSpecialParameterIdx].name + << SP.name << FirstLocationSpecialParameterType.getAsString() + << Type.getAsString(); + valid = false; + } + } else { + FirstLocationSpecialParameterIdx = SpecialParameterIdx; + FirstLocationSpecialParameterType = Type; + } + } break; + case SPK_CONTEXT: { + // Check that variables named "context" are of type rs_context. + if (UT.getAsString() != KernelContextUnqualifiedTypeName) { + Context->ReportError(PVD->getLocation(), + "Special parameter '%0' must be of type '%1'. " + "It is of type '%2'.") + << ParamName << KernelContextTypeName + << Type.getAsString(); + valid = false; + } + } break; + default: + slangAssert(!"Unexpected special parameter type"); + } + + // We should not be invoked if two parameters of the same name are present. + slangAssert(!(*SignatureMetadata & SP.bitval)); + *SignatureMetadata |= SP.bitval; + + LastSpecialParameterIdx = SpecialParameterIdx; + // If this is the first time we find a special parameter, save it. + if (*IndexOfFirstSpecialParameter >= NumParams) { + *IndexOfFirstSpecialParameter = i; + } + } + return valid; +} + +} // namespace slang
diff --git a/slang/slang_rs_special_kernel_param.h b/slang/slang_rs_special_kernel_param.h new file mode 100644 index 0000000..b753c74 --- /dev/null +++ b/slang/slang_rs_special_kernel_param.h
@@ -0,0 +1,41 @@ +/* + * Copyright 2015, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_SPECIAL_KERNEL_PARAM_H_ +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_SPECIAL_KERNEL_PARAM_H_ + +#include <functional> +#include <string> + +#include "clang/AST/Decl.h" + +namespace slang { + +class RSContext; + +bool isSpecialKernelParameter(const llvm::StringRef Name); + +std::string listSpecialKernelParameters(unsigned int api); + +bool processSpecialKernelParameters( + RSContext *Context, + const std::function<std::string ()> &DiagnosticDescription, + const clang::FunctionDecl *FD, + size_t *IndexOfFirstSpecialParameter, + unsigned int *SignatureMetadata); +} + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_RS_SPECIAL_KERNEL_PARAM_H_
diff --git a/slang/slang_version.h b/slang/slang_version.h new file mode 100644 index 0000000..74cd09e --- /dev/null +++ b/slang/slang_version.h
@@ -0,0 +1,80 @@ +/* + * Copyright 2011-2012, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _FRAMEWORKS_COMPILE_SLANG_SLANG_VERSION_H_ // NOLINT +#define _FRAMEWORKS_COMPILE_SLANG_SLANG_VERSION_H_ + +#include <climits> + +#define RS_DEVELOPMENT_API UINT_MAX + +// API levels used by the standard Android SDK. +// MR -> Maintenance Release +// HC -> Honeycomb +// ICS -> Ice Cream Sandwich +// JB -> Jelly Bean +// KK -> KitKat +// M -> Marshmallow +enum SlangTargetAPI { + SLANG_MINIMUM_TARGET_API = 11, + SLANG_HC_TARGET_API = 11, + SLANG_HC_MR1_TARGET_API = 12, + SLANG_HC_MR2_TARGET_API = 13, + SLANG_ICS_TARGET_API = 14, + SLANG_ICS_MR1_TARGET_API = 15, + SLANG_JB_TARGET_API = 16, + SLANG_JB_MR1_TARGET_API = 17, + SLANG_JB_MR2_TARGET_API = 18, + SLANG_KK_TARGET_API = 19, + SLANG_M_TARGET_API = 23, + SLANG_N_TARGET_API = 24, + SLANG_MAXIMUM_TARGET_API = RS_VERSION, + SLANG_DEVELOPMENT_TARGET_API = RS_DEVELOPMENT_API +}; +// Note that RS_VERSION is defined at build time (see Android.mk for details). + +// API levels where particular features exist. +// . Open (feature appears at a particular level and continues to exist): +// SLANG_FEAT_FOO_API +// . Closed (feature exists only through a particular range of API levels): +// SLANG_FEAT_BAR_API_MIN, SLANG_FEAT_BAR_API_MAX +enum SlangFeatureAPI { + SLANG_FEATURE_GENERAL_REDUCTION_API = SLANG_N_TARGET_API, + SLANG_FEATURE_GENERAL_REDUCTION_HALTER_API = SLANG_DEVELOPMENT_TARGET_API, + SLANG_FEATURE_SINGLE_SOURCE_API = SLANG_N_TARGET_API, +}; + +// SlangVersion refers to the released compiler version (for which certain +// behaviors could change - i.e. critical bugs fixed that may require +// additional workarounds in the backend compiler). +namespace SlangVersion { +enum { + LEGACY = 0, + ICS = 1400, + JB = 1600, + JB_MR1 = 1700, + JB_MR2 = 1800, + KK = 1900, + KK_P1 = 1901, + L = 2100, + M = 2300, + M_RS_OBJECT = 2310, + N = 2400, + CURRENT = N +}; +} // namespace SlangVersion + +#endif // _FRAMEWORKS_COMPILE_SLANG_SLANG_VERSION_H_ NOLINT
diff --git a/slang/strip_unknown_attributes.cpp b/slang/strip_unknown_attributes.cpp new file mode 100644 index 0000000..d41dd8f --- /dev/null +++ b/slang/strip_unknown_attributes.cpp
@@ -0,0 +1,64 @@ +/* + * Copyright 2013, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "strip_unknown_attributes.h" + +namespace slang { + +StripUnknownAttributes::StripUnknownAttributes() : ModulePass(ID) { +} + + +bool StripUnknownAttributes::runOnFunction(llvm::Function &F) { + bool changed = false; + for (llvm::Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); + I != E; ++I) { + llvm::Argument &A = *I; + // Remove any readnone/readonly attributes from function parameters. + if (A.onlyReadsMemory()) { + llvm::AttrBuilder B; + B.addAttribute(llvm::Attribute::ReadNone); + B.addAttribute(llvm::Attribute::ReadOnly); + llvm::AttributeSet ToStrip = llvm::AttributeSet::get(F.getContext(), + A.getArgNo() + 1, B); + A.removeAttr(ToStrip); + changed = true; + } + } + F.removeFnAttr(llvm::Attribute::ArgMemOnly); + return changed; +} + + +bool StripUnknownAttributes::runOnModule(llvm::Module &M) { + bool Changed = false; + for (llvm::Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { + Changed |= runOnFunction(*I); + } + return Changed; +} + + +llvm::ModulePass * createStripUnknownAttributesPass() { + return new StripUnknownAttributes(); +} + + +char StripUnknownAttributes::ID = 0; +static llvm::RegisterPass<StripUnknownAttributes> RPSUA( + "StripUnknownAttributes", "Strip Unknown Attributes Pass"); + +} // namespace slang
diff --git a/slang/strip_unknown_attributes.h b/slang/strip_unknown_attributes.h new file mode 100644 index 0000000..8610cd5 --- /dev/null +++ b/slang/strip_unknown_attributes.h
@@ -0,0 +1,42 @@ +/* + * Copyright 2013, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "llvm/IR/Module.h" +#include "llvm/Pass.h" + +namespace slang { + +// Remove any readnone/readonly attributes from function parameters. +// Jellybean's LLVM version didn't support readnone/readonly as anything +// other than function attributes, so it will fail verification otherwise. +// Since we never ran the verifier in Jellybean, it ends up with potential +// crashes deeper in CodeGen. +class StripUnknownAttributes : public llvm::ModulePass { +public: + static char ID; + + StripUnknownAttributes(); + + bool runOnFunction(llvm::Function &F); + + // We have to use a ModulePass, since a FunctionPass only gets run on + // defined Functions (and not declared Functions). + virtual bool runOnModule(llvm::Module &M); +}; + +llvm::ModulePass * createStripUnknownAttributesPass(); + +} // namespace slang
diff --git a/slang/tests/F_Werror/Werror.rs b/slang/tests/F_Werror/Werror.rs new file mode 100644 index 0000000..f069d88 --- /dev/null +++ b/slang/tests/F_Werror/Werror.rs
@@ -0,0 +1,7 @@ +// -Werror +#pragma version(1) +#pragma rs java_package_name(foo) + +static int foo() { +} +
diff --git a/slang/tests/F_Werror/stderr.txt.expect b/slang/tests/F_Werror/stderr.txt.expect new file mode 100644 index 0000000..b58dd9f --- /dev/null +++ b/slang/tests/F_Werror/stderr.txt.expect
@@ -0,0 +1 @@ +Werror.rs:6:1: error: control reaches end of non-void function
diff --git a/slang/tests/F_Werror/stdout.txt.expect b/slang/tests/F_Werror/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_Werror/stdout.txt.expect
diff --git a/slang/tests/F_anon_struct/anon_struct.rs b/slang/tests/F_anon_struct/anon_struct.rs new file mode 100644 index 0000000..46bd8cb --- /dev/null +++ b/slang/tests/F_anon_struct/anon_struct.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +struct { + int i; +} myStruct;
diff --git a/slang/tests/F_anon_struct/stderr.txt.expect b/slang/tests/F_anon_struct/stderr.txt.expect new file mode 100644 index 0000000..efc6f94 --- /dev/null +++ b/slang/tests/F_anon_struct/stderr.txt.expect
@@ -0,0 +1 @@ +anon_struct.rs:4:1: error: anonymous structures cannot be exported
diff --git a/slang/tests/F_anon_struct/stdout.txt.expect b/slang/tests/F_anon_struct/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_anon_struct/stdout.txt.expect
diff --git a/slang/tests/F_anon_struct_kernel_sig/anon_struct_kernel_sig.rs b/slang/tests/F_anon_struct_kernel_sig/anon_struct_kernel_sig.rs new file mode 100644 index 0000000..028a328 --- /dev/null +++ b/slang/tests/F_anon_struct_kernel_sig/anon_struct_kernel_sig.rs
@@ -0,0 +1,21 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef struct { + int i; +} myStruct; + +/* Test old-style kernel */ +void root(const myStruct *in, int *out) { + *out = in->i; +} + +/* Test new-style kernel */ +myStruct RS_KERNEL kernel_returning_myStruct(int in) { + myStruct out = { in }; + return out; +} + +int RS_KERNEL kernel_with_myStruct_param(myStruct in) { + return in.i; +}
diff --git a/slang/tests/F_anon_struct_kernel_sig/stderr.txt.expect b/slang/tests/F_anon_struct_kernel_sig/stderr.txt.expect new file mode 100644 index 0000000..276aaaf --- /dev/null +++ b/slang/tests/F_anon_struct_kernel_sig/stderr.txt.expect
@@ -0,0 +1 @@ +anon_struct_kernel_sig.rs:4:9: error: anonymous structures cannot be exported
diff --git a/slang/tests/F_anon_struct_kernel_sig/stdout.txt.expect b/slang/tests/F_anon_struct_kernel_sig/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_anon_struct_kernel_sig/stdout.txt.expect
diff --git a/slang/tests/F_anon_struct_typedef/anon_struct_typedef.rs b/slang/tests/F_anon_struct_typedef/anon_struct_typedef.rs new file mode 100644 index 0000000..dcd12f4 --- /dev/null +++ b/slang/tests/F_anon_struct_typedef/anon_struct_typedef.rs
@@ -0,0 +1,9 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef struct { + int i; +} anon; + +anon myStruct; +
diff --git a/slang/tests/F_anon_struct_typedef/stderr.txt.expect b/slang/tests/F_anon_struct_typedef/stderr.txt.expect new file mode 100644 index 0000000..88df47d --- /dev/null +++ b/slang/tests/F_anon_struct_typedef/stderr.txt.expect
@@ -0,0 +1 @@ +anon_struct_typedef.rs:4:9: error: anonymous structures cannot be exported
diff --git a/slang/tests/F_anon_struct_typedef/stdout.txt.expect b/slang/tests/F_anon_struct_typedef/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_anon_struct_typedef/stdout.txt.expect
diff --git a/slang/tests/F_bad_pragmas/bad_pragmas.rs b/slang/tests/F_bad_pragmas/bad_pragmas.rs new file mode 100644 index 0000000..2ccd9a9 --- /dev/null +++ b/slang/tests/F_bad_pragmas/bad_pragmas.rs
@@ -0,0 +1,11 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(foo) + +#pragma ok(ok) +#pragma ok() +#pragma ok +#pragma +#pragma onlyLeft( +#pragma missingRight(paren +#pragma ok(not ok)
diff --git a/slang/tests/F_bad_pragmas/stderr.txt.expect b/slang/tests/F_bad_pragmas/stderr.txt.expect new file mode 100644 index 0000000..cc2e564 --- /dev/null +++ b/slang/tests/F_bad_pragmas/stderr.txt.expect
@@ -0,0 +1,7 @@ +bad_pragmas.rs:5:9: error: unknown pragma ignored +bad_pragmas.rs:6:9: error: unknown pragma ignored +bad_pragmas.rs:7:9: error: unknown pragma ignored +bad_pragmas.rs:8:8: error: unknown pragma ignored +bad_pragmas.rs:9:9: error: unknown pragma ignored +bad_pragmas.rs:10:9: error: unknown pragma ignored +bad_pragmas.rs:11:9: error: unknown pragma ignored
diff --git a/slang/tests/F_bad_pragmas/stdout.txt.expect b/slang/tests/F_bad_pragmas/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_bad_pragmas/stdout.txt.expect
diff --git a/slang/tests/F_bad_version_pragma/bad_version_pragma.rs b/slang/tests/F_bad_version_pragma/bad_version_pragma.rs new file mode 100644 index 0000000..10bdf7e --- /dev/null +++ b/slang/tests/F_bad_version_pragma/bad_version_pragma.rs
@@ -0,0 +1,6 @@ +#pragma version(2000) +#pragma version +#pragma version(1 +#pragma version(1a) +#pragma rs java_package_name(foo) +
diff --git a/slang/tests/F_bad_version_pragma/stderr.txt.expect b/slang/tests/F_bad_version_pragma/stderr.txt.expect new file mode 100644 index 0000000..68fc9ac --- /dev/null +++ b/slang/tests/F_bad_version_pragma/stderr.txt.expect
@@ -0,0 +1,4 @@ +bad_version_pragma.rs:1:17: error: pragma for version in source file must be set to 1 +bad_version_pragma.rs:2:16: error: pragma for version in source file must be set to 1 +bad_version_pragma.rs:3:18: error: expected a ')' +bad_version_pragma.rs:4:18: error: invalid digit 'a' in decimal constant
diff --git a/slang/tests/F_bad_version_pragma/stdout.txt.expect b/slang/tests/F_bad_version_pragma/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_bad_version_pragma/stdout.txt.expect
diff --git a/slang/tests/F_const_array_arg/const_array_arg.rs b/slang/tests/F_const_array_arg/const_array_arg.rs new file mode 100644 index 0000000..0cbb776 --- /dev/null +++ b/slang/tests/F_const_array_arg/const_array_arg.rs
@@ -0,0 +1,9 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void foo(float arr[3]) { +} + +void bar(float *ptr) { +} +
diff --git a/slang/tests/F_const_array_arg/stderr.txt.expect b/slang/tests/F_const_array_arg/stderr.txt.expect new file mode 100644 index 0000000..9b7ad1d --- /dev/null +++ b/slang/tests/F_const_array_arg/stderr.txt.expect
@@ -0,0 +1 @@ +const_array_arg.rs:4:10: error: exported function parameters may not have array type: 'float [3]'
diff --git a/slang/tests/F_const_array_arg/stdout.txt.expect b/slang/tests/F_const_array_arg/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_const_array_arg/stdout.txt.expect
diff --git a/slang/tests/F_ctxt_wrong_api/ctxt_wrong_api.rs b/slang/tests/F_ctxt_wrong_api/ctxt_wrong_api.rs new file mode 100644 index 0000000..cabf40e --- /dev/null +++ b/slang/tests/F_ctxt_wrong_api/ctxt_wrong_api.rs
@@ -0,0 +1,7 @@ +// -target-api 22 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL good(int in, rs_kernel_context context) { + return 0; +}
diff --git a/slang/tests/F_ctxt_wrong_api/stderr.txt.expect b/slang/tests/F_ctxt_wrong_api/stderr.txt.expect new file mode 100644 index 0000000..1ab01a2 --- /dev/null +++ b/slang/tests/F_ctxt_wrong_api/stderr.txt.expect
@@ -0,0 +1 @@ +ctxt_wrong_api.rs:5:28: error: unknown type name 'rs_kernel_context'
diff --git a/slang/tests/F_ctxt_wrong_api/stdout.txt.expect b/slang/tests/F_ctxt_wrong_api/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_ctxt_wrong_api/stdout.txt.expect
diff --git a/slang/tests/F_ctxt_wrong_name/context.rs b/slang/tests/F_ctxt_wrong_name/context.rs new file mode 100644 index 0000000..d39fbed --- /dev/null +++ b/slang/tests/F_ctxt_wrong_name/context.rs
@@ -0,0 +1,7 @@ +// -target-api 23 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL bad(int in, uint32_t x, rs_kernel_context ct) { + return 0; +}
diff --git a/slang/tests/F_ctxt_wrong_name/stderr.txt.expect b/slang/tests/F_ctxt_wrong_name/stderr.txt.expect new file mode 100644 index 0000000..b102ee6 --- /dev/null +++ b/slang/tests/F_ctxt_wrong_name/stderr.txt.expect
@@ -0,0 +1,2 @@ +context.rs:5:57: error: The special parameter of type 'rs_kernel_context' must be called 'context' instead of 'ct'. +context.rs:5:57: error: In compute kernel bad(), special parameter 'context' must be defined before special parameter 'x'.
diff --git a/slang/tests/F_ctxt_wrong_name/stdout.txt.expect b/slang/tests/F_ctxt_wrong_name/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_ctxt_wrong_name/stdout.txt.expect
diff --git a/slang/tests/F_ctxt_wrong_place/ctxt_wrong_place.rs b/slang/tests/F_ctxt_wrong_place/ctxt_wrong_place.rs new file mode 100644 index 0000000..29298ff --- /dev/null +++ b/slang/tests/F_ctxt_wrong_place/ctxt_wrong_place.rs
@@ -0,0 +1,11 @@ +// -target-api 23 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL good(int in, rs_kernel_context context, uint32_t x) { + return 0; +} + +int RS_KERNEL bad(int in, uint32_t x, rs_kernel_context context) { + return 0; +}
diff --git a/slang/tests/F_ctxt_wrong_place/stderr.txt.expect b/slang/tests/F_ctxt_wrong_place/stderr.txt.expect new file mode 100644 index 0000000..fc2a67d --- /dev/null +++ b/slang/tests/F_ctxt_wrong_place/stderr.txt.expect
@@ -0,0 +1 @@ +ctxt_wrong_place.rs:9:57: error: In compute kernel bad(), special parameter 'context' must be defined before special parameter 'x'.
diff --git a/slang/tests/F_ctxt_wrong_place/stdout.txt.expect b/slang/tests/F_ctxt_wrong_place/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_ctxt_wrong_place/stdout.txt.expect
diff --git a/slang/tests/F_ctxt_wrong_type/ctxt_wrong_type.rs b/slang/tests/F_ctxt_wrong_type/ctxt_wrong_type.rs new file mode 100644 index 0000000..11d2433 --- /dev/null +++ b/slang/tests/F_ctxt_wrong_type/ctxt_wrong_type.rs
@@ -0,0 +1,15 @@ +// -target-api 23 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL good1(int in, rs_kernel_context context) { + return 0; +} + +int RS_KERNEL good2(int in, const rs_kernel_context context) { + return 0; +} + +int RS_KERNEL bad3(int in, const rs_kernel_context *context) { + return 0; +}
diff --git a/slang/tests/F_ctxt_wrong_type/stderr.txt.expect b/slang/tests/F_ctxt_wrong_type/stderr.txt.expect new file mode 100644 index 0000000..ff2d98c --- /dev/null +++ b/slang/tests/F_ctxt_wrong_type/stderr.txt.expect
@@ -0,0 +1 @@ +ctxt_wrong_type.rs:13:53: error: Special parameter 'context' must be of type 'rs_kernel_context'. It is of type 'const rs_kernel_context *'.
diff --git a/slang/tests/F_ctxt_wrong_type/stdout.txt.expect b/slang/tests/F_ctxt_wrong_type/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_ctxt_wrong_type/stdout.txt.expect
diff --git a/slang/tests/F_extern_const/extern_const.rs b/slang/tests/F_extern_const/extern_const.rs new file mode 100644 index 0000000..bf630de --- /dev/null +++ b/slang/tests/F_extern_const/extern_const.rs
@@ -0,0 +1,4 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +extern const int extern_const_int;
diff --git a/slang/tests/F_extern_const/stderr.txt.expect b/slang/tests/F_extern_const/stderr.txt.expect new file mode 100644 index 0000000..567c9a5 --- /dev/null +++ b/slang/tests/F_extern_const/stderr.txt.expect
@@ -0,0 +1 @@ +extern_const.rs:4:18: error: invalid declaration of uninitialized constant variable 'extern_const_int'
diff --git a/slang/tests/F_extern_const/stdout.txt.expect b/slang/tests/F_extern_const/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_extern_const/stdout.txt.expect
diff --git a/slang/tests/F_float3_array/float3_array.rs b/slang/tests/F_float3_array/float3_array.rs new file mode 100644 index 0000000..b928569 --- /dev/null +++ b/slang/tests/F_float3_array/float3_array.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +float3 f[2]; +
diff --git a/slang/tests/F_float3_array/stderr.txt.expect b/slang/tests/F_float3_array/stderr.txt.expect new file mode 100644 index 0000000..c07208c --- /dev/null +++ b/slang/tests/F_float3_array/stderr.txt.expect
@@ -0,0 +1 @@ +float3_array.rs:4:8: error: arrays of width 3 vector types cannot be exported: 'f'
diff --git a/slang/tests/F_float3_array/stdout.txt.expect b/slang/tests/F_float3_array/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_float3_array/stdout.txt.expect
diff --git a/slang/tests/F_float3_v13/float3_v13.rs b/slang/tests/F_float3_v13/float3_v13.rs new file mode 100644 index 0000000..6957222 --- /dev/null +++ b/slang/tests/F_float3_v13/float3_v13.rs
@@ -0,0 +1,10 @@ +// -target-api 13 +#pragma version(1) +#pragma rs java_package_name(foo) + +struct s { + float3 f; +}; + +struct s myStruct; +
diff --git a/slang/tests/F_float3_v13/stderr.txt.expect b/slang/tests/F_float3_v13/stderr.txt.expect new file mode 100644 index 0000000..6d84d10 --- /dev/null +++ b/slang/tests/F_float3_v13/stderr.txt.expect
@@ -0,0 +1 @@ +float3_v13.rs:9:10: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'myStruct'
diff --git a/slang/tests/F_float3_v13/stdout.txt.expect b/slang/tests/F_float3_v13/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_float3_v13/stdout.txt.expect
diff --git a/slang/tests/F_foreach_forward_reference/foreach_forward_reference.rs b/slang/tests/F_foreach_forward_reference/foreach_forward_reference.rs new file mode 100644 index 0000000..904f6e9 --- /dev/null +++ b/slang/tests/F_foreach_forward_reference/foreach_forward_reference.rs
@@ -0,0 +1,13 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +void testStart(rs_allocation in, rs_allocation out) { + rsForEach(goo, in, out); +} + +int RS_KERNEL goo(int a) { + return a; +} + +
diff --git a/slang/tests/F_foreach_forward_reference/stderr.txt.expect b/slang/tests/F_foreach_forward_reference/stderr.txt.expect new file mode 100644 index 0000000..8e214b1 --- /dev/null +++ b/slang/tests/F_foreach_forward_reference/stderr.txt.expect
@@ -0,0 +1,2 @@ +foreach_forward_reference.rs:6:13: error: use of undeclared identifier 'goo'; did you mean 'goto'? +foreach_forward_reference.rs:6:13: error: expected expression
diff --git a/slang/tests/F_foreach_forward_reference/stdout.txt.expect b/slang/tests/F_foreach_forward_reference/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_foreach_forward_reference/stdout.txt.expect
diff --git a/slang/tests/F_foreach_from_kernel/foreach_from_kernel.rs b/slang/tests/F_foreach_from_kernel/foreach_from_kernel.rs new file mode 100644 index 0000000..911170c --- /dev/null +++ b/slang/tests/F_foreach_from_kernel/foreach_from_kernel.rs
@@ -0,0 +1,21 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +int __attribute__((kernel)) foo(int a) { + return a; +} + +rs_allocation g_in; +rs_allocation g_out; + +int __attribute__((kernel)) goo(int a) { + rsForEach(foo, g_in, g_out); + return a; +} + +void bar() { + rsForEach(foo, g_in, g_out); +} + +
diff --git a/slang/tests/F_foreach_from_kernel/stderr.txt.expect b/slang/tests/F_foreach_from_kernel/stderr.txt.expect new file mode 100644 index 0000000..d9b82b0 --- /dev/null +++ b/slang/tests/F_foreach_from_kernel/stderr.txt.expect
@@ -0,0 +1 @@ +foreach_from_kernel.rs:13:3: error: Invalid kernel launch call made from inside another kernel.
diff --git a/slang/tests/F_foreach_from_kernel/stdout.txt.expect b/slang/tests/F_foreach_from_kernel/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_foreach_from_kernel/stdout.txt.expect
diff --git a/slang/tests/F_foreach_non_kernel/foreach_non_kernel.rs b/slang/tests/F_foreach_non_kernel/foreach_non_kernel.rs new file mode 100644 index 0000000..dafce3c --- /dev/null +++ b/slang/tests/F_foreach_non_kernel/foreach_non_kernel.rs
@@ -0,0 +1,18 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +void oldFoo(const int* a, int *b) { + *b = *a; +} + +int foo(int a) { + return a; +} + +void testStart(rs_allocation in, rs_allocation out) { + rsForEach(oldFoo, in, out); + rsForEach(foo, in, out); +} + +
diff --git a/slang/tests/F_foreach_non_kernel/stderr.txt.expect b/slang/tests/F_foreach_non_kernel/stderr.txt.expect new file mode 100644 index 0000000..5ec8b50 --- /dev/null +++ b/slang/tests/F_foreach_non_kernel/stderr.txt.expect
@@ -0,0 +1,2 @@ +foreach_non_kernel.rs:14:3: error: rsForEach applied to function oldFoo defined without "kernel" attribute +foreach_non_kernel.rs:15:3: error: rsForEach applied to function foo defined without "kernel" attribute
diff --git a/slang/tests/F_foreach_non_kernel/stdout.txt.expect b/slang/tests/F_foreach_non_kernel/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_foreach_non_kernel/stdout.txt.expect
diff --git a/slang/tests/F_foreach_unexpected_allocs/foreach_unexpected_allocs.rs b/slang/tests/F_foreach_unexpected_allocs/foreach_unexpected_allocs.rs new file mode 100644 index 0000000..c77b820 --- /dev/null +++ b/slang/tests/F_foreach_unexpected_allocs/foreach_unexpected_allocs.rs
@@ -0,0 +1,12 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +int RS_KERNEL foo(int a) { + return a; +} + +void testStart(rs_allocation in, rs_allocation out) { + rsForEach(foo, in); + rsForEach(foo, in, in, out); +}
diff --git a/slang/tests/F_foreach_unexpected_allocs/stderr.txt.expect b/slang/tests/F_foreach_unexpected_allocs/stderr.txt.expect new file mode 100644 index 0000000..0f5b389 --- /dev/null +++ b/slang/tests/F_foreach_unexpected_allocs/stderr.txt.expect
@@ -0,0 +1,2 @@ +foreach_unexpected_allocs.rs:10:3: error: Number of input and output allocations unexpected for kernel function foo +foreach_unexpected_allocs.rs:11:3: error: Number of input and output allocations unexpected for kernel function foo
diff --git a/slang/tests/F_foreach_unexpected_allocs/stdout.txt.expect b/slang/tests/F_foreach_unexpected_allocs/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_foreach_unexpected_allocs/stdout.txt.expect
diff --git a/slang/tests/F_foreach_unexpected_kernel_arg/foreach_unexpected_kernel_arg.rs b/slang/tests/F_foreach_unexpected_kernel_arg/foreach_unexpected_kernel_arg.rs new file mode 100644 index 0000000..338d7f2 --- /dev/null +++ b/slang/tests/F_foreach_unexpected_kernel_arg/foreach_unexpected_kernel_arg.rs
@@ -0,0 +1,17 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +int RS_KERNEL foo(int a) { + return a; +} + +void testStart(rs_allocation in, rs_allocation out) { + int (*fp)(int) = &foo; + rsForEach(fp, in, out); + rsForEach(&foo, in, out); + rsForEachWithOptions(fp, NULL, in, out); + rsForEachWithOptions(&foo, NULL, in, out); +} + +
diff --git a/slang/tests/F_foreach_unexpected_kernel_arg/stderr.txt.expect b/slang/tests/F_foreach_unexpected_kernel_arg/stderr.txt.expect new file mode 100644 index 0000000..880117e --- /dev/null +++ b/slang/tests/F_foreach_unexpected_kernel_arg/stderr.txt.expect
@@ -0,0 +1,4 @@ +foreach_unexpected_kernel_arg.rs:11:13: error: Invalid kernel launch call. Expects a function designator for the first argument. +foreach_unexpected_kernel_arg.rs:12:13: error: Invalid kernel launch call. Expects a function designator for the first argument. +foreach_unexpected_kernel_arg.rs:13:24: error: Invalid kernel launch call. Expects a function designator for the first argument. +foreach_unexpected_kernel_arg.rs:14:24: error: Invalid kernel launch call. Expects a function designator for the first argument.
diff --git a/slang/tests/F_foreach_unexpected_kernel_arg/stdout.txt.expect b/slang/tests/F_foreach_unexpected_kernel_arg/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_foreach_unexpected_kernel_arg/stdout.txt.expect
diff --git a/slang/tests/F_fp16_wrong_api/fp16_wrong_api.rs b/slang/tests/F_fp16_wrong_api/fp16_wrong_api.rs new file mode 100644 index 0000000..f51b242 --- /dev/null +++ b/slang/tests/F_fp16_wrong_api/fp16_wrong_api.rs
@@ -0,0 +1,7 @@ +// -target-api=22 +#pragma version(1) +#pragma rs java_package_name(foo) + +__fp16 RS_KERNEL foo(__fp16 a) { + return (a+1); +}
diff --git a/slang/tests/F_fp16_wrong_api/stderr.txt.expect b/slang/tests/F_fp16_wrong_api/stderr.txt.expect new file mode 100644 index 0000000..9764b12 --- /dev/null +++ b/slang/tests/F_fp16_wrong_api/stderr.txt.expect
@@ -0,0 +1,2 @@ +fp16_wrong_api.rs:5:18: error: function return value cannot have __fp16 type; did you forget * ? +fp16_wrong_api.rs:5:29: error: parameters cannot have __fp16 type; did you forget * ?
diff --git a/slang/tests/F_fp16_wrong_api/stdout.txt.expect b/slang/tests/F_fp16_wrong_api/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_fp16_wrong_api/stdout.txt.expect
diff --git a/slang/tests/F_fs_oldkernel/fs_oldkernel.fs b/slang/tests/F_fs_oldkernel/fs_oldkernel.fs new file mode 100644 index 0000000..4f607a5 --- /dev/null +++ b/slang/tests/F_fs_oldkernel/fs_oldkernel.fs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void old_kernel(const uint32_t *ain, uint32_t x, uint32_t y) { +} + +uint32_t* bad_kernel(const uint32_t *ain, uint32_t x, uint32_t y) { + return 0; +} +
diff --git a/slang/tests/F_fs_oldkernel/stderr.txt.expect b/slang/tests/F_fs_oldkernel/stderr.txt.expect new file mode 100644 index 0000000..5b53b56 --- /dev/null +++ b/slang/tests/F_fs_oldkernel/stderr.txt.expect
@@ -0,0 +1,3 @@ +fs_oldkernel.fs:4:17: error: Pointers are forbidden in Filterscript: 'ain' +fs_oldkernel.fs:7:1: error: Pointers are forbidden in Filterscript: 'bad_kernel' +fs_oldkernel.fs:7:22: error: Pointers are forbidden in Filterscript: 'ain'
diff --git a/slang/tests/F_fs_oldkernel/stdout.txt.expect b/slang/tests/F_fs_oldkernel/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_fs_oldkernel/stdout.txt.expect
diff --git a/slang/tests/F_fs_ptr/fs_ptr.fs b/slang/tests/F_fs_ptr/fs_ptr.fs new file mode 100644 index 0000000..b6789ba --- /dev/null +++ b/slang/tests/F_fs_ptr/fs_ptr.fs
@@ -0,0 +1,39 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int *i; + +struct f { + int i; + float *pf; + char c; + short *ps; +}; + +int ia[10]; + +int RS_KERNEL root(uint32_t ain) { + char *c; + + c = (char*) ain; // TODO(srhines): This is ok today. + return 0; +} + +void RS_KERNEL in_only(uint32_t ain) { +} + +int RS_KERNEL out_only() { + return 0; +} + +int RS_KERNEL everything(uint32_t ain, uint32_t x, uint32_t y) { + return (int)&ain; // TODO(srhines): This is ok today. +} + +void old_kernel(const uint32_t *ain, uint32_t x, uint32_t y) { +} + +void test_call() { + int i = root(ia[4]); +} +
diff --git a/slang/tests/F_fs_ptr/stderr.txt.expect b/slang/tests/F_fs_ptr/stderr.txt.expect new file mode 100644 index 0000000..2ff21f9 --- /dev/null +++ b/slang/tests/F_fs_ptr/stderr.txt.expect
@@ -0,0 +1,3 @@ +fs_ptr.fs:4:6: error: Pointers are forbidden in Filterscript: 'i' +fs_ptr.fs:16:9: error: Pointers are forbidden in Filterscript: 'c' +fs_ptr.fs:33:17: error: Pointers are forbidden in Filterscript: 'ain'
diff --git a/slang/tests/F_fs_ptr/stdout.txt.expect b/slang/tests/F_fs_ptr/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_fs_ptr/stdout.txt.expect
diff --git a/slang/tests/F_fs_types/fs_types.fs b/slang/tests/F_fs_types/fs_types.fs new file mode 100644 index 0000000..0fae063 --- /dev/null +++ b/slang/tests/F_fs_types/fs_types.fs
@@ -0,0 +1,32 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +double d; + +struct s { + int i; + double d; + char c; + long l; +}; + +struct s myS; + +void foo_d(double d) { + double e; + float f = 0.0; + e = d; +} + +void foo_l(long l) { + long m; + int i = 1l; + m = l; +} + +void foo_ll(long long l) { + long long m; + int i = 1ll; + m = l; +} +
diff --git a/slang/tests/F_fs_types/stderr.txt.expect b/slang/tests/F_fs_types/stderr.txt.expect new file mode 100644 index 0000000..f0d36a3 --- /dev/null +++ b/slang/tests/F_fs_types/stderr.txt.expect
@@ -0,0 +1,14 @@ +fs_types.fs:4:8: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'd' +fs_types.fs:13:10: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'myS' +fs_types.fs:15:12: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'd' +fs_types.fs:16:12: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'e' +fs_types.fs:17:15: error: Builtin types > 32 bits in size are forbidden in Filterscript +fs_types.fs:18:7: error: Builtin types > 32 bits in size are forbidden in Filterscript +fs_types.fs:21:12: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'l' +fs_types.fs:22:10: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'm' +fs_types.fs:23:13: error: Builtin types > 32 bits in size are forbidden in Filterscript +fs_types.fs:24:7: error: Builtin types > 32 bits in size are forbidden in Filterscript +fs_types.fs:27:13: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'l' +fs_types.fs:28:15: error: Builtin types > 32 bits in size are forbidden in Filterscript: 'm' +fs_types.fs:29:13: error: Builtin types > 32 bits in size are forbidden in Filterscript +fs_types.fs:30:7: error: Builtin types > 32 bits in size are forbidden in Filterscript
diff --git a/slang/tests/F_fs_types/stdout.txt.expect b/slang/tests/F_fs_types/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_fs_types/stdout.txt.expect
diff --git a/slang/tests/F_global_init/global_init.rs b/slang/tests/F_global_init/global_init.rs new file mode 100644 index 0000000..8d35184 --- /dev/null +++ b/slang/tests/F_global_init/global_init.rs
@@ -0,0 +1,20 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int ia[4] = {0, 1}; +int i = 2; +int2 i2 = {3, 4}; +float fa[4] = {0.0, 1.0, 2.9999}; +char ca[2] = {'a', 7}; +bool ba[2] = {false, true}; + +const int ic = 99; + +int ica[2] = {ic, 1000}; + +struct s { + int i; +}; + +struct s myS = {9}; +
diff --git a/slang/tests/F_global_init/stderr.txt.expect b/slang/tests/F_global_init/stderr.txt.expect new file mode 100644 index 0000000..19360f4 --- /dev/null +++ b/slang/tests/F_global_init/stderr.txt.expect
@@ -0,0 +1 @@ +global_init.rs:19:10: error: Reflection of initializer to variable 'myS' (of type 's') is unsupported currently.
diff --git a/slang/tests/F_global_init/stdout.txt.expect b/slang/tests/F_global_init/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_global_init/stdout.txt.expect
diff --git a/slang/tests/F_incompatible_handles/incompatible_handles.rs b/slang/tests/F_incompatible_handles/incompatible_handles.rs new file mode 100644 index 0000000..13f24fd --- /dev/null +++ b/slang/tests/F_incompatible_handles/incompatible_handles.rs
@@ -0,0 +1,8 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void foo() { + rs_allocation a; + rs_element e; + a = e; +}
diff --git a/slang/tests/F_incompatible_handles/stderr.txt.expect b/slang/tests/F_incompatible_handles/stderr.txt.expect new file mode 100644 index 0000000..a0cb2f3 --- /dev/null +++ b/slang/tests/F_incompatible_handles/stderr.txt.expect
@@ -0,0 +1 @@ +incompatible_handles.rs:7:5: error: assigning to 'rs_allocation' (aka 'struct rs_allocation') from incompatible type 'rs_element' (aka 'struct rs_element')
diff --git a/slang/tests/F_incompatible_handles/stdout.txt.expect b/slang/tests/F_incompatible_handles/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_incompatible_handles/stdout.txt.expect
diff --git a/slang/tests/F_init_nonvoid/init_nonvoid.rs b/slang/tests/F_init_nonvoid/init_nonvoid.rs new file mode 100644 index 0000000..7a1295c --- /dev/null +++ b/slang/tests/F_init_nonvoid/init_nonvoid.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int init(void) { + return 0; +}
diff --git a/slang/tests/F_init_nonvoid/stderr.txt.expect b/slang/tests/F_init_nonvoid/stderr.txt.expect new file mode 100644 index 0000000..c47c6b6 --- /dev/null +++ b/slang/tests/F_init_nonvoid/stderr.txt.expect
@@ -0,0 +1 @@ +init_nonvoid.rs:4:5: error: init(void) is required to have a void return type
diff --git a/slang/tests/F_init_nonvoid/stdout.txt.expect b/slang/tests/F_init_nonvoid/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_init_nonvoid/stdout.txt.expect
diff --git a/slang/tests/F_init_params/init_params.rs b/slang/tests/F_init_params/init_params.rs new file mode 100644 index 0000000..1438c45 --- /dev/null +++ b/slang/tests/F_init_params/init_params.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void init(int i) { + return; +}
diff --git a/slang/tests/F_init_params/stderr.txt.expect b/slang/tests/F_init_params/stderr.txt.expect new file mode 100644 index 0000000..7f2e8d0 --- /dev/null +++ b/slang/tests/F_init_params/stderr.txt.expect
@@ -0,0 +1 @@ +init_params.rs:4:6: error: init(void) is required to have no parameters
diff --git a/slang/tests/F_init_params/stdout.txt.expect b/slang/tests/F_init_params/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_init_params/stdout.txt.expect
diff --git a/slang/tests/F_int_ptr_ptr/int_ptr_ptr.rs b/slang/tests/F_int_ptr_ptr/int_ptr_ptr.rs new file mode 100644 index 0000000..8ab7bb8 --- /dev/null +++ b/slang/tests/F_int_ptr_ptr/int_ptr_ptr.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int** myPtr; +static int **okPtr; +
diff --git a/slang/tests/F_int_ptr_ptr/stderr.txt.expect b/slang/tests/F_int_ptr_ptr/stderr.txt.expect new file mode 100644 index 0000000..5a6da69 --- /dev/null +++ b/slang/tests/F_int_ptr_ptr/stderr.txt.expect
@@ -0,0 +1 @@ +int_ptr_ptr.rs:4:7: error: multiple levels of pointers cannot be exported: 'myPtr'
diff --git a/slang/tests/F_int_ptr_ptr/stdout.txt.expect b/slang/tests/F_int_ptr_ptr/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_int_ptr_ptr/stdout.txt.expect
diff --git a/slang/tests/F_invoke_return/invoke_return.rs b/slang/tests/F_invoke_return/invoke_return.rs new file mode 100644 index 0000000..906b1f0 --- /dev/null +++ b/slang/tests/F_invoke_return/invoke_return.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int foo() { + return 0; +}
diff --git a/slang/tests/F_invoke_return/stderr.txt.expect b/slang/tests/F_invoke_return/stderr.txt.expect new file mode 100644 index 0000000..abfd902 --- /dev/null +++ b/slang/tests/F_invoke_return/stderr.txt.expect
@@ -0,0 +1 @@ +invoke_return.rs:4:5: error: invokable non-static functions are required to return void
diff --git a/slang/tests/F_invoke_return/stdout.txt.expect b/slang/tests/F_invoke_return/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_invoke_return/stdout.txt.expect
diff --git a/slang/tests/F_kernel_16/kernel_16.rs b/slang/tests/F_kernel_16/kernel_16.rs new file mode 100644 index 0000000..77bd718 --- /dev/null +++ b/slang/tests/F_kernel_16/kernel_16.rs
@@ -0,0 +1,7 @@ +// -target-api 16 +#pragma version(1) +#pragma rs java_package_name(foo) + +void RS_KERNEL root(int i) { +} +
diff --git a/slang/tests/F_kernel_16/stderr.txt.expect b/slang/tests/F_kernel_16/stderr.txt.expect new file mode 100644 index 0000000..ef61120 --- /dev/null +++ b/slang/tests/F_kernel_16/stderr.txt.expect
@@ -0,0 +1 @@ +kernel_16.rs:5:16: error: Compute kernel root() targeting SDK levels 11-16 may not use pass-by-value with __attribute__((kernel))
diff --git a/slang/tests/F_kernel_16/stdout.txt.expect b/slang/tests/F_kernel_16/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_kernel_16/stdout.txt.expect
diff --git a/slang/tests/F_kernel_badattr/kernel_badattr.rs b/slang/tests/F_kernel_badattr/kernel_badattr.rs new file mode 100644 index 0000000..ef43d44 --- /dev/null +++ b/slang/tests/F_kernel_badattr/kernel_badattr.rs
@@ -0,0 +1,18 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int __attribute__((kernel("unimplemented"))) kernel(int arg) { + return 0; +} + +int __attribute__((kernel(7))) kernel2(int arg) { + return 0; +} + +int __attribute__((kernel("reduce", 1))) kernel3(int arg) { + return 0; +} + +int __attribute__((kernel("reduce"))) kernel4(int arg) { + return 0; +}
diff --git a/slang/tests/F_kernel_badattr/stderr.txt.expect b/slang/tests/F_kernel_badattr/stderr.txt.expect new file mode 100644 index 0000000..0d206ad --- /dev/null +++ b/slang/tests/F_kernel_badattr/stderr.txt.expect
@@ -0,0 +1,4 @@ +kernel_badattr.rs:8:27: error: 'kernel' attribute requires a string +kernel_badattr.rs:12:20: error: 'kernel' attribute takes no more than 1 argument +kernel_badattr.rs:4:46: error: Unknown kernel attribute argument 'unimplemented' in declaration of function 'kernel' +kernel_badattr.rs:16:39: error: Unknown kernel attribute argument 'reduce' in declaration of function 'kernel4'
diff --git a/slang/tests/F_kernel_badattr/stdout.txt.expect b/slang/tests/F_kernel_badattr/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_kernel_badattr/stdout.txt.expect
diff --git a/slang/tests/F_kernel_badsig/kernel_badsig.rs b/slang/tests/F_kernel_badsig/kernel_badsig.rs new file mode 100644 index 0000000..394e9c9 --- /dev/null +++ b/slang/tests/F_kernel_badsig/kernel_badsig.rs
@@ -0,0 +1,7 @@ +// -target-api 22 +#pragma version(1) +#pragma rs java_package_name(foo) + +void RS_KERNEL root(uint32_t x) { +} +
diff --git a/slang/tests/F_kernel_badsig/stderr.txt.expect b/slang/tests/F_kernel_badsig/stderr.txt.expect new file mode 100644 index 0000000..ca771ad --- /dev/null +++ b/slang/tests/F_kernel_badsig/stderr.txt.expect
@@ -0,0 +1 @@ +kernel_badsig.rs:5:16: error: Compute kernel root() targeting SDK levels 11-22 must have at least one input parameter or a non-void return type
diff --git a/slang/tests/F_kernel_badsig/stdout.txt.expect b/slang/tests/F_kernel_badsig/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_kernel_badsig/stdout.txt.expect
diff --git a/slang/tests/F_kernel_noattr/kernel_noattr.rs b/slang/tests/F_kernel_noattr/kernel_noattr.rs new file mode 100644 index 0000000..27c5dcd --- /dev/null +++ b/slang/tests/F_kernel_noattr/kernel_noattr.rs
@@ -0,0 +1,18 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int root(uint32_t x) { + return 0; +} + +void in_only(uint32_t ain) { +} + +int out_only() { + return 0; +} + +int everything(uint32_t ain, uint32_t x, uint32_t y) { + return 0; +} +
diff --git a/slang/tests/F_kernel_noattr/stderr.txt.expect b/slang/tests/F_kernel_noattr/stderr.txt.expect new file mode 100644 index 0000000..d8e054f --- /dev/null +++ b/slang/tests/F_kernel_noattr/stderr.txt.expect
@@ -0,0 +1,4 @@ +kernel_noattr.rs:4:5: error: Compute kernel root() is required to return a void type +kernel_noattr.rs:4:5: error: Compute kernel root() must have at least one parameter for in or out +kernel_noattr.rs:11:5: error: invokable non-static functions are required to return void +kernel_noattr.rs:15:5: error: invokable non-static functions are required to return void
diff --git a/slang/tests/F_kernel_noattr/stdout.txt.expect b/slang/tests/F_kernel_noattr/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_kernel_noattr/stdout.txt.expect
diff --git a/slang/tests/F_kernel_ptr_param/kernel_ptr_param.rs b/slang/tests/F_kernel_ptr_param/kernel_ptr_param.rs new file mode 100644 index 0000000..fc89717 --- /dev/null +++ b/slang/tests/F_kernel_ptr_param/kernel_ptr_param.rs
@@ -0,0 +1,9 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void RS_KERNEL root(int *i) { +} + +void RS_KERNEL voidptr(void *v) { +} +
diff --git a/slang/tests/F_kernel_ptr_param/stderr.txt.expect b/slang/tests/F_kernel_ptr_param/stderr.txt.expect new file mode 100644 index 0000000..706d437 --- /dev/null +++ b/slang/tests/F_kernel_ptr_param/stderr.txt.expect
@@ -0,0 +1,2 @@ +kernel_ptr_param.rs:4:26: error: Compute kernel root() cannot have parameter 'i' of pointer type: 'int *' +kernel_ptr_param.rs:7:30: error: Compute kernel voidptr() cannot have parameter 'v' of pointer type: 'void *'
diff --git a/slang/tests/F_kernel_ptr_param/stdout.txt.expect b/slang/tests/F_kernel_ptr_param/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_kernel_ptr_param/stdout.txt.expect
diff --git a/slang/tests/F_kernel_ptr_ret_val/kernel_ptr_ret_val.rs b/slang/tests/F_kernel_ptr_ret_val/kernel_ptr_ret_val.rs new file mode 100644 index 0000000..82fbd2e --- /dev/null +++ b/slang/tests/F_kernel_ptr_ret_val/kernel_ptr_ret_val.rs
@@ -0,0 +1,7 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int * RS_KERNEL root() { + return NULL; +} +
diff --git a/slang/tests/F_kernel_ptr_ret_val/stderr.txt.expect b/slang/tests/F_kernel_ptr_ret_val/stderr.txt.expect new file mode 100644 index 0000000..7567c1d --- /dev/null +++ b/slang/tests/F_kernel_ptr_ret_val/stderr.txt.expect
@@ -0,0 +1 @@ +kernel_ptr_ret_val.rs:4:1: error: Compute kernel root() cannot return a pointer type: 'int *'
diff --git a/slang/tests/F_kernel_ptr_ret_val/stdout.txt.expect b/slang/tests/F_kernel_ptr_ret_val/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_kernel_ptr_ret_val/stdout.txt.expect
diff --git a/slang/tests/F_kernel_static/kernel_static.rs b/slang/tests/F_kernel_static/kernel_static.rs new file mode 100644 index 0000000..c160cd9 --- /dev/null +++ b/slang/tests/F_kernel_static/kernel_static.rs
@@ -0,0 +1,20 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +static int gi; + +static void not_a_kernel(int i) { + static int j; + int k; + j = i; +} + +int RS_KERNEL root(uint32_t ain) { + static const int ci; + static int i; + return 0; +} + +static int RS_KERNEL static_kernel() { + return 0; +}
diff --git a/slang/tests/F_kernel_static/stderr.txt.expect b/slang/tests/F_kernel_static/stderr.txt.expect new file mode 100644 index 0000000..695fbb8 --- /dev/null +++ b/slang/tests/F_kernel_static/stderr.txt.expect
@@ -0,0 +1,2 @@ +kernel_static.rs:14:14: error: Non-const static variables are not allowed in kernels: 'i' +kernel_static.rs:18:22: error: Invalid use of attribute kernel with static function declaration: static_kernel
diff --git a/slang/tests/F_kernel_static/stdout.txt.expect b/slang/tests/F_kernel_static/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_kernel_static/stdout.txt.expect
diff --git a/slang/tests/F_large_array/large_array.rs b/slang/tests/F_large_array/large_array.rs new file mode 100644 index 0000000..db53e2e --- /dev/null +++ b/slang/tests/F_large_array/large_array.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +char arr_pass[4294967295]; +char arr_fail[4294967296]; +
diff --git a/slang/tests/F_large_array/stderr.txt.expect b/slang/tests/F_large_array/stderr.txt.expect new file mode 100644 index 0000000..e6c5dd1 --- /dev/null +++ b/slang/tests/F_large_array/stderr.txt.expect
@@ -0,0 +1 @@ +large_array.rs:5:15: error: array is too large (4294967296 elements)
diff --git a/slang/tests/F_large_array/stdout.txt.expect b/slang/tests/F_large_array/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_large_array/stdout.txt.expect
diff --git a/slang/tests/F_mix_vector/mix_vector.rs b/slang/tests/F_mix_vector/mix_vector.rs new file mode 100644 index 0000000..2311479 --- /dev/null +++ b/slang/tests/F_mix_vector/mix_vector.rs
@@ -0,0 +1,11 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void foo() { + float4 f4; + (void)f4.xg; + (void)f4.ry; + f4.xr = f4.ba; + return; +} +
diff --git a/slang/tests/F_mix_vector/stderr.txt.expect b/slang/tests/F_mix_vector/stderr.txt.expect new file mode 100644 index 0000000..a4af2cc --- /dev/null +++ b/slang/tests/F_mix_vector/stderr.txt.expect
@@ -0,0 +1,3 @@ +mix_vector.rs:6:13: error: illegal vector component name 'g' +mix_vector.rs:7:13: error: illegal vector component name 'y' +mix_vector.rs:8:7: error: illegal vector component name 'r'
diff --git a/slang/tests/F_mix_vector/stdout.txt.expect b/slang/tests/F_mix_vector/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_mix_vector/stdout.txt.expect
diff --git a/slang/tests/F_multi_export_errors/multi_export_errors.rs b/slang/tests/F_multi_export_errors/multi_export_errors.rs new file mode 100644 index 0000000..020fa14 --- /dev/null +++ b/slang/tests/F_multi_export_errors/multi_export_errors.rs
@@ -0,0 +1,13 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int init(void) { + return 0; +} + +void root(void) { +} + +int foo(void) { + return 5; +}
diff --git a/slang/tests/F_multi_export_errors/stderr.txt.expect b/slang/tests/F_multi_export_errors/stderr.txt.expect new file mode 100644 index 0000000..a39a137 --- /dev/null +++ b/slang/tests/F_multi_export_errors/stderr.txt.expect
@@ -0,0 +1,3 @@ +multi_export_errors.rs:4:5: error: init(void) is required to have a void return type +multi_export_errors.rs:8:6: error: root() is required to return an int for graphics usage +multi_export_errors.rs:11:5: error: invokable non-static functions are required to return void
diff --git a/slang/tests/F_multi_export_errors/stdout.txt.expect b/slang/tests/F_multi_export_errors/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_multi_export_errors/stdout.txt.expect
diff --git a/slang/tests/F_multi_in_target_version/multi_in_target_version.rs b/slang/tests/F_multi_in_target_version/multi_in_target_version.rs new file mode 100644 index 0000000..429bf5b --- /dev/null +++ b/slang/tests/F_multi_in_target_version/multi_in_target_version.rs
@@ -0,0 +1,8 @@ +// -target-api 20 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL root(uint32_t in0, uint32_t in1, int x, int y) { + return 0; +} +
diff --git a/slang/tests/F_multi_in_target_version/stderr.txt.expect b/slang/tests/F_multi_in_target_version/stderr.txt.expect new file mode 100644 index 0000000..49af40d --- /dev/null +++ b/slang/tests/F_multi_in_target_version/stderr.txt.expect
@@ -0,0 +1 @@ +multi_in_target_version.rs:5:43: error: Invalid parameter 'in1' for compute kernel root(). Kernels targeting SDK levels 11-22 may not use multiple input parameters.
diff --git a/slang/tests/F_multi_in_target_version/stdout.txt.expect b/slang/tests/F_multi_in_target_version/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_multi_in_target_version/stdout.txt.expect
diff --git a/slang/tests/F_multidim_array/multidim_array.rs b/slang/tests/F_multidim_array/multidim_array.rs new file mode 100644 index 0000000..cf967e0 --- /dev/null +++ b/slang/tests/F_multidim_array/multidim_array.rs
@@ -0,0 +1,4 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int arr[2][2];
diff --git a/slang/tests/F_multidim_array/stderr.txt.expect b/slang/tests/F_multidim_array/stderr.txt.expect new file mode 100644 index 0000000..fdafe4a --- /dev/null +++ b/slang/tests/F_multidim_array/stderr.txt.expect
@@ -0,0 +1 @@ +multidim_array.rs:4:5: error: multidimensional arrays cannot be exported: 'arr'
diff --git a/slang/tests/F_multidim_array/stdout.txt.expect b/slang/tests/F_multidim_array/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_multidim_array/stdout.txt.expect
diff --git a/slang/tests/F_no_java_package_name/no_java_package_name.rs b/slang/tests/F_no_java_package_name/no_java_package_name.rs new file mode 100644 index 0000000..bfa6f9d --- /dev/null +++ b/slang/tests/F_no_java_package_name/no_java_package_name.rs
@@ -0,0 +1,6 @@ +#pragma version(1) + +int root(void) { + return 10; +} +
diff --git a/slang/tests/F_no_java_package_name/stderr.txt.expect b/slang/tests/F_no_java_package_name/stderr.txt.expect new file mode 100644 index 0000000..c554bc6 --- /dev/null +++ b/slang/tests/F_no_java_package_name/stderr.txt.expect
@@ -0,0 +1 @@ +no_java_package_name.rs:7:1: error: missing "#pragma rs java_package_name(com.foo.bar)" in source file
diff --git a/slang/tests/F_no_java_package_name/stdout.txt.expect b/slang/tests/F_no_java_package_name/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_no_java_package_name/stdout.txt.expect
diff --git a/slang/tests/F_no_pragma/first.rs b/slang/tests/F_no_pragma/first.rs new file mode 100644 index 0000000..a53bf90 --- /dev/null +++ b/slang/tests/F_no_pragma/first.rs
@@ -0,0 +1,3 @@ +#pragma version(1) +#pragma rs java_package_name(foo) +
diff --git a/slang/tests/F_no_pragma/second.rs b/slang/tests/F_no_pragma/second.rs new file mode 100644 index 0000000..a746ce1 --- /dev/null +++ b/slang/tests/F_no_pragma/second.rs
@@ -0,0 +1,2 @@ +#pragma version(1) +
diff --git a/slang/tests/F_no_pragma/stderr.txt.expect b/slang/tests/F_no_pragma/stderr.txt.expect new file mode 100644 index 0000000..87440ca --- /dev/null +++ b/slang/tests/F_no_pragma/stderr.txt.expect
@@ -0,0 +1 @@ +second.rs:3:1: error: missing "#pragma rs java_package_name(com.foo.bar)" in source file
diff --git a/slang/tests/F_no_pragma/stdout.txt.expect b/slang/tests/F_no_pragma/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_no_pragma/stdout.txt.expect
diff --git a/slang/tests/F_no_version_pragma/no_version_pragma.rs b/slang/tests/F_no_version_pragma/no_version_pragma.rs new file mode 100644 index 0000000..9b928ce --- /dev/null +++ b/slang/tests/F_no_version_pragma/no_version_pragma.rs
@@ -0,0 +1 @@ +#pragma rs java_package_name(foo)
diff --git a/slang/tests/F_no_version_pragma/stderr.txt.expect b/slang/tests/F_no_version_pragma/stderr.txt.expect new file mode 100644 index 0000000..cdfa917 --- /dev/null +++ b/slang/tests/F_no_version_pragma/stderr.txt.expect
@@ -0,0 +1 @@ +no_version_pragma.rs:2:1: error: missing pragma for version in source file
diff --git a/slang/tests/F_no_version_pragma/stdout.txt.expect b/slang/tests/F_no_version_pragma/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_no_version_pragma/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule1/def1.rs b/slang/tests/F_one_definition_rule1/def1.rs new file mode 100644 index 0000000..7b0b225 --- /dev/null +++ b/slang/tests/F_one_definition_rule1/def1.rs
@@ -0,0 +1,9 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different number of members +typedef struct DifferentDefinition1{ + int member1; +} DifferentDefinition1; + +DifferentDefinition1 o1;
diff --git a/slang/tests/F_one_definition_rule1/def2.rs b/slang/tests/F_one_definition_rule1/def2.rs new file mode 100644 index 0000000..f770a5e --- /dev/null +++ b/slang/tests/F_one_definition_rule1/def2.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different number of members +typedef struct DifferentDefinition1{ + int member1; + float member2; +} DifferentDefinition1; + +DifferentDefinition1 o1;
diff --git a/slang/tests/F_one_definition_rule1/stderr.txt.expect b/slang/tests/F_one_definition_rule1/stderr.txt.expect new file mode 100644 index 0000000..326c544 --- /dev/null +++ b/slang/tests/F_one_definition_rule1/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition1' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule1/stdout.txt.expect b/slang/tests/F_one_definition_rule1/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule1/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule2/def1.rs b/slang/tests/F_one_definition_rule2/def1.rs new file mode 100644 index 0000000..7c8cd97 --- /dev/null +++ b/slang/tests/F_one_definition_rule2/def1.rs
@@ -0,0 +1,9 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different number of members +typedef struct DifferentDefinition2{ + int member1; +} DifferentDefinition2; + +DifferentDefinition2 o2;
diff --git a/slang/tests/F_one_definition_rule2/def2.rs b/slang/tests/F_one_definition_rule2/def2.rs new file mode 100644 index 0000000..1d64772 --- /dev/null +++ b/slang/tests/F_one_definition_rule2/def2.rs
@@ -0,0 +1,8 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different number of members +typedef struct DifferentDefinition2{ +} DifferentDefinition2; + +DifferentDefinition2 o2;
diff --git a/slang/tests/F_one_definition_rule2/stderr.txt.expect b/slang/tests/F_one_definition_rule2/stderr.txt.expect new file mode 100644 index 0000000..a5f7a4f --- /dev/null +++ b/slang/tests/F_one_definition_rule2/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition2' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule2/stdout.txt.expect b/slang/tests/F_one_definition_rule2/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule2/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule3/def1.rs b/slang/tests/F_one_definition_rule3/def1.rs new file mode 100644 index 0000000..8a8d15b --- /dev/null +++ b/slang/tests/F_one_definition_rule3/def1.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different type +typedef struct DifferentDefinition3{ + int member1; + float member2; +} DifferentDefinition3; + +DifferentDefinition3 o3;
diff --git a/slang/tests/F_one_definition_rule3/def2.rs b/slang/tests/F_one_definition_rule3/def2.rs new file mode 100644 index 0000000..b574be3 --- /dev/null +++ b/slang/tests/F_one_definition_rule3/def2.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different type +typedef struct DifferentDefinition3{ + int member1; + int member2; +} DifferentDefinition3; + +DifferentDefinition3 o3;
diff --git a/slang/tests/F_one_definition_rule3/stderr.txt.expect b/slang/tests/F_one_definition_rule3/stderr.txt.expect new file mode 100644 index 0000000..b9c9894 --- /dev/null +++ b/slang/tests/F_one_definition_rule3/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition3' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule3/stdout.txt.expect b/slang/tests/F_one_definition_rule3/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule3/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule4/def1.rs b/slang/tests/F_one_definition_rule4/def1.rs new file mode 100644 index 0000000..52b6395 --- /dev/null +++ b/slang/tests/F_one_definition_rule4/def1.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different name +typedef struct DifferentDefinition4{ + int member1; + float member2; +} DifferentDefinition4; + +DifferentDefinition4 o4;
diff --git a/slang/tests/F_one_definition_rule4/def2.rs b/slang/tests/F_one_definition_rule4/def2.rs new file mode 100644 index 0000000..54157b3 --- /dev/null +++ b/slang/tests/F_one_definition_rule4/def2.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different name +typedef struct DifferentDefinition4{ + int member1; + float member3; +} DifferentDefinition4; + +DifferentDefinition4 o4;
diff --git a/slang/tests/F_one_definition_rule4/stderr.txt.expect b/slang/tests/F_one_definition_rule4/stderr.txt.expect new file mode 100644 index 0000000..93a3add --- /dev/null +++ b/slang/tests/F_one_definition_rule4/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition4' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule4/stdout.txt.expect b/slang/tests/F_one_definition_rule4/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule4/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule5/def1.rs b/slang/tests/F_one_definition_rule5/def1.rs new file mode 100644 index 0000000..203cdbe --- /dev/null +++ b/slang/tests/F_one_definition_rule5/def1.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different order(POD) +typedef struct DifferentDefinition5{ + int member1; + float member2; +} DifferentDefinition5; + +DifferentDefinition5 o5;
diff --git a/slang/tests/F_one_definition_rule5/def2.rs b/slang/tests/F_one_definition_rule5/def2.rs new file mode 100644 index 0000000..02a76b4 --- /dev/null +++ b/slang/tests/F_one_definition_rule5/def2.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different order(POD) +typedef struct DifferentDefinition5{ + float member2; + int member1; +} DifferentDefinition5; + +DifferentDefinition5 o5;
diff --git a/slang/tests/F_one_definition_rule5/stderr.txt.expect b/slang/tests/F_one_definition_rule5/stderr.txt.expect new file mode 100644 index 0000000..ca39889 --- /dev/null +++ b/slang/tests/F_one_definition_rule5/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition5' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule5/stdout.txt.expect b/slang/tests/F_one_definition_rule5/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule5/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule6/def1.rs b/slang/tests/F_one_definition_rule6/def1.rs new file mode 100644 index 0000000..2bc8b04 --- /dev/null +++ b/slang/tests/F_one_definition_rule6/def1.rs
@@ -0,0 +1,11 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: mix +typedef struct DifferentDefinition6{ + int member1; + float member2; + float member3; +} DifferentDefinition6; + +DifferentDefinition6 o6;
diff --git a/slang/tests/F_one_definition_rule6/def2.rs b/slang/tests/F_one_definition_rule6/def2.rs new file mode 100644 index 0000000..7d46c56 --- /dev/null +++ b/slang/tests/F_one_definition_rule6/def2.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: mix +typedef struct DifferentDefinition6{ + float member5; + int member2; +} DifferentDefinition6; + +DifferentDefinition6 o6;
diff --git a/slang/tests/F_one_definition_rule6/stderr.txt.expect b/slang/tests/F_one_definition_rule6/stderr.txt.expect new file mode 100644 index 0000000..a127b1a --- /dev/null +++ b/slang/tests/F_one_definition_rule6/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition6' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule6/stdout.txt.expect b/slang/tests/F_one_definition_rule6/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule6/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule7/def1.rs b/slang/tests/F_one_definition_rule7/def1.rs new file mode 100644 index 0000000..1edda16 --- /dev/null +++ b/slang/tests/F_one_definition_rule7/def1.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different typedef +typedef int Type1; +typedef struct DifferentDefinition7{ + Type1 member1; +} DifferentDefinition7; + +DifferentDefinition7 o7;
diff --git a/slang/tests/F_one_definition_rule7/def2.rs b/slang/tests/F_one_definition_rule7/def2.rs new file mode 100644 index 0000000..e071fb5 --- /dev/null +++ b/slang/tests/F_one_definition_rule7/def2.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +// expected-error: different typedef +typedef float Type1; +typedef struct DifferentDefinition7{ + Type1 member1; +} DifferentDefinition7; + +DifferentDefinition7 o7;
diff --git a/slang/tests/F_one_definition_rule7/stderr.txt.expect b/slang/tests/F_one_definition_rule7/stderr.txt.expect new file mode 100644 index 0000000..805d342 --- /dev/null +++ b/slang/tests/F_one_definition_rule7/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition7' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule7/stdout.txt.expect b/slang/tests/F_one_definition_rule7/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule7/stdout.txt.expect
diff --git a/slang/tests/F_one_definition_rule8/def1.rs b/slang/tests/F_one_definition_rule8/def1.rs new file mode 100644 index 0000000..724776e --- /dev/null +++ b/slang/tests/F_one_definition_rule8/def1.rs
@@ -0,0 +1,14 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef int Type1; +typedef struct DifferentDefinition7{ + Type1 member1; +} DifferentDefinition7; + +// expected-error: two level +typedef struct DifferentDefinition8{ + struct DifferentDefinition7 member1; +} DifferentDefinition8; + +DifferentDefinition8 o8;
diff --git a/slang/tests/F_one_definition_rule8/def2.rs b/slang/tests/F_one_definition_rule8/def2.rs new file mode 100644 index 0000000..91d67b8 --- /dev/null +++ b/slang/tests/F_one_definition_rule8/def2.rs
@@ -0,0 +1,14 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef float Type1; +typedef struct DifferentDefinition7{ + Type1 member1; +} DifferentDefinition7; + +// expected-error: two level +typedef struct DifferentDefinition8{ + DifferentDefinition7 member1; +} DifferentDefinition8; + +DifferentDefinition8 o8;
diff --git a/slang/tests/F_one_definition_rule8/stderr.txt.expect b/slang/tests/F_one_definition_rule8/stderr.txt.expect new file mode 100644 index 0000000..cb95533 --- /dev/null +++ b/slang/tests/F_one_definition_rule8/stderr.txt.expect
@@ -0,0 +1 @@ +error: type 'DifferentDefinition8' in different translation unit (def2.rs v.s. def1.rs) has incompatible type definition
diff --git a/slang/tests/F_one_definition_rule8/stdout.txt.expect b/slang/tests/F_one_definition_rule8/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_one_definition_rule8/stdout.txt.expect
diff --git a/slang/tests/F_ptr_in_struct/ptr_in_struct.rs b/slang/tests/F_ptr_in_struct/ptr_in_struct.rs new file mode 100644 index 0000000..943270b --- /dev/null +++ b/slang/tests/F_ptr_in_struct/ptr_in_struct.rs
@@ -0,0 +1,14 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +struct s { + int *i; +}; + +struct s myStruct; + +struct voidStruct { + void *v; +}; + +struct voidStruct myVoidStruct;
diff --git a/slang/tests/F_ptr_in_struct/stderr.txt.expect b/slang/tests/F_ptr_in_struct/stderr.txt.expect new file mode 100644 index 0000000..c47d706 --- /dev/null +++ b/slang/tests/F_ptr_in_struct/stderr.txt.expect
@@ -0,0 +1,2 @@ +ptr_in_struct.rs:4:8: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 's' +ptr_in_struct.rs:10:8: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'voidStruct'
diff --git a/slang/tests/F_ptr_in_struct/stdout.txt.expect b/slang/tests/F_ptr_in_struct/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_ptr_in_struct/stdout.txt.expect
diff --git a/slang/tests/F_ptr_in_struct_for_call/ptr_in_struct_for_call.rs b/slang/tests/F_ptr_in_struct_for_call/ptr_in_struct_for_call.rs new file mode 100644 index 0000000..eed9697 --- /dev/null +++ b/slang/tests/F_ptr_in_struct_for_call/ptr_in_struct_for_call.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef struct user_t { + int *v; +} user; + +void root(int *output, const user * usr) { + *output = *usr->v; +}
diff --git a/slang/tests/F_ptr_in_struct_for_call/stderr.txt.expect b/slang/tests/F_ptr_in_struct_for_call/stderr.txt.expect new file mode 100644 index 0000000..26fda00 --- /dev/null +++ b/slang/tests/F_ptr_in_struct_for_call/stderr.txt.expect
@@ -0,0 +1 @@ +ptr_in_struct_for_call.rs:8:24: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'usr'
diff --git a/slang/tests/F_ptr_in_struct_for_call/stdout.txt.expect b/slang/tests/F_ptr_in_struct_for_call/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_ptr_in_struct_for_call/stdout.txt.expect
diff --git a/slang/tests/F_reduce_general_bad_accumulator/reduce_general_bad_accumulator.rs b/slang/tests/F_reduce_general_bad_accumulator/reduce_general_bad_accumulator.rs new file mode 100644 index 0000000..5c16ad3 --- /dev/null +++ b/slang/tests/F_reduce_general_bad_accumulator/reduce_general_bad_accumulator.rs
@@ -0,0 +1,61 @@ +// -Wall +#pragma version(1) +#pragma rs java_package_name(accum) + +// Several checks for bad accumulator DATA TYPE (not bad accumulator FUNCTION) + +///////////////////////////////////////////////////////////////////////////// +// accumulator cannot be incomplete array +///////////////////////////////////////////////////////////////////////////// + +typedef int IntA[]; // incomplete (unknown element count) + +#pragma rs reduce(redIntA) accumulator(AccumIntA) combiner(CombIntA) +static void AccumIntA(IntA *accum, int val) { } +static void CombIntA(IntA *accum, const IntA *val) { } + +// outconverter does not help +#pragma rs reduce(redIntAOut) accumulator(AccumIntA) combiner(CombIntA) outconverter(OutIntA) +static void OutIntA(int *out, const IntA *val) { } + +///////////////////////////////////////////////////////////////////////////// +// accumulator cannot be incomplete struct +///////////////////////////////////////////////////////////////////////////// + +struct Incomplete; + +#pragma rs reduce(redStructIncomplete) accumulator(AccumStructIncomplete) combiner(CombStructIncomplete) +static void AccumStructIncomplete(struct Incomplete *accum, int val) { } +static void CombStructIncomplete(struct Incomplete *accum, const struct Incomplete *other) { } + +// outconverter does not help +#pragma rs reduce(redStructIncompleteOut) accumulator(AccumStructIncomplete) combiner(CombStructIncomplete) \ + outconverter(OutStructIncomplete) +static void OutStructIncomplete(int *out, const struct Incomplete *val) { } + +///////////////////////////////////////////////////////////////////////////// +// accumulator cannot be function +///////////////////////////////////////////////////////////////////////////// + +typedef void Fn(void); + +#pragma rs reduce(redFn) accumulator(AccumFn) combiner(CombineFn) +static void AccumFn(Fn *accum, int val) { } +static void CombineFn(Fn *accum, const Fn *other) { } + +// outconverter does not help +#pragma rs reduce(redFnOut) accumulator(AccumFn) combiner(CombineFn) outconverter(OutFn) +static void OutFn(int *out, const Fn *val) { } + +///////////////////////////////////////////////////////////////////////////// +// accumulator cannot be object +///////////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(redObj) accumulator(AccumObj) combiner(CombineObj) +static void AccumObj(rs_element *accum, int val) { } +static void CombineObj(rs_element *accum, const rs_element *other) { } + +// outconverter does not help +#pragma rs reduce(redObjOut) accumulator(AccumObj) combiner(CombineObj) outconverter(OutObj) +static void OutObj(int *out, const rs_element *val) { } +
diff --git a/slang/tests/F_reduce_general_bad_accumulator/stderr.txt.expect b/slang/tests/F_reduce_general_bad_accumulator/stderr.txt.expect new file mode 100644 index 0000000..356155a --- /dev/null +++ b/slang/tests/F_reduce_general_bad_accumulator/stderr.txt.expect
@@ -0,0 +1,13 @@ +reduce_general_bad_accumulator.rs:44:34: warning: 'const' qualifier on function type 'Fn' (aka 'void (void)') has unspecified behavior +reduce_general_bad_accumulator.rs:48:29: warning: 'const' qualifier on function type 'Fn' (aka 'void (void)') has unspecified behavior +reduce_general_bad_accumulator.rs:14:13: error: accumulator AccumIntA() for '#pragma rs reduce(redIntA)' (reduce_general_bad_accumulator.rs:13:12) parameter 'accum' (type 'int (*)[]') must not be pointer to incomplete type +reduce_general_bad_accumulator.rs:14:13: error: accumulator AccumIntA() for '#pragma rs reduce(redIntAOut)' (reduce_general_bad_accumulator.rs:18:12) parameter 'accum' (type 'int (*)[]') must not be pointer to incomplete type +reduce_general_bad_accumulator.rs:28:13: error: accumulator AccumStructIncomplete() for '#pragma rs reduce(redStructIncomplete)' (reduce_general_bad_accumulator.rs:27:12) parameter 'accum' (type 'struct Incomplete *') must not be pointer to incomplete type +reduce_general_bad_accumulator.rs:28:13: error: accumulator AccumStructIncomplete() for '#pragma rs reduce(redStructIncompleteOut)' (reduce_general_bad_accumulator.rs:32:12) parameter 'accum' (type 'struct Incomplete *') must not be pointer to incomplete type +reduce_general_bad_accumulator.rs:43:13: error: accumulator AccumFn() for '#pragma rs reduce(redFn)' (reduce_general_bad_accumulator.rs:42:12) parameter 'accum' (type 'void (*)(void)') must not be pointer to function type +reduce_general_bad_accumulator.rs:44:44: error: combiner CombineFn() for '#pragma rs reduce(redFn)' (reduce_general_bad_accumulator.rs:42:12) parameter 'other' (type 'Fn *') must point to const-qualified type +reduce_general_bad_accumulator.rs:43:13: error: accumulator AccumFn() for '#pragma rs reduce(redFnOut)' (reduce_general_bad_accumulator.rs:47:12) parameter 'accum' (type 'void (*)(void)') must not be pointer to function type +reduce_general_bad_accumulator.rs:44:44: error: combiner CombineFn() for '#pragma rs reduce(redFnOut)' (reduce_general_bad_accumulator.rs:47:12) parameter 'other' (type 'Fn *') must point to const-qualified type +reduce_general_bad_accumulator.rs:48:39: error: outconverter OutFn() for '#pragma rs reduce(redFnOut)' (reduce_general_bad_accumulator.rs:47:12) parameter 'val' (type 'Fn *') must point to const-qualified type +reduce_general_bad_accumulator.rs:55:13: error: accumulator AccumObj() for '#pragma rs reduce(redObj)' (reduce_general_bad_accumulator.rs:54:12) parameter 'accum' (type 'struct rs_element *') must not be pointer to data containing an object type +reduce_general_bad_accumulator.rs:55:13: error: accumulator AccumObj() for '#pragma rs reduce(redObjOut)' (reduce_general_bad_accumulator.rs:59:12) parameter 'accum' (type 'struct rs_element *') must not be pointer to data containing an object type
diff --git a/slang/tests/F_reduce_general_bad_accumulator/stdout.txt.expect b/slang/tests/F_reduce_general_bad_accumulator/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_reduce_general_bad_accumulator/stdout.txt.expect
diff --git a/slang/tests/F_reduce_general_bad_function/reduce_general_bad_function.rs b/slang/tests/F_reduce_general_bad_function/reduce_general_bad_function.rs new file mode 100644 index 0000000..b59800a --- /dev/null +++ b/slang/tests/F_reduce_general_bad_function/reduce_general_bad_function.rs
@@ -0,0 +1,256 @@ +// -Wall +#pragma version(1) +#pragma rs java_package_name(fn) + +// Various ways particular reduction consituent functions can fail semantic checks. +// Also see reduce_general_bad_halter.rs for halter function semantic checks. +// Also see reduce_general_bad_accumulator.rs for accumulator data type checks. + +// trivial accumulator for use multiple times later +static void AccumInt(int *accum, int val) { } + +///////////////////////////////////////////////////////////////////////////// +// initializer +///////////////////////////////////////////////////////////////////////////// + +// initializer must take exactly 1 parameter +#pragma rs reduce(init0) initializer(init0) accumulator(AccumInt) +static void init0() { } + +// initializer must take exactly 1 parameter +#pragma rs reduce(init2) initializer(init2) accumulator(AccumInt) +static void init2(int *a, int *b) { } + +// initializer cannot take special parameter +#pragma rs reduce(init_special1) initializer(init_special1) accumulator(AccumInt) +static void init_special1(int *x) { } + +// initializer must take exactly 1 parameter +#pragma rs reduce(init2_special1) initializer(init2_special1) accumulator(AccumInt) +static void init2_special1(int *a, int *x) { } + +// initializer must take exactly 1 parameter +#pragma rs reduce(init2_special0) initializer(init2_special0) accumulator(AccumInt) +static void init2_special0(int *x, int *a) { } + +// initializer must take pointer parameter +#pragma rs reduce(init_noptr) initializer(init_noptr) accumulator(AccumInt) +static void init_noptr(int a) { } + +// initializer may be overloadable . . . +#pragma rs reduce(init_over) initializer(init_over) accumulator(AccumInt) +static __attribute__((overloadable)) void init_over(int *accum) { } + +// . . . but initializer must not have duplicate definitions +#pragma rs reduce(init_dup) initializer(init_dup) accumulator(AccumInt) +static __attribute__((overloadable)) void init_dup(int *accum) { } +static __attribute__((overloadable)) void init_dup(unsigned int *accum) { } + +// initializer must be present +#pragma rs reduce(init_missing) initializer(init_missing) accumulator(AccumInt) + +// initializer must be static +#pragma rs reduce(init_nonstatic) initializer(init_nonstatic) accumulator(AccumInt) +void init_nonstatic(int *accum) { } + +// initializer must return void +#pragma rs reduce(init_nonvoid) initializer(init_nonvoid) accumulator(AccumInt) +static int init_nonvoid(int *accum) { return 0; } + +// initializer parameter must point to non-const +#pragma rs reduce(init_const) initializer(init_const) accumulator(AccumInt) +static void init_const(const int *accum) { } + +// . . . but initializer parameter VALUE can be const +#pragma rs reduce(init_valconst) initializer(init_valconst) accumulator(AccumInt) +static void init_valconst(int *const accum) { } + +///////////////////////////////////////////////////////////////////////////// +// accumulator +///////////////////////////////////////////////////////////////////////////// + +// accumulator must take at least 2 parameters +#pragma rs reduce(accum0) accumulator(accum0) +static void accum0() { } + +// accumulator must take at least 2 parameters +#pragma rs reduce(accum1) accumulator(accum1) +static void accum1(int a) { } + +// accumulator first parameter must be of pointer type +#pragma rs reduce(accum_noptr) accumulator(accum_noptr) +static void accum_noptr(int accum, int val) { } + +// accumulator and initializer must take pointers to same type +#pragma rs reduce(accum_vs_init) initializer(avi_init) accumulator(avi_accum) +static void avi_init(int *accum) { } +static void avi_accum(double *accum, int val) { } + +// accumulator must have at least 1 input +#pragma rs reduce(accum_special) accumulator(accum_special) +static void accum_special(int *accum, int x) { } + +// accumulator input must not be a pointer . . . +#pragma rs reduce(accum_ptr) accumulator(accum_ptr) combiner(comb_ptr) +static void accum_ptr(int *accum, char *val) { } +static void comb_ptr(int *accum, const int *other) { } + +// . . . including a pointer from array decay +#pragma rs reduce(accum_arr) accumulator(accum_arr) combiner(comb_arr) +typedef char CharArray[10]; +static void accum_arr(int *accum, CharArray val) { } +static void comb_arr(int *accum, const int *other) { } + +// accumulator input must not contain object type +#pragma rs reduce(accum_obj) accumulator(accum_obj) combiner(comb_obj) +static void accum_obj(int *accum, int val, rs_element elem) { } +static void comb_obj(int *accum, const int *other) { } + +// accumulator may be overloadable . . . +#pragma rs reduce(accum_over) accumulator(accum_over) +static __attribute__((overloadable)) void accum_over(int *accum, int val) { } + +// . . . but accumulator must not have duplicate definitions +#pragma rs reduce(accum_dup) accumulator(accum_dup) +static __attribute__((overloadable)) void accum_dup(int *accum, int val) { } +static __attribute__((overloadable)) void accum_dup(uint *accum, uint val) { } + +// accumulator must be present +#pragma rs reduce(accum_missing) accumulator(accum_missing) + +// accumulator must be static +#pragma rs reduce(accum_nonstatic) accumulator(accum_nonstatic) +void accum_nonstatic(int *accum, int val) { } + +// accumulator must return void +#pragma rs reduce(accum_nonvoid) accumulator(accum_nonvoid) +static int accum_nonvoid(int *accum, int val) { return 0; } + +// first accumulator parameter must point to non-const . . . +#pragma rs reduce(accum_const) accumulator(accum_const) +static void accum_const(const int *accum, int val) { } + +// . . . but accumulator parameter VALUES can be const +#pragma rs reduce(accum_valconst) accumulator(accum_valconst) +static void accum_valconst(int *const accum, const int val) { } + +///////////////////////////////////////////////////////////////////////////// +// combiner +///////////////////////////////////////////////////////////////////////////// + +// combiner must take exactly 2 parameters +#pragma rs reduce(comb0) accumulator(AccumInt) combiner(comb0) +static void comb0() { } + +// combiner must take exactly 2 parameters +#pragma rs reduce(comb1) accumulator(AccumInt) combiner(comb1) +static void comb1(int *accum) { } + +// combiner must take exactly 2 parameters +#pragma rs reduce(comb3) accumulator(AccumInt) combiner(comb3) +static void comb3(int *accum, const int *otherA, int otherB) { } + +// combiner and accumulator must take pointers to same type +#pragma rs reduce(comb_vs_accum) accumulator(cva_accum) combiner(cva_comb) +static void cva_accum(int *accum, char val) { } +static void cva_comb(unsigned *accum, const unsigned *other) { } + +// accumulator must have 1 input and no specials to omit combiner +#pragma rs reduce(accum_2in) accumulator(accum_2in) +static void accum_2in(int *accum, int in1, int in2) { } + +// accumulator must have 1 input and no specials to omit combiner +#pragma rs reduce(accum_special_1in) accumulator(accum_special_1in) +static void accum_special_1in(int *accum, int in1, int x) { } + +// accumulator parameter types must agree to omit combiner +#pragma rs reduce(accum_types) accumulator(accum_types) +static void accum_types(int *accum, unsigned val) { } + +// combiner may be overloadable . . . +#pragma rs reduce(comb_over) accumulator(AccumInt) combiner(comb_over) +static __attribute__((overloadable)) void comb_over(int *accum, const int *other) { } + +// . . . but combiner must not have duplicate definitions +#pragma rs reduce(comb_dup) accumulator(AccumInt) combiner(comb_dup) +static __attribute__((overloadable)) void comb_dup(int *accum, const int *other) { } +static __attribute__((overloadable)) void comb_dup(uint *accum, const uint *other) { } + +// combiner must be present +#pragma rs reduce(comb_missing) accumulator(AccumInt) combiner(comb_missing) + +// combiner must be static +#pragma rs reduce(comb_nonstatic) accumulator(AccumInt) combiner(comb_nonstatic) +void comb_nonstatic(int *accum, const int *other) { } + +// combiner must return void +#pragma rs reduce(comb_nonvoid) accumulator(AccumInt) combiner(comb_nonvoid) +static int comb_nonvoid(int *accum, const int *other) { return 0; } + +// first combiner parameter must point to non-const and second to const . . . +#pragma rs reduce(comb_const) accumulator(AccumInt) combiner(comb_const) +static void comb_const(const int *accum, int *other) { } + +// . . . but combiner parameter VALUES can be const +#pragma rs reduce(comb_valconst) accumulator(AccumInt) combiner(comb_valconst) +static void comb_valconst(int *const accum, const int *other) { } + +///////////////////////////////////////////////////////////////////////////// +// outconverter +///////////////////////////////////////////////////////////////////////////// + +// outconverter must take exactly 2 parameters +#pragma rs reduce(out0) accumulator(AccumInt) outconverter(out0) +static void out0() { } + +// outconverter must take exactly 2 parameters +#pragma rs reduce(out1) accumulator(AccumInt) outconverter(out1) +static void out1(char *out) { } + +// outconverter must take exactly 2 parameters +#pragma rs reduce(out3) accumulator(AccumInt) outconverter(out3) +static void out3(char *out, const int *val, int foo) { } + +// outconverter cannot take special parameter +#pragma rs reduce(out_special) accumulator(AccumInt) outconverter(out_special) +static void out_special(char *out, const int *y) { } + +// outconverter must take pointer +#pragma rs reduce(out_ptr1) accumulator(AccumInt) outconverter(out_ptr1) +static void out_ptr1(int out, const int *val) { } + +// outconverter must take pointer +#pragma rs reduce(out_ptr2) accumulator(AccumInt) outconverter(out_ptr2) +static void out_ptr2(int *out, const int val) { } + +// outconverter and accumulator must take pointers to same type +#pragma rs reduce(out_vs_accum) accumulator(AccumInt) outconverter(ova_out) +static void ova_out(int *out, const double *val) { } + +// outconverter may be overloadable . . . +#pragma rs reduce(out_over) accumulator(AccumInt) outconverter(out_over) +static __attribute__((overloadable)) void out_over(double *accum, const int *val) { } + +// . . . but outconverter must not have duplicate definitions +#pragma rs reduce(out_dup) accumulator(AccumInt) outconverter(out_dup) +static __attribute__((overloadable)) void out_dup(double *out, const int *val) { } +static __attribute__((overloadable)) void out_dup(float *out, const int *val) { } + +// ouconverter must be present +#pragma rs reduce(out_missing) accumulator(AccumInt) outconverter(out_missing) + +// outconverter must be static +#pragma rs reduce(out_nonstatic) accumulator(AccumInt) outconverter(out_nonstatic) +void out_nonstatic(int *out, const int *val) { } + +// outconverter must return void +#pragma rs reduce(out_nonvoid) accumulator(AccumInt) outconverter(out_nonvoid) +static int out_nonvoid(int *out, const int *val) { return 0; } + +// first outconverter parameter must point to non-const and second to const . . . +#pragma rs reduce(out_const) accumulator(AccumInt) outconverter(out_const) +static void out_const(const int *out, int *val) { } + +// . . . but outconverter parameter VALUES can be const +#pragma rs reduce(out_valconst) accumulator(AccumInt) outconverter(out_valconst) +static void out_valconst(int *const out, const int *val) { }
diff --git a/slang/tests/F_reduce_general_bad_function/stderr.txt.expect b/slang/tests/F_reduce_general_bad_function/stderr.txt.expect new file mode 100644 index 0000000..1e65259 --- /dev/null +++ b/slang/tests/F_reduce_general_bad_function/stderr.txt.expect
@@ -0,0 +1,51 @@ +reduce_general_bad_function.rs:18:13: error: initializer init0() for '#pragma rs reduce(init0)' (reduce_general_bad_function.rs:17:12) must take exactly 1 parameter (found 0) +reduce_general_bad_function.rs:22:13: error: initializer init2() for '#pragma rs reduce(init2)' (reduce_general_bad_function.rs:21:12) must take exactly 1 parameter (found 2) +reduce_general_bad_function.rs:26:13: error: initializer init_special1() for '#pragma rs reduce(init_special1)' (reduce_general_bad_function.rs:25:12) cannot take special parameter 'x' +reduce_general_bad_function.rs:30:13: error: initializer init2_special1() for '#pragma rs reduce(init2_special1)' (reduce_general_bad_function.rs:29:12) must take exactly 1 parameter (found 2) +reduce_general_bad_function.rs:34:13: error: initializer init2_special0() for '#pragma rs reduce(init2_special0)' (reduce_general_bad_function.rs:33:12) must take exactly 1 parameter (found 2) +reduce_general_bad_function.rs:38:13: error: initializer init_noptr() for '#pragma rs reduce(init_noptr)' (reduce_general_bad_function.rs:37:12) parameter 'a' must be of pointer type not 'int' +reduce_general_bad_function.rs:45:12: error: duplicate function definition for 'initializer(init_dup)' for '#pragma rs reduce(init_dup)' (reduce_general_bad_function.rs:46:43, reduce_general_bad_function.rs:47:43) +reduce_general_bad_function.rs:50:12: error: could not find function definition for 'initializer(init_missing)' for '#pragma rs reduce(init_missing)' +reduce_general_bad_function.rs:54:6: error: initializer init_nonstatic() for '#pragma rs reduce(init_nonstatic)' (reduce_general_bad_function.rs:53:12) must be static +reduce_general_bad_function.rs:58:12: error: initializer init_nonvoid() for '#pragma rs reduce(init_nonvoid)' (reduce_general_bad_function.rs:57:12) must return void not 'int' +reduce_general_bad_function.rs:62:35: error: initializer init_const() for '#pragma rs reduce(init_const)' (reduce_general_bad_function.rs:61:12) parameter 'accum' (type 'const int *') must not point to const-qualified type +reduce_general_bad_function.rs:74:13: error: accumulator accum0() for '#pragma rs reduce(accum0)' (reduce_general_bad_function.rs:73:12) must take at least 2 parameters +reduce_general_bad_function.rs:78:13: error: accumulator accum1() for '#pragma rs reduce(accum1)' (reduce_general_bad_function.rs:77:12) must take at least 2 parameters +reduce_general_bad_function.rs:82:13: error: accumulator accum_noptr() for '#pragma rs reduce(accum_noptr)' (reduce_general_bad_function.rs:81:12) parameter 'accum' must be of pointer type not 'int' +reduce_general_bad_function.rs:87:13: error: accumulator avi_accum() for '#pragma rs reduce(accum_vs_init)' (reduce_general_bad_function.rs:85:12) parameter 'accum' (type 'double *') and initializer avi_init() parameter 'accum' (type 'int *') must be pointers to the same type +reduce_general_bad_function.rs:91:13: error: accumulator accum_special() for '#pragma rs reduce(accum_special)' (reduce_general_bad_function.rs:90:12) must have at least 1 input ('x' is a special parameter) +reduce_general_bad_function.rs:95:41: error: accumulator accum_ptr() for '#pragma rs reduce(accum_ptr)' (reduce_general_bad_function.rs:94:12) parameter 'val' (type 'char *') must not be a pointer +reduce_general_bad_function.rs:101:45: error: accumulator accum_arr() for '#pragma rs reduce(accum_arr)' (reduce_general_bad_function.rs:99:12) parameter 'val' (type 'char *') must not be a pointer +reduce_general_bad_function.rs:106:55: error: accumulator accum_obj() for '#pragma rs reduce(accum_obj)' (reduce_general_bad_function.rs:105:12) parameter 'elem' (type 'struct rs_element') must not contain an object type +reduce_general_bad_function.rs:114:12: error: duplicate function definition for 'accumulator(accum_dup)' for '#pragma rs reduce(accum_dup)' (reduce_general_bad_function.rs:115:43, reduce_general_bad_function.rs:116:43) +reduce_general_bad_function.rs:119:12: error: could not find function definition for 'accumulator(accum_missing)' for '#pragma rs reduce(accum_missing)' +reduce_general_bad_function.rs:123:6: error: accumulator accum_nonstatic() for '#pragma rs reduce(accum_nonstatic)' (reduce_general_bad_function.rs:122:12) must be static +reduce_general_bad_function.rs:127:12: error: accumulator accum_nonvoid() for '#pragma rs reduce(accum_nonvoid)' (reduce_general_bad_function.rs:126:12) must return void not 'int' +reduce_general_bad_function.rs:131:36: error: accumulator accum_const() for '#pragma rs reduce(accum_const)' (reduce_general_bad_function.rs:130:12) parameter 'accum' (type 'const int *') must not point to const-qualified type +reduce_general_bad_function.rs:143:13: error: combiner comb0() for '#pragma rs reduce(comb0)' (reduce_general_bad_function.rs:142:12) must take exactly 2 parameters (found 0) +reduce_general_bad_function.rs:147:13: error: combiner comb1() for '#pragma rs reduce(comb1)' (reduce_general_bad_function.rs:146:12) must take exactly 2 parameters (found 1) +reduce_general_bad_function.rs:151:13: error: combiner comb3() for '#pragma rs reduce(comb3)' (reduce_general_bad_function.rs:150:12) must take exactly 2 parameters (found 3) +reduce_general_bad_function.rs:156:13: error: combiner cva_comb() for '#pragma rs reduce(comb_vs_accum)' (reduce_general_bad_function.rs:154:12) parameter 'accum' (type 'unsigned int *') and accumulator cva_accum() parameter 'accum' (type 'int *') must be pointers to the same type +reduce_general_bad_function.rs:156:13: error: combiner cva_comb() for '#pragma rs reduce(comb_vs_accum)' (reduce_general_bad_function.rs:154:12) parameter 'other' (type 'const unsigned int *') and accumulator cva_accum() parameter 'accum' (type 'int *') must be pointers to the same type +reduce_general_bad_function.rs:160:13: error: accumulator accum_2in() for '#pragma rs reduce(accum_2in)' (reduce_general_bad_function.rs:159:12) must have exactly 1 input and no special parameters in order for the combiner to be omitted +reduce_general_bad_function.rs:164:13: error: accumulator accum_special_1in() for '#pragma rs reduce(accum_special_1in)' (reduce_general_bad_function.rs:163:12) must have exactly 1 input and no special parameters in order for the combiner to be omitted +reduce_general_bad_function.rs:168:13: error: accumulator accum_types() for '#pragma rs reduce(accum_types)' (reduce_general_bad_function.rs:167:12) parameter 'accum' (type 'int *') must be pointer to the type of parameter 'val' (type 'unsigned int') in order for the combiner to be omitted +reduce_general_bad_function.rs:175:12: error: duplicate function definition for 'combiner(comb_dup)' for '#pragma rs reduce(comb_dup)' (reduce_general_bad_function.rs:176:43, reduce_general_bad_function.rs:177:43) +reduce_general_bad_function.rs:180:12: error: could not find function definition for 'combiner(comb_missing)' for '#pragma rs reduce(comb_missing)' +reduce_general_bad_function.rs:184:6: error: combiner comb_nonstatic() for '#pragma rs reduce(comb_nonstatic)' (reduce_general_bad_function.rs:183:12) must be static +reduce_general_bad_function.rs:188:12: error: combiner comb_nonvoid() for '#pragma rs reduce(comb_nonvoid)' (reduce_general_bad_function.rs:187:12) must return void not 'int' +reduce_general_bad_function.rs:192:35: error: combiner comb_const() for '#pragma rs reduce(comb_const)' (reduce_general_bad_function.rs:191:12) parameter 'accum' (type 'const int *') must not point to const-qualified type +reduce_general_bad_function.rs:192:47: error: combiner comb_const() for '#pragma rs reduce(comb_const)' (reduce_general_bad_function.rs:191:12) parameter 'other' (type 'int *') must point to const-qualified type +reduce_general_bad_function.rs:204:13: error: outconverter out0() for '#pragma rs reduce(out0)' (reduce_general_bad_function.rs:203:12) must take exactly 2 parameters (found 0) +reduce_general_bad_function.rs:208:13: error: outconverter out1() for '#pragma rs reduce(out1)' (reduce_general_bad_function.rs:207:12) must take exactly 2 parameters (found 1) +reduce_general_bad_function.rs:212:13: error: outconverter out3() for '#pragma rs reduce(out3)' (reduce_general_bad_function.rs:211:12) must take exactly 2 parameters (found 3) +reduce_general_bad_function.rs:216:13: error: outconverter out_special() for '#pragma rs reduce(out_special)' (reduce_general_bad_function.rs:215:12) cannot take special parameter 'y' +reduce_general_bad_function.rs:220:13: error: outconverter out_ptr1() for '#pragma rs reduce(out_ptr1)' (reduce_general_bad_function.rs:219:12) parameter 'out' must be of pointer type not 'int' +reduce_general_bad_function.rs:224:13: error: outconverter out_ptr2() for '#pragma rs reduce(out_ptr2)' (reduce_general_bad_function.rs:223:12) parameter 'val' must be of pointer type not 'const int' +reduce_general_bad_function.rs:228:13: error: outconverter ova_out() for '#pragma rs reduce(out_vs_accum)' (reduce_general_bad_function.rs:227:12) parameter 'val' (type 'const double *') and accumulator AccumInt() parameter 'accum' (type 'int *') must be pointers to the same type +reduce_general_bad_function.rs:235:12: error: duplicate function definition for 'outconverter(out_dup)' for '#pragma rs reduce(out_dup)' (reduce_general_bad_function.rs:236:43, reduce_general_bad_function.rs:237:43) +reduce_general_bad_function.rs:240:12: error: could not find function definition for 'outconverter(out_missing)' for '#pragma rs reduce(out_missing)' +reduce_general_bad_function.rs:244:6: error: outconverter out_nonstatic() for '#pragma rs reduce(out_nonstatic)' (reduce_general_bad_function.rs:243:12) must be static +reduce_general_bad_function.rs:248:12: error: outconverter out_nonvoid() for '#pragma rs reduce(out_nonvoid)' (reduce_general_bad_function.rs:247:12) must return void not 'int' +reduce_general_bad_function.rs:252:34: error: outconverter out_const() for '#pragma rs reduce(out_const)' (reduce_general_bad_function.rs:251:12) parameter 'out' (type 'const int *') must not point to const-qualified type +reduce_general_bad_function.rs:252:44: error: outconverter out_const() for '#pragma rs reduce(out_const)' (reduce_general_bad_function.rs:251:12) parameter 'val' (type 'int *') must point to const-qualified type
diff --git a/slang/tests/F_reduce_general_bad_function/stdout.txt.expect b/slang/tests/F_reduce_general_bad_function/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_reduce_general_bad_function/stdout.txt.expect
diff --git a/slang/tests/F_reduce_general_bad_halter/reduce_general_bad_halter.rs b/slang/tests/F_reduce_general_bad_halter/reduce_general_bad_halter.rs new file mode 100644 index 0000000..b7de60c --- /dev/null +++ b/slang/tests/F_reduce_general_bad_halter/reduce_general_bad_halter.rs
@@ -0,0 +1,58 @@ +// -Wall -target-api 0 +#pragma version(1) +#pragma rs java_package_name(fn) + +// Various ways halter can fail semantic checks. +// Also see reduce_general_bad_function.rs for other constituent function semantic checks. +// Also see reduce_general_bad_accumulator.rs for accumulator data type checks. + +// trivial accumulator for use multiple times later +static void AccumInt(int *accum, int val) { } + +///////////////////////////////////////////////////////////////////////////// +// halter +///////////////////////////////////////////////////////////////////////////// + +// halter must return bool +#pragma rs reduce(halt_void) accumulator(AccumInt) halter(halt_void) +static void halt_void(const int *accum) { } + +// halter must return bool +#pragma rs reduce(halt_int) accumulator(AccumInt) halter(halt_int) +static int halt_int(const int *accum) { return 0; } + +// halter must take exactly 1 parameter +#pragma rs reduce(halt0) accumulator(AccumInt) halter(halt0) +static bool halt0() { return false; } + +// halter must take exactly 1 parameter +#pragma rs reduce(halt2) accumulator(AccumInt) halter(halt2) +static bool halt2(const int *accum, const int *accum2) { return false; } + +// halter cannot take special parameter +#pragma rs reduce(halt_special) accumulator(AccumInt) halter(halt_special) +static bool halt_special(const int *context) { return false; } + +// halter and accumulator must take pointers to same type +#pragma rs reduce(halt_vs_accum) accumulator(AccumInt) halter(hva_halt) +static bool hva_halt(const unsigned *accum) { return false; } + +// halter may be overloadable . . . +#pragma rs reduce(halt_over) accumulator(AccumInt) halter(halt_over) +static __attribute__((overloadable)) bool halt_over(const int *accum) { return false; } + +// . . . but halter must not have duplicate definitions +#pragma rs reduce(halt_dup) accumulator(AccumInt) halter(halt_dup) +static __attribute__((overloadable)) bool halt_dup(const int *accum) { return false; } +static __attribute__((overloadable)) bool halt_dup(const unsigned int *accum) { return false; } + +// halter must be present +#pragma rs reduce(halt_missing) accumulator(AccumInt) halter(halt_missing) + +// halter must be static +#pragma rs reduce(halt_nonstatic) accumulator(AccumInt) halter(halt_nonstatic) +bool halt_nonstatic(const int *accum) { return false; } + +// halter parameter must point to const +#pragma rs reduce(halt_const) accumulator(AccumInt) halter(halt_const) +static bool halt_const(int *accum) { return false; }
diff --git a/slang/tests/F_reduce_general_bad_halter/stderr.txt.expect b/slang/tests/F_reduce_general_bad_halter/stderr.txt.expect new file mode 100644 index 0000000..d96207e --- /dev/null +++ b/slang/tests/F_reduce_general_bad_halter/stderr.txt.expect
@@ -0,0 +1,10 @@ +reduce_general_bad_halter.rs:18:13: error: halter halt_void() for '#pragma rs reduce(halt_void)' (reduce_general_bad_halter.rs:17:12) must return bool not 'void' +reduce_general_bad_halter.rs:22:12: error: halter halt_int() for '#pragma rs reduce(halt_int)' (reduce_general_bad_halter.rs:21:12) must return bool not 'int' +reduce_general_bad_halter.rs:26:13: error: halter halt0() for '#pragma rs reduce(halt0)' (reduce_general_bad_halter.rs:25:12) must take exactly 1 parameter (found 0) +reduce_general_bad_halter.rs:30:13: error: halter halt2() for '#pragma rs reduce(halt2)' (reduce_general_bad_halter.rs:29:12) must take exactly 1 parameter (found 2) +reduce_general_bad_halter.rs:34:13: error: halter halt_special() for '#pragma rs reduce(halt_special)' (reduce_general_bad_halter.rs:33:12) cannot take special parameter 'context' +reduce_general_bad_halter.rs:38:13: error: halter hva_halt() for '#pragma rs reduce(halt_vs_accum)' (reduce_general_bad_halter.rs:37:12) parameter 'accum' (type 'const unsigned int *') and accumulator AccumInt() parameter 'accum' (type 'int *') must be pointers to the same type +reduce_general_bad_halter.rs:45:12: error: duplicate function definition for 'halter(halt_dup)' for '#pragma rs reduce(halt_dup)' (reduce_general_bad_halter.rs:46:43, reduce_general_bad_halter.rs:47:43) +reduce_general_bad_halter.rs:50:12: error: could not find function definition for 'halter(halt_missing)' for '#pragma rs reduce(halt_missing)' +reduce_general_bad_halter.rs:54:6: error: halter halt_nonstatic() for '#pragma rs reduce(halt_nonstatic)' (reduce_general_bad_halter.rs:53:12) must be static +reduce_general_bad_halter.rs:58:29: error: halter halt_const() for '#pragma rs reduce(halt_const)' (reduce_general_bad_halter.rs:57:12) parameter 'accum' (type 'int *') must point to const-qualified type
diff --git a/slang/tests/F_reduce_general_bad_halter/stdout.txt.expect b/slang/tests/F_reduce_general_bad_halter/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_reduce_general_bad_halter/stdout.txt.expect
diff --git a/slang/tests/F_reduce_general_bad_result/reduce_general_bad_result.rs b/slang/tests/F_reduce_general_bad_result/reduce_general_bad_result.rs new file mode 100644 index 0000000..e403f6e --- /dev/null +++ b/slang/tests/F_reduce_general_bad_result/reduce_general_bad_result.rs
@@ -0,0 +1,395 @@ +// -Wall +#pragma version(1) +#pragma rs java_package_name(export) + +// trivial accumulator for use multiple times later +static void AccumInt(int *accum, int val) { } + +// NOTE: union and bitfield errors are only emitted once per type, so +// we have multiple types here to ensure that we issue errors +// in multiple contexts. + +// NOTE: accumulator data type is restricted in certain ways regardless +// of result type; we do not test that here. This is covered +// in the test case reduce_general_bad_accumulator.rs. + +///////////////////////////////////////////////////////////////////////// + +typedef unsigned int UIntA916[9][16]; + +// result type cannot be multidimensional array +#pragma rs reduce(redUInt2dA) accumulator(AccumUInt2dA) combiner(CombUInt2dA) +static void AccumUInt2dA(UIntA916 *accum, int val) { } +static void CombUInt2dA(UIntA916 *accum, const UIntA916 *val) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redUInt2dAOutFix) accumulator(AccumUInt2dA) combiner(CombUInt2dA) \ + outconverter(OutUInt2dAFix) +static void OutUInt2dAFix(uint *out, const UIntA916 *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redUInt2dAOutBreak) accumulator(AccumInt) outconverter(OutUInt2dABreak) +static void OutUInt2dABreak(UIntA916 *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +union UnionShortDouble { + short s; + double d; +}; + +union UnionCharInt { + char c; + int i; +}; + +union UnionLongFloat { + long l; + float f; +}; + +// result type cannot be union +#pragma rs reduce(redUnionShortDouble) accumulator(AccumUnionShortDouble) \ + combiner(CombineUnionShortDouble) +static void AccumUnionShortDouble(union UnionShortDouble *accum, short s, double d) { } +static void CombineUnionShortDouble(union UnionShortDouble *accum, + const union UnionShortDouble *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redUnionCharIntOutFix) accumulator(AccumUnionCharInt) \ + combiner(CombineUnionCharInt) outconverter(OutUnionCharIntFix) +static void AccumUnionCharInt(union UnionCharInt *accum, short s, double d) { } +static void CombineUnionCharInt(union UnionCharInt *accum, const union UnionCharInt *other) { } +static void OutUnionCharIntFix(int *out, const union UnionCharInt *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redUnionLongFloatOutBreak) accumulator(AccumInt) \ + outconverter(OutUnionLongFloatBreak) +static void OutUnionLongFloatBreak(union UnionLongFloat *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +union UnionIntFloat { + short s; + double d; +}; +typedef union UnionIntFloat UnionIntFloatArray[10]; + +union UnionDoubleFloat { + double d; + float f; +}; +typedef union UnionDoubleFloat UnionDoubleFloatArray[10]; + +union UnionCharLong { + char c; + long l; +}; +typedef union UnionCharLong UnionCharLongArray[10]; + +// cannot export array of union +#pragma rs reduce(redUnionIntFloatArray) accumulator(AccumUnionIntFloatArray) \ + combiner(CombineUnionIntFloatArray) +static void AccumUnionIntFloatArray(UnionIntFloatArray *accum, int val) { } +static void CombineUnionIntFloatArray(UnionIntFloatArray *accum, + const UnionIntFloatArray *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redUnionDoubleFloatArrayOutFix) accumulator(AccumUnionDoubleFloatArray) \ + combiner(CombineUnionDoubleFloatArray) outconverter(OutUnionDoubleFloatArrayFix) +static void AccumUnionDoubleFloatArray(UnionDoubleFloatArray *accum, short s, double d) { } +static void CombineUnionDoubleFloatArray(UnionDoubleFloatArray *accum, + const UnionDoubleFloatArray *other) { } +static void OutUnionDoubleFloatArrayFix(int *out, const UnionDoubleFloatArray *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redUnionCharLongArrayOutBreak) accumulator(AccumInt) \ + outconverter(OutUnionCharLongArrayBreak) +static void OutUnionCharLongArrayBreak(UnionCharLongArray *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +struct Bits1 { + int b:1; +}; + +struct Bits11 { + int c:1; + int d:1; +}; + +struct Bits111 { + int e:1; + int f:1; + int g:1; +}; + +// cannot export struct with bitfield +#pragma rs reduce(redBits) accumulator(AccumBits) combiner(CombineBits) +static void AccumBits(struct Bits1 *accum, int val) { } +static void CombineBits(struct Bits1 *accum, const struct Bits1 *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redBitsOutFix) accumulator(AccumBitsOutFix) combiner(CombineBitsOutFix) \ + outconverter(OutBitsFix) +static void AccumBitsOutFix(struct Bits11 *accum, int val) { } +static void CombineBitsOutFix(struct Bits11 *accum, const struct Bits11 *other) { } +static void OutBitsFix(int *out, const struct Bits11 *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redBitsOutBreak) accumulator(AccumInt) outconverter(OutBitsBreak) +static void OutBitsBreak(struct Bits111 *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +struct Bits2 { + int b:2; +}; +typedef struct Bits2 Bits2Array[10]; + +struct Bits22 { + int c:2; + int d:2; +}; +typedef struct Bits22 Bits22Array[10]; + +struct Bits222 { + int e:2; + int f:2; + int g:2; +}; +typedef struct Bits222 Bits222Array[10]; + +// cannot export array of struct with bitfield +#pragma rs reduce(redBitsArray) accumulator(AccumBitsArray) combiner(CombineBitsArray) +static void AccumBitsArray(Bits2Array *accum, int val) { } +static void CombineBitsArray(Bits2Array *accum, const Bits2Array *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redBitsArrayOutFix) accumulator(AccumBitsArrayOutFix) \ + combiner(CombineBitsArrayOutFix) outconverter(OutBitsArrayFix) +static void AccumBitsArrayOutFix(Bits22Array *accum, int val) { } +static void CombineBitsArrayOutFix(Bits22Array *accum, const Bits22Array *other) { } +static void OutBitsArrayFix(int *out, const Bits22Array *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redBitsArrayOutBreak) accumulator(AccumInt) outconverter(OutBitsArrayBreak) +static void OutBitsArrayBreak(Bits222Array *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +// result type cannot be matrix +#pragma rs reduce(redMat) accumulator(AccumMat) +static void AccumMat(rs_matrix2x2 *accum, rs_matrix2x2 val) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redMatOutFix) accumulator(AccumMat) outconverter(OutMatFix) +static void OutMatFix(int *out, const rs_matrix2x2 *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redMatOutBreak) accumulator(AccumInt) outconverter(OutMatBreak) +static void OutMatBreak(rs_matrix2x2 *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +typedef rs_matrix2x2 ArrayMatrix2x2[10]; + +// result type cannot be array of matrix +#pragma rs reduce(redMatArray) accumulator(AccumMatArray) combiner(CombineMatArray) +static void AccumMatArray(ArrayMatrix2x2 *accum, rs_matrix2x2 val) { } +static void CombineMatArray(ArrayMatrix2x2 *accum, const ArrayMatrix2x2 *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redMatArrayOutFix) accumulator(AccumMatArray) combiner(CombineMatArray) \ + outconverter(OutMatArrayFix) +static void OutMatArrayFix(int *out, const ArrayMatrix2x2 *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redMatArrayOutBreak) accumulator(AccumInt) outconverter(OutMatArrayBreak) +static void OutMatArrayBreak(ArrayMatrix2x2 *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +// result type cannot be object type +#pragma rs reduce(redAlloc) accumulator(AccumInt) outconverter(OutAlloc) +static void OutAlloc(rs_allocation *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +typedef rs_allocation AllocArray[10]; + +// result type cannot be array of object type +#pragma rs reduce(redAllocArray) accumulator(AccumAllocArray) outconverter(OutAllocArray) +static void AccumAllocArray(int *accum, int val) { } +static void OutAllocArray(AllocArray *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +struct StructObj1 { + int f; + rs_element e; +}; + +// result type cannot be struct containing object type +#pragma rs reduce(redStructObj) accumulator(AccumStructObj) outconverter(OutStructObj) +static void AccumStructObj(int *accum, int val) { } +static void OutStructObj(struct StructObj1 *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +struct StructObj2 { + rs_type t; + float f; +}; +typedef struct StructObj2 StructObj2Array[10]; + +// result type cannot be array of struct containing object type +#pragma rs reduce(redStructObjArray) accumulator(AccumStructObjArray) \ + outconverter(OutStructObjArray) +static void AccumStructObjArray(int *accum, int val) { } +static void OutStructObjArray(StructObj2Array *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +typedef char *Ptr; + +// result type cannot be pointer +#pragma rs reduce(redPtr) accumulator(AccumPtr) combiner(CombPtr) +static void AccumPtr(Ptr *accum, char val) { } +static void CombPtr(Ptr *accum, const Ptr *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redPtrOutFix) accumulator(AccumPtr) combiner(CombPtr) \ + outconverter(OutPtrFix) +static void OutPtrFix(int *out, const Ptr *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redPtrOutBreak) accumulator(AccumInt) outconverter(OutPtrBreak) +static void OutPtrBreak(Ptr *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +typedef Ptr PtrArray7[7]; + +// cannot export array of pointer +#pragma rs reduce(redPtrArray7) accumulator(AccumPtrArray7) combiner(CombPtrArray7) +static void AccumPtrArray7(PtrArray7 *accum, int val) { } +static void CombPtrArray7(PtrArray7 *accum, const PtrArray7 *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redPtrArray7OutFix) accumulator(AccumPtrArray7) combiner(CombPtrArray7) \ + outconverter(OutPtrArray7Fix) +static void OutPtrArray7Fix(int *out, const PtrArray7 *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redPtrArray7OutBreak) accumulator(AccumInt) outconverter(OutPtrArray7Break) +static void OutPtrArray7Break(PtrArray7 *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +struct StructPtr1 { + Ptr p; + double d; +}; + +struct StructPtr11 { + Ptr p; + double d; + int i; +}; + +struct StructPtr111 { + Ptr p; + double d; + int i; + float f; +}; + +// cannot export struct containing pointer +#pragma rs reduce(redStructPtr) accumulator(AccumStructPtr) combiner(CombStructPtr) +static void AccumStructPtr(struct StructPtr1 *accum, int val) { } +static void CombStructPtr(struct StructPtr1 *accum, const struct StructPtr1 *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redStructPtrOutFix) accumulator(AccumStructPtrOutFix) \ + combiner(CombStructPtrOutFix) outconverter(OutStructPtrFix) +static void AccumStructPtrOutFix(struct StructPtr11 *accum, int val) { } +static void CombStructPtrOutFix(struct StructPtr11 *accum, const struct StructPtr11 *other) { } +static void OutStructPtrFix(int *out, const struct StructPtr11 *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redStructPtrOutBreak) accumulator(AccumInt) outconverter(OutStructPtrBreak) +static void OutStructPtrBreak(struct StructPtr111 *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +struct StructPtr2 { + float f; + Ptr p; +}; +typedef struct StructPtr2 StructPtr2Array[7]; + +struct StructPtr22 { + float f; + Ptr p; + char c; +}; +typedef struct StructPtr22 StructPtr22Array[7]; + +struct StructPtr222 { + float f; + Ptr p; + char c; + double d; +}; +typedef struct StructPtr222 StructPtr222Array[7]; + +// cannot export struct containing pointer +#pragma rs reduce(redStructPtrArray) accumulator(AccumStructPtrArray) combiner(CombStructPtrArray) +static void AccumStructPtrArray(StructPtr2Array *accum, int val) { } +static void CombStructPtrArray(StructPtr2Array *accum, const StructPtr2Array *other) { } + +// problem is result type, not accumulator type, so outconverter can fix this +#pragma rs reduce(redStructPtrArrayOutFix) accumulator(AccumStructPtrArrayOutFix) \ + combiner(CombStructPtrArrayOutFix) outconverter(OutStructPtrArrayFix) +static void AccumStructPtrArrayOutFix(StructPtr22Array *accum, int val) { } +static void CombStructPtrArrayOutFix(StructPtr22Array *accum, const StructPtr22Array *other) { } +static void OutStructPtrArrayFix(int *out, const StructPtr22Array *val) { } + +// problem is result type, not accumulator type, so outconverter can break this +#pragma rs reduce(redStructPtrArrayOutBreak) accumulator(AccumInt) \ + outconverter(OutStructPtrArrayBreak) +static void OutStructPtrArrayBreak(StructPtr22Array *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +typedef void Fn(void); + +// cannot export function type +// +// NOTE: Not suitable as accumulator data type, regardless of whether +// we have outconverter; that's tested in reduce_general_bad_accumulator.rs. +#pragma rs reduce(redFn) accumulator(AccumInt) outconverter(OutFn) +static void OutFn(Fn *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +struct Incomplete; + +// result type cannot be incomplete type +// +// NOTE: Not suitable as accumulator data type, regardless of whether +// we have outconverter; that's tested in reduce_general_bad_accumulator.rs. +#pragma rs reduce(redStructIncomplete) accumulator(AccumInt) outconverter(OutStructIncomplete) +static void OutStructIncomplete(struct Incomplete *out, const int *val) { } + +///////////////////////////////////////////////////////////////////////// + +typedef int IntA[]; // incomplete (unknown element count) + +// result type cannot be incomplete type +// +// NOTE: Not suitable as accumulator data type, regardless of whether +// we have outconverter; that's tested in reduce_general_bad_accumulator.rs. +#pragma rs reduce(redArrayIncomplete) accumulator(AccumInt) outconverter(OutArrayIncomplete) +static void OutArrayIncomplete(IntA *out, const int *val) { }
diff --git a/slang/tests/F_reduce_general_bad_result/stderr.txt.expect b/slang/tests/F_reduce_general_bad_result/stderr.txt.expect new file mode 100644 index 0000000..686ca1d --- /dev/null +++ b/slang/tests/F_reduce_general_bad_result/stderr.txt.expect
@@ -0,0 +1,29 @@ +reduce_general_bad_result.rs:22:36: error: multidimensional arrays cannot be exported: 'accum' +reduce_general_bad_result.rs:32:39: error: multidimensional arrays cannot be exported: 'out' +reduce_general_bad_result.rs:36:7: error: unions cannot be exported: 'UnionShortDouble' +reduce_general_bad_result.rs:46:7: error: unions cannot be exported: 'UnionLongFloat' +reduce_general_bad_result.rs:72:7: error: unions cannot be exported: 'UnionIntFloat' +reduce_general_bad_result.rs:84:7: error: unions cannot be exported: 'UnionCharLong' +reduce_general_bad_result.rs:113:7: error: bit fields are not able to be exported: 'Bits1.b' +reduce_general_bad_result.rs:122:7: error: bit fields are not able to be exported: 'Bits111.e' +reduce_general_bad_result.rs:146:7: error: bit fields are not able to be exported: 'Bits2.b' +reduce_general_bad_result.rs:157:7: error: bit fields are not able to be exported: 'Bits222.e' +reduce_general_bad_result.rs:183:36: error: accumulator AccumMat() for '#pragma rs reduce(redMat)' (reduce_general_bad_result.rs:182:12) parameter 'accum' (type 'rs_matrix2x2 *') must not point to a matrix type unless outconverter is provided +reduce_general_bad_result.rs:191:39: error: outconverter OutMatBreak() for '#pragma rs reduce(redMatOutBreak)' (reduce_general_bad_result.rs:190:12) parameter 'out' (type 'rs_matrix2x2 *') must not point to a matrix type +reduce_general_bad_result.rs:199:43: error: accumulator AccumMatArray() for '#pragma rs reduce(redMatArray)' (reduce_general_bad_result.rs:198:12) parameter 'accum' (type 'rs_matrix2x2 (*)[10]') must not point to an array of matrix type unless outconverter is provided +reduce_general_bad_result.rs:209:46: error: outconverter OutMatArrayBreak() for '#pragma rs reduce(redMatArrayOutBreak)' (reduce_general_bad_result.rs:208:12) parameter 'out' (type 'rs_matrix2x2 (*)[10]') must not point to an array of matrix type +reduce_general_bad_result.rs:215:37: error: outconverter OutAlloc() for '#pragma rs reduce(redAlloc)' (reduce_general_bad_result.rs:214:12) parameter 'out' (type 'struct rs_allocation *') must not point to data containing an object type +reduce_general_bad_result.rs:224:39: error: outconverter OutAllocArray() for '#pragma rs reduce(redAllocArray)' (reduce_general_bad_result.rs:222:12) parameter 'out' (type 'struct rs_allocation (*)[10]') must not point to data containing an object type +reduce_general_bad_result.rs:236:45: error: outconverter OutStructObj() for '#pragma rs reduce(redStructObj)' (reduce_general_bad_result.rs:234:12) parameter 'out' (type 'struct StructObj1 *') must not point to data containing an object type +reduce_general_bad_result.rs:250:48: error: outconverter OutStructObjArray() for '#pragma rs reduce(redStructObjArray)' (reduce_general_bad_result.rs:247:12) parameter 'out' (type 'struct StructObj2 (*)[10]') must not point to data containing an object type +reduce_general_bad_result.rs:258:27: error: accumulator AccumPtr() for '#pragma rs reduce(redPtr)' (reduce_general_bad_result.rs:257:12) parameter 'accum' (type 'char **') must not point to a pointer unless outconverter is provided +reduce_general_bad_result.rs:268:30: error: outconverter OutPtrBreak() for '#pragma rs reduce(redPtrOutBreak)' (reduce_general_bad_result.rs:267:12) parameter 'out' (type 'char **') must not point to a pointer +reduce_general_bad_result.rs:276:28: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'accum' +reduce_general_bad_result.rs:286:31: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'out' +reduce_general_bad_result.rs:310:28: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'accum' +reduce_general_bad_result.rs:322:31: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'out' +reduce_general_bad_result.rs:349:33: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'accum' +reduce_general_bad_result.rs:362:36: error: structures containing pointers cannot be used as the type of an exported global variable or the parameter to an exported function: 'out' +reduce_general_bad_result.rs:373:23: error: function types cannot be exported: 'out' +reduce_general_bad_result.rs:384:52: error: outconverter OutStructIncomplete() for '#pragma rs reduce(redStructIncomplete)' (reduce_general_bad_result.rs:383:12) parameter 'out' (type 'struct Incomplete *') must not point to an incomplete type +reduce_general_bad_result.rs:395:38: error: outconverter OutArrayIncomplete() for '#pragma rs reduce(redArrayIncomplete)' (reduce_general_bad_result.rs:394:12) parameter 'out' (type 'int (*)[]') must not point to an incomplete type
diff --git a/slang/tests/F_reduce_general_bad_result/stdout.txt.expect b/slang/tests/F_reduce_general_bad_result/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_reduce_general_bad_result/stdout.txt.expect
diff --git a/slang/tests/F_reduce_general_parse/reduce_general_parse.rs b/slang/tests/F_reduce_general_parse/reduce_general_parse.rs new file mode 100644 index 0000000..6606d83 --- /dev/null +++ b/slang/tests/F_reduce_general_parse/reduce_general_parse.rs
@@ -0,0 +1,26 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(all) + +#pragma rs reduce +#pragma rs reduce( +#pragma rs reduce ( +#pragma rs reduce(* +#pragma rs reduce(foo +#pragma rs reduce (foo +#pragma rs reduce(foo ) +#pragma rs reduce(foo) initializer( +#pragma rs reduce(foo) initializer(init) +#pragma rs reduce(foo) initializer(init) accumulator(accum) +#pragma rs reduce(foo) initializer(init2) accumulator(accum2) +#pragma rs reduce(bar) accumulator(baccum) initializer(binit) +#pragma rs reduce(baz) accumulator(baccum) initializer(binit) accumulator(baccum) +#pragma rs reduce(baz) accumulator(baccum) initializer(binit) accumulator(baccum2) +#pragma rs reduce(goo) something(wrong) +#pragma rs reduce(goo) initializer(gi) accumulator(ga) ( + +static void init(int *accum) { } +static void accum(int *accum, int val) { } + +static void binit(int *accum) { } +static void baccum(int *accum, int val) { }
diff --git a/slang/tests/F_reduce_general_parse/stderr.txt.expect b/slang/tests/F_reduce_general_parse/stderr.txt.expect new file mode 100644 index 0000000..b21b78c --- /dev/null +++ b/slang/tests/F_reduce_general_parse/stderr.txt.expect
@@ -0,0 +1,14 @@ +reduce_general_parse.rs:5:18: error: missing '(' after 'reduce' for '#pragma rs reduce' +reduce_general_parse.rs:6:19: error: missing name after 'reduce(' for '#pragma rs reduce' +reduce_general_parse.rs:7:20: error: missing name after 'reduce(' for '#pragma rs reduce' +reduce_general_parse.rs:8:19: error: missing name after 'reduce(' for '#pragma rs reduce' +reduce_general_parse.rs:9:22: error: missing ')' after 'reduce(foo' for '#pragma rs reduce' +reduce_general_parse.rs:10:25: error: missing ')' after 'reduce(foo' for '#pragma rs reduce' +reduce_general_parse.rs:11:12: error: missing 'accumulator' for '#pragma rs reduce' +reduce_general_parse.rs:12:36: error: missing name after 'initializer(' for '#pragma rs reduce' +reduce_general_parse.rs:13:12: error: missing 'accumulator' for '#pragma rs reduce' +reduce_general_parse.rs:15:12: error: reduction kernel 'foo' declared multiple times (first one is at reduce_general_parse.rs:14:12) +reduce_general_parse.rs:17:63: error: more than one 'accumulator' for '#pragma rs reduce' +reduce_general_parse.rs:18:63: error: more than one 'accumulator' for '#pragma rs reduce' +reduce_general_parse.rs:19:24: error: did not recognize 'something' for '#pragma reduce'; expected one of the following keywords: 'accumulator', 'combiner', 'initializer', 'outconverter', 'reduce' +reduce_general_parse.rs:20:56: error: did not expect '(' here for '#pragma rs reduce'
diff --git a/slang/tests/F_reduce_general_parse/stdout.txt.expect b/slang/tests/F_reduce_general_parse/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_reduce_general_parse/stdout.txt.expect
diff --git a/slang/tests/F_reduce_general_void/reduce_general_void.rs b/slang/tests/F_reduce_general_void/reduce_general_void.rs new file mode 100644 index 0000000..b39fa56 --- /dev/null +++ b/slang/tests/F_reduce_general_void/reduce_general_void.rs
@@ -0,0 +1,22 @@ +// -Wall +#pragma version(1) +#pragma rs java_package_name(voidptr) + +// void is not a suitable accumulator data type or result type; and +// note that an input cannot be a pointer + +// accumulator must not be void +#pragma rs reduce(voidA) initializer(voidA_init) accumulator(voidA_accum) combiner(voidA_comb) +static void voidA_init(void *accum) { } +static void voidA_accum(void *accum, int val) { } +static void voidA_comb(void *accum, const void *other) { } + +// input must not be void* +#pragma rs reduce(voidI) accumulator(voidI_accum) combiner(voidI_comb) +static void voidI_accum(int *accum, void *val) { } +static void voidI_comb(int *accum, const int *other) { } + +// result type must not be void +#pragma rs reduce(voidO) accumulator(voidO_accum) outconverter(voidO_out) +static void voidO_accum(int *accum, int val) { } +static void voidO_out(void *out, const int *val) { }
diff --git a/slang/tests/F_reduce_general_void/stderr.txt.expect b/slang/tests/F_reduce_general_void/stderr.txt.expect new file mode 100644 index 0000000..973cae8 --- /dev/null +++ b/slang/tests/F_reduce_general_void/stderr.txt.expect
@@ -0,0 +1,3 @@ +reduce_general_void.rs:11:13: error: accumulator voidA_accum() for '#pragma rs reduce(voidA)' (reduce_general_void.rs:9:12) parameter 'accum' (type 'void *') must not be pointer to incomplete type +reduce_general_void.rs:16:43: error: accumulator voidI_accum() for '#pragma rs reduce(voidI)' (reduce_general_void.rs:15:12) parameter 'val' (type 'void *') must not be a pointer +reduce_general_void.rs:22:29: error: outconverter voidO_out() for '#pragma rs reduce(voidO)' (reduce_general_void.rs:20:12) parameter 'out' (type 'void *') must not point to an incomplete type
diff --git a/slang/tests/F_reduce_general_void/stdout.txt.expect b/slang/tests/F_reduce_general_void/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_reduce_general_void/stdout.txt.expect
diff --git a/slang/tests/F_reduce_general_wrong_api/reduce_general_wrong_api.rs b/slang/tests/F_reduce_general_wrong_api/reduce_general_wrong_api.rs new file mode 100644 index 0000000..5da3239 --- /dev/null +++ b/slang/tests/F_reduce_general_wrong_api/reduce_general_wrong_api.rs
@@ -0,0 +1,8 @@ +// -target-api 23 -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(all) + +#pragma rs reduce(addint) \ + initializer(aiInit) accumulator(aiAccum) + +void dummy() {}
diff --git a/slang/tests/F_reduce_general_wrong_api/stderr.txt.expect b/slang/tests/F_reduce_general_wrong_api/stderr.txt.expect new file mode 100644 index 0000000..b92931b --- /dev/null +++ b/slang/tests/F_reduce_general_wrong_api/stderr.txt.expect
@@ -0,0 +1 @@ +reduce_general_wrong_api.rs:5:12: error: reduction kernels are not supported in SDK levels 11-23
diff --git a/slang/tests/F_reduce_general_wrong_api/stdout.txt.expect b/slang/tests/F_reduce_general_wrong_api/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_reduce_general_wrong_api/stdout.txt.expect
diff --git a/slang/tests/F_refcount_15/refcount_15.rs b/slang/tests/F_refcount_15/refcount_15.rs new file mode 100644 index 0000000..b3e3a17 --- /dev/null +++ b/slang/tests/F_refcount_15/refcount_15.rs
@@ -0,0 +1,20 @@ +// -target-api 15 +#pragma version(1) +#pragma rs java_package_name(foo) + +rs_allocation aFail[2]; + +struct rsStruct { + rs_allocation a; +} sFail; + +static rs_allocation aOk[2]; + +static struct noExport { + rs_allocation a; +} sOk; + +struct onlyPtr { + rs_allocation a; +} *ptrOk; +
diff --git a/slang/tests/F_refcount_15/stderr.txt.expect b/slang/tests/F_refcount_15/stderr.txt.expect new file mode 100644 index 0000000..e6453f0 --- /dev/null +++ b/slang/tests/F_refcount_15/stderr.txt.expect
@@ -0,0 +1,2 @@ +refcount_15.rs:5:15: error: arrays/structures containing RS object types cannot be exported in target API < 16: 'aFail' +refcount_15.rs:9:3: error: arrays/structures containing RS object types cannot be exported in target API < 16: 'sFail'
diff --git a/slang/tests/F_refcount_15/stdout.txt.expect b/slang/tests/F_refcount_15/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_refcount_15/stdout.txt.expect
diff --git a/slang/tests/F_root_11_ox/root_11_ox.rs b/slang/tests/F_root_11_ox/root_11_ox.rs new file mode 100644 index 0000000..00278d2 --- /dev/null +++ b/slang/tests/F_root_11_ox/root_11_ox.rs
@@ -0,0 +1,6 @@ +// -target-api 11 +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(int *out, uint32_t x) { +}
diff --git a/slang/tests/F_root_11_ox/stderr.txt.expect b/slang/tests/F_root_11_ox/stderr.txt.expect new file mode 100644 index 0000000..1d3fc08 --- /dev/null +++ b/slang/tests/F_root_11_ox/stderr.txt.expect
@@ -0,0 +1 @@ +root_11_ox.rs:5:6: error: Compute kernel root() targeting SDK levels 11-13 may not skip parameters
diff --git a/slang/tests/F_root_11_ox/stdout.txt.expect b/slang/tests/F_root_11_ox/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_11_ox/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_int_in/root_compute_int_in.rs b/slang/tests/F_root_compute_int_in/root_compute_int_in.rs new file mode 100644 index 0000000..b2560b4 --- /dev/null +++ b/slang/tests/F_root_compute_int_in/root_compute_int_in.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int in) { +}
diff --git a/slang/tests/F_root_compute_int_in/stderr.txt.expect b/slang/tests/F_root_compute_int_in/stderr.txt.expect new file mode 100644 index 0000000..13925df --- /dev/null +++ b/slang/tests/F_root_compute_int_in/stderr.txt.expect
@@ -0,0 +1,2 @@ +root_compute_int_in.rs:4:21: error: Compute kernel root() cannot have non-pointer parameters besides special parameters ('context', 'x', 'y', 'z'). Parameter 'in' is of type: 'const int' +root_compute_int_in.rs:4:6: error: Compute kernel root() must have at least one parameter for in or out
diff --git a/slang/tests/F_root_compute_int_in/stdout.txt.expect b/slang/tests/F_root_compute_int_in/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_int_in/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_non_const_usrData/root_compute_non_const_usrData.rs b/slang/tests/F_root_compute_non_const_usrData/root_compute_non_const_usrData.rs new file mode 100644 index 0000000..46dc642 --- /dev/null +++ b/slang/tests/F_root_compute_non_const_usrData/root_compute_non_const_usrData.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, void *usrData) { +}
diff --git a/slang/tests/F_root_compute_non_const_usrData/stderr.txt.expect b/slang/tests/F_root_compute_non_const_usrData/stderr.txt.expect new file mode 100644 index 0000000..3974ed7 --- /dev/null +++ b/slang/tests/F_root_compute_non_const_usrData/stderr.txt.expect
@@ -0,0 +1 @@ +root_compute_non_const_usrData.rs:4:44: error: Compute kernel root() can only have one non-const pointer parameter. Parameters 'aout' and 'usrData' are both non-const.
diff --git a/slang/tests/F_root_compute_non_const_usrData/stdout.txt.expect b/slang/tests/F_root_compute_non_const_usrData/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_non_const_usrData/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_non_ptr_usrData/root_compute_non_ptr_usrData.rs b/slang/tests/F_root_compute_non_ptr_usrData/root_compute_non_ptr_usrData.rs new file mode 100644 index 0000000..ce67f8a --- /dev/null +++ b/slang/tests/F_root_compute_non_ptr_usrData/root_compute_non_ptr_usrData.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const int usrData) { +}
diff --git a/slang/tests/F_root_compute_non_ptr_usrData/stderr.txt.expect b/slang/tests/F_root_compute_non_ptr_usrData/stderr.txt.expect new file mode 100644 index 0000000..a113ce4 --- /dev/null +++ b/slang/tests/F_root_compute_non_ptr_usrData/stderr.txt.expect
@@ -0,0 +1 @@ +root_compute_non_ptr_usrData.rs:4:48: error: Compute kernel root() cannot have non-pointer parameters besides special parameters ('context', 'x', 'y', 'z'). Parameter 'usrData' is of type: 'const int'
diff --git a/slang/tests/F_root_compute_non_ptr_usrData/stdout.txt.expect b/slang/tests/F_root_compute_non_ptr_usrData/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_non_ptr_usrData/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_non_uint32_t_xyzar/root_compute_non_uint32_t_xyzar.rs b/slang/tests/F_root_compute_non_uint32_t_xyzar/root_compute_non_uint32_t_xyzar.rs new file mode 100644 index 0000000..da45b86 --- /dev/null +++ b/slang/tests/F_root_compute_non_uint32_t_xyzar/root_compute_non_uint32_t_xyzar.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const void *usrData, + short x, float y, double z, uchar ar) { +}
diff --git a/slang/tests/F_root_compute_non_uint32_t_xyzar/stderr.txt.expect b/slang/tests/F_root_compute_non_uint32_t_xyzar/stderr.txt.expect new file mode 100644 index 0000000..9b4af29 --- /dev/null +++ b/slang/tests/F_root_compute_non_uint32_t_xyzar/stderr.txt.expect
@@ -0,0 +1,6 @@ +root_compute_non_uint32_t_xyzar.rs:5:17: error: Special parameter 'x' must be of type 'int' or 'unsigned int'. It is of type 'short'. +root_compute_non_uint32_t_xyzar.rs:5:26: error: Special parameter 'y' must be of type 'int' or 'unsigned int'. It is of type 'float'. +root_compute_non_uint32_t_xyzar.rs:5:26: error: Special parameters 'x' and 'y' must be of the same type. 'x' is of type 'short' while 'y' is of type 'float'. +root_compute_non_uint32_t_xyzar.rs:5:36: error: Special parameter 'z' must be of type 'int' or 'unsigned int'. It is of type 'double'. +root_compute_non_uint32_t_xyzar.rs:5:36: error: Special parameters 'x' and 'z' must be of the same type. 'x' is of type 'short' while 'z' is of type 'double'. +root_compute_non_uint32_t_xyzar.rs:5:45: error: In compute kernel root(), parameter 'ar' cannot appear after any of the special parameters ('context', 'x', 'y', 'z').
diff --git a/slang/tests/F_root_compute_non_uint32_t_xyzar/stdout.txt.expect b/slang/tests/F_root_compute_non_uint32_t_xyzar/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_non_uint32_t_xyzar/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_non_uint32_t_xyzwar/root_compute_non_uint32_t_xyzwar.rs b/slang/tests/F_root_compute_non_uint32_t_xyzwar/root_compute_non_uint32_t_xyzwar.rs new file mode 100644 index 0000000..b3a00ad --- /dev/null +++ b/slang/tests/F_root_compute_non_uint32_t_xyzwar/root_compute_non_uint32_t_xyzwar.rs
@@ -0,0 +1,7 @@ +// -target-api 23 +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const void *usrData, + short x, float y, double z, long w, uchar ar) { +}
diff --git a/slang/tests/F_root_compute_non_uint32_t_xyzwar/stderr.txt.expect b/slang/tests/F_root_compute_non_uint32_t_xyzwar/stderr.txt.expect new file mode 100644 index 0000000..9678fac --- /dev/null +++ b/slang/tests/F_root_compute_non_uint32_t_xyzwar/stderr.txt.expect
@@ -0,0 +1,7 @@ +root_compute_non_uint32_t_xyzwar.rs:6:17: error: Special parameter 'x' must be of type 'int' or 'unsigned int'. It is of type 'short'. +root_compute_non_uint32_t_xyzwar.rs:6:26: error: Special parameter 'y' must be of type 'int' or 'unsigned int'. It is of type 'float'. +root_compute_non_uint32_t_xyzwar.rs:6:26: error: Special parameters 'x' and 'y' must be of the same type. 'x' is of type 'short' while 'y' is of type 'float'. +root_compute_non_uint32_t_xyzwar.rs:6:36: error: Special parameter 'z' must be of type 'int' or 'unsigned int'. It is of type 'double'. +root_compute_non_uint32_t_xyzwar.rs:6:36: error: Special parameters 'x' and 'z' must be of the same type. 'x' is of type 'short' while 'z' is of type 'double'. +root_compute_non_uint32_t_xyzwar.rs:6:44: error: In compute kernel root(), parameter 'w' cannot appear after any of the special parameters ('context', 'x', 'y', 'z'). +root_compute_non_uint32_t_xyzwar.rs:6:53: error: In compute kernel root(), parameter 'ar' cannot appear after any of the special parameters ('context', 'x', 'y', 'z').
diff --git a/slang/tests/F_root_compute_non_uint32_t_xyzwar/stdout.txt.expect b/slang/tests/F_root_compute_non_uint32_t_xyzwar/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_non_uint32_t_xyzwar/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_non_void_ret/root_compute_non_void_ret.rs b/slang/tests/F_root_compute_non_void_ret/root_compute_non_void_ret.rs new file mode 100644 index 0000000..b1dd4fa --- /dev/null +++ b/slang/tests/F_root_compute_non_void_ret/root_compute_non_void_ret.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int root(const int *in, int *out, const void *usrData) { + return 10; +}
diff --git a/slang/tests/F_root_compute_non_void_ret/stderr.txt.expect b/slang/tests/F_root_compute_non_void_ret/stderr.txt.expect new file mode 100644 index 0000000..a371330 --- /dev/null +++ b/slang/tests/F_root_compute_non_void_ret/stderr.txt.expect
@@ -0,0 +1 @@ +root_compute_non_void_ret.rs:4:5: error: Compute kernel root() is required to return a void type
diff --git a/slang/tests/F_root_compute_non_void_ret/stdout.txt.expect b/slang/tests/F_root_compute_non_void_ret/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_non_void_ret/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_really_bad/root_compute_really_bad.rs b/slang/tests/F_root_compute_really_bad/root_compute_really_bad.rs new file mode 100644 index 0000000..47d6b48 --- /dev/null +++ b/slang/tests/F_root_compute_really_bad/root_compute_really_bad.rs
@@ -0,0 +1,18 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int root(int ain, int aout, int usrData, float x1, double y1, + uint32_t y, uint32_t x, + uint32_t extra1, uint32_t extra2) { + return 10; +} + +void root2(int* ain, const int* aout, int* usrData, const float* x1, + const double* y1, uint32_t y) { +} + +int RS_KERNEL + root_kernel(int ain, int* aout, int usrData, float x1, double y1, + uint32_t y, uint32_t x, uint32_t extra1, uint32_t extra2) { + return 10; +}
diff --git a/slang/tests/F_root_compute_really_bad/stderr.txt.expect b/slang/tests/F_root_compute_really_bad/stderr.txt.expect new file mode 100644 index 0000000..7d10dcc --- /dev/null +++ b/slang/tests/F_root_compute_really_bad/stderr.txt.expect
@@ -0,0 +1,17 @@ +root_compute_really_bad.rs:4:5: error: Compute kernel root() is required to return a void type +root_compute_really_bad.rs:5:31: error: In compute kernel root(), special parameter 'x' must be defined before special parameter 'y'. +root_compute_really_bad.rs:6:19: error: In compute kernel root(), parameter 'extra1' cannot appear after any of the special parameters ('context', 'x', 'y', 'z'). +root_compute_really_bad.rs:6:36: error: In compute kernel root(), parameter 'extra2' cannot appear after any of the special parameters ('context', 'x', 'y', 'z'). +root_compute_really_bad.rs:4:14: error: Compute kernel root() cannot have non-pointer parameters besides special parameters ('context', 'x', 'y', 'z'). Parameter 'ain' is of type: 'int' +root_compute_really_bad.rs:4:23: error: Compute kernel root() cannot have non-pointer parameters besides special parameters ('context', 'x', 'y', 'z'). Parameter 'aout' is of type: 'int' +root_compute_really_bad.rs:4:33: error: Compute kernel root() cannot have non-pointer parameters besides special parameters ('context', 'x', 'y', 'z'). Parameter 'usrData' is of type: 'int' +root_compute_really_bad.rs:4:48: error: Compute kernel root() cannot have non-pointer parameters besides special parameters ('context', 'x', 'y', 'z'). Parameter 'x1' is of type: 'float' +root_compute_really_bad.rs:4:59: error: Compute kernel root() cannot have non-pointer parameters besides special parameters ('context', 'x', 'y', 'z'). Parameter 'y1' is of type: 'double' +root_compute_really_bad.rs:4:5: error: Compute kernel root() must have at least one parameter for in or out +root_compute_really_bad.rs:10:44: error: Compute kernel root2() can only have one non-const pointer parameter. Parameters 'ain' and 'usrData' are both non-const. +root_compute_really_bad.rs:10:66: error: Unexpected parameter 'x1' for compute kernel root2() +root_compute_really_bad.rs:11:26: error: Unexpected parameter 'y1' for compute kernel root2() +root_compute_really_bad.rs:16:38: error: In compute kernel root_kernel(), special parameter 'x' must be defined before special parameter 'y'. +root_compute_really_bad.rs:16:50: error: In compute kernel root_kernel(), parameter 'extra1' cannot appear after any of the special parameters ('context', 'x', 'y', 'z'). +root_compute_really_bad.rs:16:67: error: In compute kernel root_kernel(), parameter 'extra2' cannot appear after any of the special parameters ('context', 'x', 'y', 'z'). +root_compute_really_bad.rs:15:31: error: Compute kernel root_kernel() cannot have parameter 'aout' of pointer type: 'int *'
diff --git a/slang/tests/F_root_compute_really_bad/stdout.txt.expect b/slang/tests/F_root_compute_really_bad/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_really_bad/stdout.txt.expect
diff --git a/slang/tests/F_root_compute_too_many_args/root_compute_too_many_args.rs b/slang/tests/F_root_compute_too_many_args/root_compute_too_many_args.rs new file mode 100644 index 0000000..52e917f --- /dev/null +++ b/slang/tests/F_root_compute_too_many_args/root_compute_too_many_args.rs
@@ -0,0 +1,7 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *in, int *out, const void *usrData, + uint32_t x, uint32_t y, + uint32_t extra1, uint32_t extra2) { +}
diff --git a/slang/tests/F_root_compute_too_many_args/stderr.txt.expect b/slang/tests/F_root_compute_too_many_args/stderr.txt.expect new file mode 100644 index 0000000..8afe8bc --- /dev/null +++ b/slang/tests/F_root_compute_too_many_args/stderr.txt.expect
@@ -0,0 +1,2 @@ +root_compute_too_many_args.rs:6:20: error: In compute kernel root(), parameter 'extra1' cannot appear after any of the special parameters ('context', 'x', 'y', 'z'). +root_compute_too_many_args.rs:6:37: error: In compute kernel root(), parameter 'extra2' cannot appear after any of the special parameters ('context', 'x', 'y', 'z').
diff --git a/slang/tests/F_root_compute_too_many_args/stdout.txt.expect b/slang/tests/F_root_compute_too_many_args/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_compute_too_many_args/stdout.txt.expect
diff --git a/slang/tests/F_root_graphics/root_graphics.rs b/slang/tests/F_root_graphics/root_graphics.rs new file mode 100644 index 0000000..970cc9a --- /dev/null +++ b/slang/tests/F_root_graphics/root_graphics.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(void) { + return; +}
diff --git a/slang/tests/F_root_graphics/stderr.txt.expect b/slang/tests/F_root_graphics/stderr.txt.expect new file mode 100644 index 0000000..6b1e04d --- /dev/null +++ b/slang/tests/F_root_graphics/stderr.txt.expect
@@ -0,0 +1 @@ +root_graphics.rs:4:6: error: root() is required to return an int for graphics usage
diff --git a/slang/tests/F_root_graphics/stdout.txt.expect b/slang/tests/F_root_graphics/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_graphics/stdout.txt.expect
diff --git a/slang/tests/F_root_graphics_13/root_graphics_13.rs b/slang/tests/F_root_graphics_13/root_graphics_13.rs new file mode 100644 index 0000000..c6c1fbd --- /dev/null +++ b/slang/tests/F_root_graphics_13/root_graphics_13.rs
@@ -0,0 +1,7 @@ +// -target-api 13 +#pragma version(1) +#pragma rs java_package_name(foo) + +int root(unsigned int launchID) { + return 10; +}
diff --git a/slang/tests/F_root_graphics_13/stderr.txt.expect b/slang/tests/F_root_graphics_13/stderr.txt.expect new file mode 100644 index 0000000..74e9ee0 --- /dev/null +++ b/slang/tests/F_root_graphics_13/stderr.txt.expect
@@ -0,0 +1 @@ +root_graphics_13.rs:5:23: error: invalid parameter type for legacy graphics root() function: 'unsigned int'
diff --git a/slang/tests/F_root_graphics_13/stdout.txt.expect b/slang/tests/F_root_graphics_13/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_root_graphics_13/stdout.txt.expect
diff --git a/slang/tests/F_rs_fp_two_pragmas/rs_fp_two_pragmas.rs b/slang/tests/F_rs_fp_two_pragmas/rs_fp_two_pragmas.rs new file mode 100644 index 0000000..b07091c --- /dev/null +++ b/slang/tests/F_rs_fp_two_pragmas/rs_fp_two_pragmas.rs
@@ -0,0 +1,8 @@ +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#pragma rs_fp_relaxed +#pragma rs_fp_full + + +
diff --git a/slang/tests/F_rs_fp_two_pragmas/stderr.txt.expect b/slang/tests/F_rs_fp_two_pragmas/stderr.txt.expect new file mode 100644 index 0000000..6ad9b66 --- /dev/null +++ b/slang/tests/F_rs_fp_two_pragmas/stderr.txt.expect
@@ -0,0 +1 @@ +rs_fp_two_pragmas.rs:5:9: error: Multiple float precisions specified. Encountered rs_fp_relaxed previously.
diff --git a/slang/tests/F_rs_fp_two_pragmas/stdout.txt.expect b/slang/tests/F_rs_fp_two_pragmas/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_rs_fp_two_pragmas/stdout.txt.expect
diff --git a/slang/tests/F_rs_prefix/rs_prefix.rs b/slang/tests/F_rs_prefix/rs_prefix.rs new file mode 100644 index 0000000..99ae9aa --- /dev/null +++ b/slang/tests/F_rs_prefix/rs_prefix.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void rs_foo() { + return; +}
diff --git a/slang/tests/F_rs_prefix/stderr.txt.expect b/slang/tests/F_rs_prefix/stderr.txt.expect new file mode 100644 index 0000000..11d291b --- /dev/null +++ b/slang/tests/F_rs_prefix/stderr.txt.expect
@@ -0,0 +1 @@ +rs_prefix.rs:4:6: error: invalid function name prefix, "rs" is reserved: 'rs_foo'
diff --git a/slang/tests/F_rs_prefix/stdout.txt.expect b/slang/tests/F_rs_prefix/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_rs_prefix/stdout.txt.expect
diff --git a/slang/tests/F_set_target_api_10/set_target_api_10.rs b/slang/tests/F_set_target_api_10/set_target_api_10.rs new file mode 100644 index 0000000..53bda21 --- /dev/null +++ b/slang/tests/F_set_target_api_10/set_target_api_10.rs
@@ -0,0 +1,4 @@ +// -target-api 10 +#pragma version(1) +#pragma rs java_package_name(foo) +
diff --git a/slang/tests/F_set_target_api_10/stderr.txt.expect b/slang/tests/F_set_target_api_10/stderr.txt.expect new file mode 100644 index 0000000..2f0da2a --- /dev/null +++ b/slang/tests/F_set_target_api_10/stderr.txt.expect
@@ -0,0 +1 @@ +error: target API level '10' is out of range ('11' - '24')
diff --git a/slang/tests/F_set_target_api_10/stdout.txt.expect b/slang/tests/F_set_target_api_10/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_set_target_api_10/stdout.txt.expect
diff --git a/slang/tests/F_set_target_api_9000/set_target_api_9000.rs b/slang/tests/F_set_target_api_9000/set_target_api_9000.rs new file mode 100644 index 0000000..26e40ac --- /dev/null +++ b/slang/tests/F_set_target_api_9000/set_target_api_9000.rs
@@ -0,0 +1,4 @@ +// -target-api 9000 +#pragma version(1) +#pragma rs java_package_name(foo) +
diff --git a/slang/tests/F_set_target_api_9000/stderr.txt.expect b/slang/tests/F_set_target_api_9000/stderr.txt.expect new file mode 100644 index 0000000..4d30c06 --- /dev/null +++ b/slang/tests/F_set_target_api_9000/stderr.txt.expect
@@ -0,0 +1 @@ +error: target API level '9000' is out of range ('11' - '24')
diff --git a/slang/tests/F_set_target_api_9000/stdout.txt.expect b/slang/tests/F_set_target_api_9000/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_set_target_api_9000/stdout.txt.expect
diff --git a/slang/tests/F_set_target_api_foo/set_target_api_foo.rs b/slang/tests/F_set_target_api_foo/set_target_api_foo.rs new file mode 100644 index 0000000..e818a5a --- /dev/null +++ b/slang/tests/F_set_target_api_foo/set_target_api_foo.rs
@@ -0,0 +1,8 @@ +// -target-api foo +#pragma version(1) +#pragma rs java_package_name(foo) + +#if RS_VERSION != 12 +#error Invalid RS_VERSION +#endif +
diff --git a/slang/tests/F_set_target_api_foo/stderr.txt.expect b/slang/tests/F_set_target_api_foo/stderr.txt.expect new file mode 100644 index 0000000..1c56599 --- /dev/null +++ b/slang/tests/F_set_target_api_foo/stderr.txt.expect
@@ -0,0 +1 @@ +error: invalid integral value 'foo' in '-target-api foo'
diff --git a/slang/tests/F_set_target_api_foo/stdout.txt.expect b/slang/tests/F_set_target_api_foo/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_set_target_api_foo/stdout.txt.expect
diff --git a/slang/tests/F_struct_array_copy/stderr.txt.expect b/slang/tests/F_struct_array_copy/stderr.txt.expect new file mode 100644 index 0000000..48bc6d7 --- /dev/null +++ b/slang/tests/F_struct_array_copy/stderr.txt.expect
@@ -0,0 +1 @@ +struct_array_copy.rs:35:8: error: Arrays of RS object types within structures cannot be copied
diff --git a/slang/tests/F_struct_array_copy/stdout.txt.expect b/slang/tests/F_struct_array_copy/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_struct_array_copy/stdout.txt.expect
diff --git a/slang/tests/F_struct_array_copy/struct_array_copy.rs b/slang/tests/F_struct_array_copy/struct_array_copy.rs new file mode 100644 index 0000000..1b55100 --- /dev/null +++ b/slang/tests/F_struct_array_copy/struct_array_copy.rs
@@ -0,0 +1,37 @@ + +// Copyright (C) 2011 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma version(1) +#pragma rs java_package_name(foo) + +struct myStruct { + rs_allocation a; + int i; + rs_element e[100]; +}; + +struct myStruct mS; + +struct outerStruct { + struct myStruct inner; +}; + +void bar() { + struct myStruct localStruct; + + localStruct.i = 5; + mS = localStruct; +} +
diff --git a/slang/tests/F_struct_bitfield/stderr.txt.expect b/slang/tests/F_struct_bitfield/stderr.txt.expect new file mode 100644 index 0000000..d82e226 --- /dev/null +++ b/slang/tests/F_struct_bitfield/stderr.txt.expect
@@ -0,0 +1 @@ +struct_bitfield.rs:5:9: error: bit fields are not able to be exported: 's.x'
diff --git a/slang/tests/F_struct_bitfield/stdout.txt.expect b/slang/tests/F_struct_bitfield/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_struct_bitfield/stdout.txt.expect
diff --git a/slang/tests/F_struct_bitfield/struct_bitfield.rs b/slang/tests/F_struct_bitfield/struct_bitfield.rs new file mode 100644 index 0000000..95e3418 --- /dev/null +++ b/slang/tests/F_struct_bitfield/struct_bitfield.rs
@@ -0,0 +1,7 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +struct s { + int x:1; +} myStruct; +
diff --git a/slang/tests/F_struct_float3_array/stderr.txt.expect b/slang/tests/F_struct_float3_array/stderr.txt.expect new file mode 100644 index 0000000..1eac9bd --- /dev/null +++ b/slang/tests/F_struct_float3_array/stderr.txt.expect
@@ -0,0 +1 @@ +struct_float3_array.rs:4:8: error: arrays of width 3 vector types cannot be exported: 'float3_array'
diff --git a/slang/tests/F_struct_float3_array/stdout.txt.expect b/slang/tests/F_struct_float3_array/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_struct_float3_array/stdout.txt.expect
diff --git a/slang/tests/F_struct_float3_array/struct_float3_array.rs b/slang/tests/F_struct_float3_array/struct_float3_array.rs new file mode 100644 index 0000000..58d6d64 --- /dev/null +++ b/slang/tests/F_struct_float3_array/struct_float3_array.rs
@@ -0,0 +1,7 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +struct float3_array { + float3 f[2]; +} myStruct; +
diff --git a/slang/tests/F_struct_ptr/stderr.txt.expect b/slang/tests/F_struct_ptr/stderr.txt.expect new file mode 100644 index 0000000..a0bfee0 --- /dev/null +++ b/slang/tests/F_struct_ptr/stderr.txt.expect
@@ -0,0 +1 @@ +struct_ptr.rs:4:8: error: struct is not defined in this module
diff --git a/slang/tests/F_struct_ptr/stdout.txt.expect b/slang/tests/F_struct_ptr/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_struct_ptr/stdout.txt.expect
diff --git a/slang/tests/F_struct_ptr/struct_ptr.rs b/slang/tests/F_struct_ptr/struct_ptr.rs new file mode 100644 index 0000000..15eee65 --- /dev/null +++ b/slang/tests/F_struct_ptr/struct_ptr.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +struct s *myStruct; +
diff --git a/slang/tests/F_too_many_inputs/stderr.txt.expect b/slang/tests/F_too_many_inputs/stderr.txt.expect new file mode 100644 index 0000000..aec9fdc --- /dev/null +++ b/slang/tests/F_too_many_inputs/stderr.txt.expect
@@ -0,0 +1 @@ +too_many_inputs.rs:9:95: error: Invalid parameter 'in8' for compute kernel bad(). Kernels targeting SDK levels 23+ may not use more than 8 input parameters.
diff --git a/slang/tests/F_too_many_inputs/stdout.txt.expect b/slang/tests/F_too_many_inputs/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_too_many_inputs/stdout.txt.expect
diff --git a/slang/tests/F_too_many_inputs/too_many_inputs.rs b/slang/tests/F_too_many_inputs/too_many_inputs.rs new file mode 100644 index 0000000..248ee4f --- /dev/null +++ b/slang/tests/F_too_many_inputs/too_many_inputs.rs
@@ -0,0 +1,11 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL good(int in0, int in1, int in2, int in3, int in4, int in5, int in6, int in7) { + return 0; +} + +int RS_KERNEL bad(int in0, int in1, int in2, int in3, int in4, int in5, int in6, int in7, int in8) { + return 0; +}
diff --git a/slang/tests/F_union/stderr.txt.expect b/slang/tests/F_union/stderr.txt.expect new file mode 100644 index 0000000..2bf177d --- /dev/null +++ b/slang/tests/F_union/stderr.txt.expect
@@ -0,0 +1,3 @@ +union.rs:4:7: error: unions cannot be exported: 'u' +union.rs:9:14: error: unions containing RS object types are not allowed +union.rs:16:11: error: unions containing RS object types are not allowed
diff --git a/slang/tests/F_union/stdout.txt.expect b/slang/tests/F_union/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_union/stdout.txt.expect
diff --git a/slang/tests/F_union/union.rs b/slang/tests/F_union/union.rs new file mode 100644 index 0000000..a6fa48d --- /dev/null +++ b/slang/tests/F_union/union.rs
@@ -0,0 +1,21 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +union u { + int i; + float f; +} myUnion; + +static union u2 { + int i; + rs_element e; +} myUnion2; + + +void foo() { + union iu { + rs_element e; + int i; + } v; + (void) v; +}
diff --git a/slang/tests/F_unknown_function/stderr.txt.expect b/slang/tests/F_unknown_function/stderr.txt.expect new file mode 100644 index 0000000..c8329e3 --- /dev/null +++ b/slang/tests/F_unknown_function/stderr.txt.expect
@@ -0,0 +1 @@ +unknown_function.rs:6:5: error: implicit declaration of function 'bar' is invalid in C99
diff --git a/slang/tests/F_unknown_function/stdout.txt.expect b/slang/tests/F_unknown_function/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_unknown_function/stdout.txt.expect
diff --git a/slang/tests/F_unknown_function/unknown_function.rs b/slang/tests/F_unknown_function/unknown_function.rs new file mode 100644 index 0000000..8127993 --- /dev/null +++ b/slang/tests/F_unknown_function/unknown_function.rs
@@ -0,0 +1,8 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void foo() { + rs_allocation a; + bar(a); +} +
diff --git a/slang/tests/F_unknown_function/zzz.rs b/slang/tests/F_unknown_function/zzz.rs new file mode 100644 index 0000000..54929dc --- /dev/null +++ b/slang/tests/F_unknown_function/zzz.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int i; +
diff --git a/slang/tests/F_v15_non_root_kernel/stderr.txt.expect b/slang/tests/F_v15_non_root_kernel/stderr.txt.expect new file mode 100644 index 0000000..fe38dc8 --- /dev/null +++ b/slang/tests/F_v15_non_root_kernel/stderr.txt.expect
@@ -0,0 +1 @@ +v15_non_root_kernel.rs:5:6: error: Non-root compute kernel foo() is not supported in SDK levels 11-15
diff --git a/slang/tests/F_v15_non_root_kernel/stdout.txt.expect b/slang/tests/F_v15_non_root_kernel/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_v15_non_root_kernel/stdout.txt.expect
diff --git a/slang/tests/F_v15_non_root_kernel/v15_non_root_kernel.rs b/slang/tests/F_v15_non_root_kernel/v15_non_root_kernel.rs new file mode 100644 index 0000000..d8b903e --- /dev/null +++ b/slang/tests/F_v15_non_root_kernel/v15_non_root_kernel.rs
@@ -0,0 +1,6 @@ +// -target-api 15 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +void foo(const int *in) { +}
diff --git a/slang/tests/F_vector_cast/stderr.txt.expect b/slang/tests/F_vector_cast/stderr.txt.expect new file mode 100644 index 0000000..032948d --- /dev/null +++ b/slang/tests/F_vector_cast/stderr.txt.expect
@@ -0,0 +1,6 @@ +vector_cast.rs:8:11: error: cannot convert between vector values of different size ('float2' (vector of 2 'float' values) and 'int2' (vector of 2 'int' values)) +vector_cast.rs:15:11: error: cannot convert between vector values of different size ('int3' (vector of 3 'int' values) and 'float3' (vector of 3 'float' values)) +vector_cast.rs:7:9: error: invalid vector cast +vector_cast.rs:14:9: error: invalid vector cast +vector_cast.rs:21:9: error: invalid vector cast +vector_cast.rs:31:13: error: invalid vector cast
diff --git a/slang/tests/F_vector_cast/stdout.txt.expect b/slang/tests/F_vector_cast/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_vector_cast/stdout.txt.expect
diff --git a/slang/tests/F_vector_cast/vector_cast.rs b/slang/tests/F_vector_cast/vector_cast.rs new file mode 100644 index 0000000..fa49d97 --- /dev/null +++ b/slang/tests/F_vector_cast/vector_cast.rs
@@ -0,0 +1,33 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void i2f() { + int2 i; + float2 f; + f = (float2)i; + f = f * i; +} + +void f2i() { + int3 i; + float3 f; + i = (int3)f; + i = i * f; +} + +void c2uc() { + char4 c; + uchar4 u; + u = (uchar4) c; +} + +static uchar4 bar(uchar4 u) { + return u; +} + +void c2uc_bar() { + char4 c; + uchar4 u; + u = bar((uchar4) c); +} +
diff --git a/slang/tests/F_void_ptr/stderr.txt.expect b/slang/tests/F_void_ptr/stderr.txt.expect new file mode 100644 index 0000000..7958827 --- /dev/null +++ b/slang/tests/F_void_ptr/stderr.txt.expect
@@ -0,0 +1 @@ +void_ptr.rs:4:7: error: void pointers cannot be exported: 'v'
diff --git a/slang/tests/F_void_ptr/stdout.txt.expect b/slang/tests/F_void_ptr/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_void_ptr/stdout.txt.expect
diff --git a/slang/tests/F_void_ptr/void_ptr.rs b/slang/tests/F_void_ptr/void_ptr.rs new file mode 100644 index 0000000..1fc1737 --- /dev/null +++ b/slang/tests/F_void_ptr/void_ptr.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void *v; +void RS_KERNEL k(void) {}
diff --git a/slang/tests/F_warnings_as_error/deprecated.rs b/slang/tests/F_warnings_as_error/deprecated.rs new file mode 100644 index 0000000..b06f6af --- /dev/null +++ b/slang/tests/F_warnings_as_error/deprecated.rs
@@ -0,0 +1,15 @@ +// -Werror +#pragma version(1) +#pragma rs java_package_name(foo) + +char out; +rs_allocation al; + +static void func1() { + int a = func0(3); +} + +static int func2(char in) { + int t = 4; + //return func1(in + 3); +}
diff --git a/slang/tests/F_warnings_as_error/stderr.txt.expect b/slang/tests/F_warnings_as_error/stderr.txt.expect new file mode 100644 index 0000000..7af87a8 --- /dev/null +++ b/slang/tests/F_warnings_as_error/stderr.txt.expect
@@ -0,0 +1,4 @@ +deprecated.rs:9:11: error: implicit declaration of function 'func0' is invalid in C99 +deprecated.rs:9:11: note: did you mean 'func1'? +deprecated.rs:8:13: note: 'func1' declared here +deprecated.rs:15:1: error: control reaches end of non-void function
diff --git a/slang/tests/F_warnings_as_error/stdout.txt.expect b/slang/tests/F_warnings_as_error/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_warnings_as_error/stdout.txt.expect
diff --git a/slang/tests/F_z_wrong_api/stderr.txt.expect b/slang/tests/F_z_wrong_api/stderr.txt.expect new file mode 100644 index 0000000..89f2d18 --- /dev/null +++ b/slang/tests/F_z_wrong_api/stderr.txt.expect
@@ -0,0 +1 @@ +z_wrong_api.rs:5:60: error: compute kernel bad() targeting SDK levels 11-22 may not use special parameter 'z'.
diff --git a/slang/tests/F_z_wrong_api/stdout.txt.expect b/slang/tests/F_z_wrong_api/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/F_z_wrong_api/stdout.txt.expect
diff --git a/slang/tests/F_z_wrong_api/z_wrong_api.rs b/slang/tests/F_z_wrong_api/z_wrong_api.rs new file mode 100644 index 0000000..42b08a2 --- /dev/null +++ b/slang/tests/F_z_wrong_api/z_wrong_api.rs
@@ -0,0 +1,7 @@ +// -target-api 22 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL bad(int in, uint32_t x, uint32_t y, uint32_t z) { + return 0; +}
diff --git a/slang/tests/P_all_api_11/all11.rs b/slang/tests/P_all_api_11/all11.rs new file mode 100644 index 0000000..2c0dc0e --- /dev/null +++ b/slang/tests/P_all_api_11/all11.rs
@@ -0,0 +1,3296 @@ +// -target-api 11 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; + +void root(const int* in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fdim(*(float*)buf637, *(float*)buf638); + *(float2*)buf639 = fdim(*(float2*)buf640, *(float2*)buf641); + *(float3*)buf642 = fdim(*(float3*)buf643, *(float3*)buf644); + *(float4*)buf645 = fdim(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = floor(*(float*)buf649); + *(float2*)buf650 = floor(*(float2*)buf651); + *(float3*)buf652 = floor(*(float3*)buf653); + *(float4*)buf654 = floor(*(float4*)buf655); + *(float*)buf656 = fma(*(float*)buf657, *(float*)buf658, *(float*)buf659); + *(float2*)buf660 = fma(*(float2*)buf661, *(float2*)buf662, *(float2*)buf663); + *(float3*)buf664 = fma(*(float3*)buf665, *(float3*)buf666, *(float3*)buf667); + *(float4*)buf668 = fma(*(float4*)buf669, *(float4*)buf670, *(float4*)buf671); + *(float*)buf672 = fmax(*(float*)buf673, *(float*)buf674); + *(float2*)buf675 = fmax(*(float2*)buf676, *(float2*)buf677); + *(float3*)buf678 = fmax(*(float3*)buf679, *(float3*)buf680); + *(float4*)buf681 = fmax(*(float4*)buf682, *(float4*)buf683); + *(float2*)buf684 = fmax(*(float2*)buf685, *(float*)buf686); + *(float3*)buf687 = fmax(*(float3*)buf688, *(float*)buf689); + *(float4*)buf690 = fmax(*(float4*)buf691, *(float*)buf692); + *(float*)buf693 = fmin(*(float*)buf694, *(float*)buf695); + *(float2*)buf696 = fmin(*(float2*)buf697, *(float2*)buf698); + *(float3*)buf699 = fmin(*(float3*)buf700, *(float3*)buf701); + *(float4*)buf702 = fmin(*(float4*)buf703, *(float4*)buf704); + *(float2*)buf705 = fmin(*(float2*)buf706, *(float*)buf707); + *(float3*)buf708 = fmin(*(float3*)buf709, *(float*)buf710); + *(float4*)buf711 = fmin(*(float4*)buf712, *(float*)buf713); + *(float*)buf714 = fmod(*(float*)buf715, *(float*)buf716); + *(float2*)buf717 = fmod(*(float2*)buf718, *(float2*)buf719); + *(float3*)buf720 = fmod(*(float3*)buf721, *(float3*)buf722); + *(float4*)buf723 = fmod(*(float4*)buf724, *(float4*)buf725); + *(float*)buf726 = fract(*(float*)buf727, (float*) buf728); + *(float2*)buf729 = fract(*(float2*)buf730, (float2*) buf731); + *(float3*)buf732 = fract(*(float3*)buf733, (float3*) buf734); + *(float4*)buf735 = fract(*(float4*)buf736, (float4*) buf737); + *(float*)buf738 = fract(*(float*)buf739); + *(float2*)buf740 = fract(*(float2*)buf741); + *(float3*)buf742 = fract(*(float3*)buf743); + *(float4*)buf744 = fract(*(float4*)buf745); + *(float*)buf746 = frexp(*(float*)buf747, (int*) buf748); + *(float2*)buf749 = frexp(*(float2*)buf750, (int2*) buf751); + *(float3*)buf752 = frexp(*(float3*)buf753, (int3*) buf754); + *(float4*)buf755 = frexp(*(float4*)buf756, (int4*) buf757); + *(float*)buf758 = hypot(*(float*)buf759, *(float*)buf760); + *(float2*)buf761 = hypot(*(float2*)buf762, *(float2*)buf763); + *(float3*)buf764 = hypot(*(float3*)buf765, *(float3*)buf766); + *(float4*)buf767 = hypot(*(float4*)buf768, *(float4*)buf769); + *(int*)buf770 = ilogb(*(float*)buf771); + *(int2*)buf772 = ilogb(*(float2*)buf773); + *(int3*)buf774 = ilogb(*(float3*)buf775); + *(int4*)buf776 = ilogb(*(float4*)buf777); + *(float*)buf778 = ldexp(*(float*)buf779, *(int*)buf780); + *(float2*)buf781 = ldexp(*(float2*)buf782, *(int2*)buf783); + *(float3*)buf784 = ldexp(*(float3*)buf785, *(int3*)buf786); + *(float4*)buf787 = ldexp(*(float4*)buf788, *(int4*)buf789); + *(float2*)buf790 = ldexp(*(float2*)buf791, *(int*)buf792); + *(float3*)buf793 = ldexp(*(float3*)buf794, *(int*)buf795); + *(float4*)buf796 = ldexp(*(float4*)buf797, *(int*)buf798); + *(float*)buf799 = length(*(float*)buf800); + *(float*)buf801 = length(*(float2*)buf802); + *(float*)buf803 = length(*(float3*)buf804); + *(float*)buf805 = length(*(float4*)buf806); + *(float*)buf807 = lgamma(*(float*)buf808); + *(float2*)buf809 = lgamma(*(float2*)buf810); + *(float3*)buf811 = lgamma(*(float3*)buf812); + *(float4*)buf813 = lgamma(*(float4*)buf814); + *(float*)buf815 = lgamma(*(float*)buf816, (int*) buf817); + *(float2*)buf818 = lgamma(*(float2*)buf819, (int2*) buf820); + *(float3*)buf821 = lgamma(*(float3*)buf822, (int3*) buf823); + *(float4*)buf824 = lgamma(*(float4*)buf825, (int4*) buf826); + *(float*)buf827 = log(*(float*)buf828); + *(float2*)buf829 = log(*(float2*)buf830); + *(float3*)buf831 = log(*(float3*)buf832); + *(float4*)buf833 = log(*(float4*)buf834); + *(float*)buf835 = log10(*(float*)buf836); + *(float2*)buf837 = log10(*(float2*)buf838); + *(float3*)buf839 = log10(*(float3*)buf840); + *(float4*)buf841 = log10(*(float4*)buf842); + *(float*)buf843 = log1p(*(float*)buf844); + *(float2*)buf845 = log1p(*(float2*)buf846); + *(float3*)buf847 = log1p(*(float3*)buf848); + *(float4*)buf849 = log1p(*(float4*)buf850); + *(float*)buf851 = log2(*(float*)buf852); + *(float2*)buf853 = log2(*(float2*)buf854); + *(float3*)buf855 = log2(*(float3*)buf856); + *(float4*)buf857 = log2(*(float4*)buf858); + *(float*)buf859 = logb(*(float*)buf860); + *(float2*)buf861 = logb(*(float2*)buf862); + *(float3*)buf863 = logb(*(float3*)buf864); + *(float4*)buf865 = logb(*(float4*)buf866); + *(float*)buf867 = mad(*(float*)buf868, *(float*)buf869, *(float*)buf870); + *(float2*)buf871 = mad(*(float2*)buf872, *(float2*)buf873, *(float2*)buf874); + *(float3*)buf875 = mad(*(float3*)buf876, *(float3*)buf877, *(float3*)buf878); + *(float4*)buf879 = mad(*(float4*)buf880, *(float4*)buf881, *(float4*)buf882); + *(float*)buf883 = max(*(float*)buf884, *(float*)buf885); + *(float2*)buf886 = max(*(float2*)buf887, *(float2*)buf888); + *(float3*)buf889 = max(*(float3*)buf890, *(float3*)buf891); + *(float4*)buf892 = max(*(float4*)buf893, *(float4*)buf894); + *(float2*)buf895 = max(*(float2*)buf896, *(float*)buf897); + *(float3*)buf898 = max(*(float3*)buf899, *(float*)buf900); + *(float4*)buf901 = max(*(float4*)buf902, *(float*)buf903); + *(char*)buf904 = max(*(char*)buf905, *(char*)buf906); + *(uchar*)buf907 = max(*(uchar*)buf908, *(uchar*)buf909); + *(short*)buf910 = max(*(short*)buf911, *(short*)buf912); + *(ushort*)buf913 = max(*(ushort*)buf914, *(ushort*)buf915); + *(int*)buf916 = max(*(int*)buf917, *(int*)buf918); + *(uint*)buf919 = max(*(uint*)buf920, *(uint*)buf921); + *(char2*)buf922 = max(*(char2*)buf923, *(char2*)buf924); + *(uchar2*)buf925 = max(*(uchar2*)buf926, *(uchar2*)buf927); + *(short2*)buf928 = max(*(short2*)buf929, *(short2*)buf930); + *(ushort2*)buf931 = max(*(ushort2*)buf932, *(ushort2*)buf933); + *(int2*)buf934 = max(*(int2*)buf935, *(int2*)buf936); + *(uint2*)buf937 = max(*(uint2*)buf938, *(uint2*)buf939); + *(char3*)buf940 = max(*(char3*)buf941, *(char3*)buf942); + *(uchar3*)buf943 = max(*(uchar3*)buf944, *(uchar3*)buf945); + *(short3*)buf946 = max(*(short3*)buf947, *(short3*)buf948); + *(ushort3*)buf949 = max(*(ushort3*)buf950, *(ushort3*)buf951); + *(int3*)buf952 = max(*(int3*)buf953, *(int3*)buf954); + *(uint3*)buf955 = max(*(uint3*)buf956, *(uint3*)buf957); + *(char4*)buf958 = max(*(char4*)buf959, *(char4*)buf960); + *(uchar4*)buf961 = max(*(uchar4*)buf962, *(uchar4*)buf963); + *(short4*)buf964 = max(*(short4*)buf965, *(short4*)buf966); + *(ushort4*)buf967 = max(*(ushort4*)buf968, *(ushort4*)buf969); + *(int4*)buf970 = max(*(int4*)buf971, *(int4*)buf972); + *(uint4*)buf973 = max(*(uint4*)buf974, *(uint4*)buf975); + *(float*)buf976 = min(*(float*)buf977, *(float*)buf978); + *(float2*)buf979 = min(*(float2*)buf980, *(float2*)buf981); + *(float3*)buf982 = min(*(float3*)buf983, *(float3*)buf984); + *(float4*)buf985 = min(*(float4*)buf986, *(float4*)buf987); + *(float2*)buf988 = min(*(float2*)buf989, *(float*)buf990); + *(float3*)buf991 = min(*(float3*)buf992, *(float*)buf993); + *(float4*)buf994 = min(*(float4*)buf995, *(float*)buf996); + *(char*)buf997 = min(*(char*)buf998, *(char*)buf999); + *(uchar*)buf1000 = min(*(uchar*)buf1001, *(uchar*)buf1002); + *(short*)buf1003 = min(*(short*)buf1004, *(short*)buf1005); + *(ushort*)buf1006 = min(*(ushort*)buf1007, *(ushort*)buf1008); + *(int*)buf1009 = min(*(int*)buf1010, *(int*)buf1011); + *(uint*)buf1012 = min(*(uint*)buf1013, *(uint*)buf1014); + *(char2*)buf1015 = min(*(char2*)buf1016, *(char2*)buf1017); + *(uchar2*)buf1018 = min(*(uchar2*)buf1019, *(uchar2*)buf1020); + *(short2*)buf1021 = min(*(short2*)buf1022, *(short2*)buf1023); + *(ushort2*)buf1024 = min(*(ushort2*)buf1025, *(ushort2*)buf1026); + *(int2*)buf1027 = min(*(int2*)buf1028, *(int2*)buf1029); + *(uint2*)buf1030 = min(*(uint2*)buf1031, *(uint2*)buf1032); + *(char3*)buf1033 = min(*(char3*)buf1034, *(char3*)buf1035); + *(uchar3*)buf1036 = min(*(uchar3*)buf1037, *(uchar3*)buf1038); + *(short3*)buf1039 = min(*(short3*)buf1040, *(short3*)buf1041); + *(ushort3*)buf1042 = min(*(ushort3*)buf1043, *(ushort3*)buf1044); + *(int3*)buf1045 = min(*(int3*)buf1046, *(int3*)buf1047); + *(uint3*)buf1048 = min(*(uint3*)buf1049, *(uint3*)buf1050); + *(char4*)buf1051 = min(*(char4*)buf1052, *(char4*)buf1053); + *(uchar4*)buf1054 = min(*(uchar4*)buf1055, *(uchar4*)buf1056); + *(short4*)buf1057 = min(*(short4*)buf1058, *(short4*)buf1059); + *(ushort4*)buf1060 = min(*(ushort4*)buf1061, *(ushort4*)buf1062); + *(int4*)buf1063 = min(*(int4*)buf1064, *(int4*)buf1065); + *(uint4*)buf1066 = min(*(uint4*)buf1067, *(uint4*)buf1068); + *(float*)buf1069 = mix(*(float*)buf1070, *(float*)buf1071, *(float*)buf1072); + *(float2*)buf1073 = mix(*(float2*)buf1074, *(float2*)buf1075, *(float2*)buf1076); + *(float3*)buf1077 = mix(*(float3*)buf1078, *(float3*)buf1079, *(float3*)buf1080); + *(float4*)buf1081 = mix(*(float4*)buf1082, *(float4*)buf1083, *(float4*)buf1084); + *(float2*)buf1085 = mix(*(float2*)buf1086, *(float2*)buf1087, *(float*)buf1088); + *(float3*)buf1089 = mix(*(float3*)buf1090, *(float3*)buf1091, *(float*)buf1092); + *(float4*)buf1093 = mix(*(float4*)buf1094, *(float4*)buf1095, *(float*)buf1096); + *(float*)buf1097 = modf(*(float*)buf1098, (float*) buf1099); + *(float2*)buf1100 = modf(*(float2*)buf1101, (float2*) buf1102); + *(float3*)buf1103 = modf(*(float3*)buf1104, (float3*) buf1105); + *(float4*)buf1106 = modf(*(float4*)buf1107, (float4*) buf1108); + *(float*)buf1109 = nan(*(uint*)buf1110); + *(float*)buf1111 = nextafter(*(float*)buf1112, *(float*)buf1113); + *(float2*)buf1114 = nextafter(*(float2*)buf1115, *(float2*)buf1116); + *(float3*)buf1117 = nextafter(*(float3*)buf1118, *(float3*)buf1119); + *(float4*)buf1120 = nextafter(*(float4*)buf1121, *(float4*)buf1122); + *(float*)buf1123 = normalize(*(float*)buf1124); + *(float2*)buf1125 = normalize(*(float2*)buf1126); + *(float3*)buf1127 = normalize(*(float3*)buf1128); + *(float4*)buf1129 = normalize(*(float4*)buf1130); + *(float*)buf1131 = pow(*(float*)buf1132, *(float*)buf1133); + *(float2*)buf1134 = pow(*(float2*)buf1135, *(float2*)buf1136); + *(float3*)buf1137 = pow(*(float3*)buf1138, *(float3*)buf1139); + *(float4*)buf1140 = pow(*(float4*)buf1141, *(float4*)buf1142); + *(float*)buf1143 = pown(*(float*)buf1144, *(int*)buf1145); + *(float2*)buf1146 = pown(*(float2*)buf1147, *(int2*)buf1148); + *(float3*)buf1149 = pown(*(float3*)buf1150, *(int3*)buf1151); + *(float4*)buf1152 = pown(*(float4*)buf1153, *(int4*)buf1154); + *(float*)buf1155 = powr(*(float*)buf1156, *(float*)buf1157); + *(float2*)buf1158 = powr(*(float2*)buf1159, *(float2*)buf1160); + *(float3*)buf1161 = powr(*(float3*)buf1162, *(float3*)buf1163); + *(float4*)buf1164 = powr(*(float4*)buf1165, *(float4*)buf1166); + *(float*)buf1167 = radians(*(float*)buf1168); + *(float2*)buf1169 = radians(*(float2*)buf1170); + *(float3*)buf1171 = radians(*(float3*)buf1172); + *(float4*)buf1173 = radians(*(float4*)buf1174); + *(float*)buf1175 = remainder(*(float*)buf1176, *(float*)buf1177); + *(float2*)buf1178 = remainder(*(float2*)buf1179, *(float2*)buf1180); + *(float3*)buf1181 = remainder(*(float3*)buf1182, *(float3*)buf1183); + *(float4*)buf1184 = remainder(*(float4*)buf1185, *(float4*)buf1186); + *(float*)buf1187 = remquo(*(float*)buf1188, *(float*)buf1189, (int*) buf1190); + *(float2*)buf1191 = remquo(*(float2*)buf1192, *(float2*)buf1193, (int2*) buf1194); + *(float3*)buf1195 = remquo(*(float3*)buf1196, *(float3*)buf1197, (int3*) buf1198); + *(float4*)buf1199 = remquo(*(float4*)buf1200, *(float4*)buf1201, (int4*) buf1202); + *(float*)buf1203 = rint(*(float*)buf1204); + *(float2*)buf1205 = rint(*(float2*)buf1206); + *(float3*)buf1207 = rint(*(float3*)buf1208); + *(float4*)buf1209 = rint(*(float4*)buf1210); + *(float*)buf1211 = rootn(*(float*)buf1212, *(int*)buf1213); + *(float2*)buf1214 = rootn(*(float2*)buf1215, *(int2*)buf1216); + *(float3*)buf1217 = rootn(*(float3*)buf1218, *(int3*)buf1219); + *(float4*)buf1220 = rootn(*(float4*)buf1221, *(int4*)buf1222); + *(float*)buf1223 = round(*(float*)buf1224); + *(float2*)buf1225 = round(*(float2*)buf1226); + *(float3*)buf1227 = round(*(float3*)buf1228); + *(float4*)buf1229 = round(*(float4*)buf1230); + *(uint32_t*)buf1231 = rsAllocationGetDimFaces(*(rs_allocation*)buf1232); + *(uint32_t*)buf1233 = rsAllocationGetDimLOD(*(rs_allocation*)buf1234); + *(uint32_t*)buf1235 = rsAllocationGetDimX(*(rs_allocation*)buf1236); + *(uint32_t*)buf1237 = rsAllocationGetDimY(*(rs_allocation*)buf1238); + *(uint32_t*)buf1239 = rsAllocationGetDimZ(*(rs_allocation*)buf1240); + *(rs_element*)buf1241 = rsAllocationGetElement(*(rs_allocation*)buf1242); + *(char*)buf1243 = rsClamp(*(char*)buf1244, *(char*)buf1245, *(char*)buf1246); + *(uchar*)buf1247 = rsClamp(*(uchar*)buf1248, *(uchar*)buf1249, *(uchar*)buf1250); + *(short*)buf1251 = rsClamp(*(short*)buf1252, *(short*)buf1253, *(short*)buf1254); + *(ushort*)buf1255 = rsClamp(*(ushort*)buf1256, *(ushort*)buf1257, *(ushort*)buf1258); + *(int*)buf1259 = rsClamp(*(int*)buf1260, *(int*)buf1261, *(int*)buf1262); + *(uint*)buf1263 = rsClamp(*(uint*)buf1264, *(uint*)buf1265, *(uint*)buf1266); + rsClearObject((rs_element*) buf1267); + rsClearObject((rs_type*) buf1268); + rsClearObject((rs_allocation*) buf1269); + rsClearObject((rs_sampler*) buf1270); + rsClearObject((rs_script*) buf1271); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1272); + rsClearObject((rs_program_fragment*) buf1273); + rsClearObject((rs_program_vertex*) buf1274); + rsClearObject((rs_program_raster*) buf1275); + rsClearObject((rs_program_store*) buf1276); + rsClearObject((rs_font*) buf1277); +#endif + rsDebug((const char*) buf1278, *(double*)buf1279); + rsDebug((const char*) buf1280, *(int*)buf1281); + rsDebug((const char*) buf1282, *(uint*)buf1283); + rsDebug((const char*) buf1284, *(long*)buf1285); + rsDebug((const char*) buf1286, *(ulong*)buf1287); + rsDebug((const char*) buf1288, *(float*)buf1289); + rsDebug((const char*) buf1290, *(float2*)buf1291); + rsDebug((const char*) buf1292, *(float3*)buf1293); + rsDebug((const char*) buf1294, *(float4*)buf1295); + rsDebug((const char*) buf1296, *(float*)buf1297, *(float*)buf1298); + rsDebug((const char*) buf1299, *(float*)buf1300, *(float*)buf1301, *(float*)buf1302); + rsDebug((const char*) buf1303, *(float*)buf1304, *(float*)buf1305, *(float*)buf1306, *(float*)buf1307); + rsDebug((const char*) buf1308, *(long long*)buf1309); + rsDebug((const char*) buf1310, *(unsigned long long*)buf1311); + rsDebug((const char*) buf1312, (const void*) buf1313); + rsDebug((const char*) buf1314, (const rs_matrix4x4*) buf1315); + rsDebug((const char*) buf1316, (const rs_matrix3x3*) buf1317); + rsDebug((const char*) buf1318, (const rs_matrix2x2*) buf1319); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1320, (float4*) buf1321, (float4*) buf1322, (float4*) buf1323, (float4*) buf1324, (float4*) buf1325, (float4*) buf1326); + rsForEach(*(rs_script*)buf1327, *(rs_allocation*)buf1328, *(rs_allocation*)buf1329, (const void*) buf1330, (const rs_script_call_t*) buf1331); + rsForEach(*(rs_script*)buf1332, *(rs_allocation*)buf1333, *(rs_allocation*)buf1334, (const void*) buf1335); + *(float*)buf1336 = rsFrac(*(float*)buf1337); + *(rs_allocation*)buf1338 = rsGetAllocation((const void*) buf1339); + *(float*)buf1340 = rsGetDt(); + *(const void**)buf1341 = rsGetElementAt(*(rs_allocation*)buf1342, *(uint32_t*)buf1343); + *(const void**)buf1344 = rsGetElementAt(*(rs_allocation*)buf1345, *(uint32_t*)buf1346, *(uint32_t*)buf1347); + *(const void**)buf1348 = rsGetElementAt(*(rs_allocation*)buf1349, *(uint32_t*)buf1350, *(uint32_t*)buf1351, *(uint32_t*)buf1352); + *(float*)buf1353 = rsGetElementAt_float(*(rs_allocation*)buf1354, *(uint32_t*)buf1355); + *(float2*)buf1356 = rsGetElementAt_float2(*(rs_allocation*)buf1357, *(uint32_t*)buf1358); + *(float3*)buf1359 = rsGetElementAt_float3(*(rs_allocation*)buf1360, *(uint32_t*)buf1361); + *(float4*)buf1362 = rsGetElementAt_float4(*(rs_allocation*)buf1363, *(uint32_t*)buf1364); + *(double*)buf1365 = rsGetElementAt_double(*(rs_allocation*)buf1366, *(uint32_t*)buf1367); + *(double2*)buf1368 = rsGetElementAt_double2(*(rs_allocation*)buf1369, *(uint32_t*)buf1370); + *(double3*)buf1371 = rsGetElementAt_double3(*(rs_allocation*)buf1372, *(uint32_t*)buf1373); + *(double4*)buf1374 = rsGetElementAt_double4(*(rs_allocation*)buf1375, *(uint32_t*)buf1376); + *(char*)buf1377 = rsGetElementAt_char(*(rs_allocation*)buf1378, *(uint32_t*)buf1379); + *(char2*)buf1380 = rsGetElementAt_char2(*(rs_allocation*)buf1381, *(uint32_t*)buf1382); + *(char3*)buf1383 = rsGetElementAt_char3(*(rs_allocation*)buf1384, *(uint32_t*)buf1385); + *(char4*)buf1386 = rsGetElementAt_char4(*(rs_allocation*)buf1387, *(uint32_t*)buf1388); + *(uchar*)buf1389 = rsGetElementAt_uchar(*(rs_allocation*)buf1390, *(uint32_t*)buf1391); + *(uchar2*)buf1392 = rsGetElementAt_uchar2(*(rs_allocation*)buf1393, *(uint32_t*)buf1394); + *(uchar3*)buf1395 = rsGetElementAt_uchar3(*(rs_allocation*)buf1396, *(uint32_t*)buf1397); + *(uchar4*)buf1398 = rsGetElementAt_uchar4(*(rs_allocation*)buf1399, *(uint32_t*)buf1400); + *(short*)buf1401 = rsGetElementAt_short(*(rs_allocation*)buf1402, *(uint32_t*)buf1403); + *(short2*)buf1404 = rsGetElementAt_short2(*(rs_allocation*)buf1405, *(uint32_t*)buf1406); + *(short3*)buf1407 = rsGetElementAt_short3(*(rs_allocation*)buf1408, *(uint32_t*)buf1409); + *(short4*)buf1410 = rsGetElementAt_short4(*(rs_allocation*)buf1411, *(uint32_t*)buf1412); + *(ushort*)buf1413 = rsGetElementAt_ushort(*(rs_allocation*)buf1414, *(uint32_t*)buf1415); + *(ushort2*)buf1416 = rsGetElementAt_ushort2(*(rs_allocation*)buf1417, *(uint32_t*)buf1418); + *(ushort3*)buf1419 = rsGetElementAt_ushort3(*(rs_allocation*)buf1420, *(uint32_t*)buf1421); + *(ushort4*)buf1422 = rsGetElementAt_ushort4(*(rs_allocation*)buf1423, *(uint32_t*)buf1424); + *(int*)buf1425 = rsGetElementAt_int(*(rs_allocation*)buf1426, *(uint32_t*)buf1427); + *(int2*)buf1428 = rsGetElementAt_int2(*(rs_allocation*)buf1429, *(uint32_t*)buf1430); + *(int3*)buf1431 = rsGetElementAt_int3(*(rs_allocation*)buf1432, *(uint32_t*)buf1433); + *(int4*)buf1434 = rsGetElementAt_int4(*(rs_allocation*)buf1435, *(uint32_t*)buf1436); + *(uint*)buf1437 = rsGetElementAt_uint(*(rs_allocation*)buf1438, *(uint32_t*)buf1439); + *(uint2*)buf1440 = rsGetElementAt_uint2(*(rs_allocation*)buf1441, *(uint32_t*)buf1442); + *(uint3*)buf1443 = rsGetElementAt_uint3(*(rs_allocation*)buf1444, *(uint32_t*)buf1445); + *(uint4*)buf1446 = rsGetElementAt_uint4(*(rs_allocation*)buf1447, *(uint32_t*)buf1448); + *(long*)buf1449 = rsGetElementAt_long(*(rs_allocation*)buf1450, *(uint32_t*)buf1451); + *(long2*)buf1452 = rsGetElementAt_long2(*(rs_allocation*)buf1453, *(uint32_t*)buf1454); + *(long3*)buf1455 = rsGetElementAt_long3(*(rs_allocation*)buf1456, *(uint32_t*)buf1457); + *(long4*)buf1458 = rsGetElementAt_long4(*(rs_allocation*)buf1459, *(uint32_t*)buf1460); + *(ulong*)buf1461 = rsGetElementAt_ulong(*(rs_allocation*)buf1462, *(uint32_t*)buf1463); + *(ulong2*)buf1464 = rsGetElementAt_ulong2(*(rs_allocation*)buf1465, *(uint32_t*)buf1466); + *(ulong3*)buf1467 = rsGetElementAt_ulong3(*(rs_allocation*)buf1468, *(uint32_t*)buf1469); + *(ulong4*)buf1470 = rsGetElementAt_ulong4(*(rs_allocation*)buf1471, *(uint32_t*)buf1472); + *(float*)buf1473 = rsGetElementAt_float(*(rs_allocation*)buf1474, *(uint32_t*)buf1475, *(uint32_t*)buf1476); + *(float2*)buf1477 = rsGetElementAt_float2(*(rs_allocation*)buf1478, *(uint32_t*)buf1479, *(uint32_t*)buf1480); + *(float3*)buf1481 = rsGetElementAt_float3(*(rs_allocation*)buf1482, *(uint32_t*)buf1483, *(uint32_t*)buf1484); + *(float4*)buf1485 = rsGetElementAt_float4(*(rs_allocation*)buf1486, *(uint32_t*)buf1487, *(uint32_t*)buf1488); + *(double*)buf1489 = rsGetElementAt_double(*(rs_allocation*)buf1490, *(uint32_t*)buf1491, *(uint32_t*)buf1492); + *(double2*)buf1493 = rsGetElementAt_double2(*(rs_allocation*)buf1494, *(uint32_t*)buf1495, *(uint32_t*)buf1496); + *(double3*)buf1497 = rsGetElementAt_double3(*(rs_allocation*)buf1498, *(uint32_t*)buf1499, *(uint32_t*)buf1500); + *(double4*)buf1501 = rsGetElementAt_double4(*(rs_allocation*)buf1502, *(uint32_t*)buf1503, *(uint32_t*)buf1504); + *(char*)buf1505 = rsGetElementAt_char(*(rs_allocation*)buf1506, *(uint32_t*)buf1507, *(uint32_t*)buf1508); + *(char2*)buf1509 = rsGetElementAt_char2(*(rs_allocation*)buf1510, *(uint32_t*)buf1511, *(uint32_t*)buf1512); + *(char3*)buf1513 = rsGetElementAt_char3(*(rs_allocation*)buf1514, *(uint32_t*)buf1515, *(uint32_t*)buf1516); + *(char4*)buf1517 = rsGetElementAt_char4(*(rs_allocation*)buf1518, *(uint32_t*)buf1519, *(uint32_t*)buf1520); + *(uchar*)buf1521 = rsGetElementAt_uchar(*(rs_allocation*)buf1522, *(uint32_t*)buf1523, *(uint32_t*)buf1524); + *(uchar2*)buf1525 = rsGetElementAt_uchar2(*(rs_allocation*)buf1526, *(uint32_t*)buf1527, *(uint32_t*)buf1528); + *(uchar3*)buf1529 = rsGetElementAt_uchar3(*(rs_allocation*)buf1530, *(uint32_t*)buf1531, *(uint32_t*)buf1532); + *(uchar4*)buf1533 = rsGetElementAt_uchar4(*(rs_allocation*)buf1534, *(uint32_t*)buf1535, *(uint32_t*)buf1536); + *(short*)buf1537 = rsGetElementAt_short(*(rs_allocation*)buf1538, *(uint32_t*)buf1539, *(uint32_t*)buf1540); + *(short2*)buf1541 = rsGetElementAt_short2(*(rs_allocation*)buf1542, *(uint32_t*)buf1543, *(uint32_t*)buf1544); + *(short3*)buf1545 = rsGetElementAt_short3(*(rs_allocation*)buf1546, *(uint32_t*)buf1547, *(uint32_t*)buf1548); + *(short4*)buf1549 = rsGetElementAt_short4(*(rs_allocation*)buf1550, *(uint32_t*)buf1551, *(uint32_t*)buf1552); + *(ushort*)buf1553 = rsGetElementAt_ushort(*(rs_allocation*)buf1554, *(uint32_t*)buf1555, *(uint32_t*)buf1556); + *(ushort2*)buf1557 = rsGetElementAt_ushort2(*(rs_allocation*)buf1558, *(uint32_t*)buf1559, *(uint32_t*)buf1560); + *(ushort3*)buf1561 = rsGetElementAt_ushort3(*(rs_allocation*)buf1562, *(uint32_t*)buf1563, *(uint32_t*)buf1564); + *(ushort4*)buf1565 = rsGetElementAt_ushort4(*(rs_allocation*)buf1566, *(uint32_t*)buf1567, *(uint32_t*)buf1568); + *(int*)buf1569 = rsGetElementAt_int(*(rs_allocation*)buf1570, *(uint32_t*)buf1571, *(uint32_t*)buf1572); + *(int2*)buf1573 = rsGetElementAt_int2(*(rs_allocation*)buf1574, *(uint32_t*)buf1575, *(uint32_t*)buf1576); + *(int3*)buf1577 = rsGetElementAt_int3(*(rs_allocation*)buf1578, *(uint32_t*)buf1579, *(uint32_t*)buf1580); + *(int4*)buf1581 = rsGetElementAt_int4(*(rs_allocation*)buf1582, *(uint32_t*)buf1583, *(uint32_t*)buf1584); + *(uint*)buf1585 = rsGetElementAt_uint(*(rs_allocation*)buf1586, *(uint32_t*)buf1587, *(uint32_t*)buf1588); + *(uint2*)buf1589 = rsGetElementAt_uint2(*(rs_allocation*)buf1590, *(uint32_t*)buf1591, *(uint32_t*)buf1592); + *(uint3*)buf1593 = rsGetElementAt_uint3(*(rs_allocation*)buf1594, *(uint32_t*)buf1595, *(uint32_t*)buf1596); + *(uint4*)buf1597 = rsGetElementAt_uint4(*(rs_allocation*)buf1598, *(uint32_t*)buf1599, *(uint32_t*)buf1600); + *(long*)buf1601 = rsGetElementAt_long(*(rs_allocation*)buf1602, *(uint32_t*)buf1603, *(uint32_t*)buf1604); + *(long2*)buf1605 = rsGetElementAt_long2(*(rs_allocation*)buf1606, *(uint32_t*)buf1607, *(uint32_t*)buf1608); + *(long3*)buf1609 = rsGetElementAt_long3(*(rs_allocation*)buf1610, *(uint32_t*)buf1611, *(uint32_t*)buf1612); + *(long4*)buf1613 = rsGetElementAt_long4(*(rs_allocation*)buf1614, *(uint32_t*)buf1615, *(uint32_t*)buf1616); + *(ulong*)buf1617 = rsGetElementAt_ulong(*(rs_allocation*)buf1618, *(uint32_t*)buf1619, *(uint32_t*)buf1620); + *(ulong2*)buf1621 = rsGetElementAt_ulong2(*(rs_allocation*)buf1622, *(uint32_t*)buf1623, *(uint32_t*)buf1624); + *(ulong3*)buf1625 = rsGetElementAt_ulong3(*(rs_allocation*)buf1626, *(uint32_t*)buf1627, *(uint32_t*)buf1628); + *(ulong4*)buf1629 = rsGetElementAt_ulong4(*(rs_allocation*)buf1630, *(uint32_t*)buf1631, *(uint32_t*)buf1632); + *(float*)buf1633 = rsGetElementAt_float(*(rs_allocation*)buf1634, *(uint32_t*)buf1635, *(uint32_t*)buf1636, *(uint32_t*)buf1637); + *(float2*)buf1638 = rsGetElementAt_float2(*(rs_allocation*)buf1639, *(uint32_t*)buf1640, *(uint32_t*)buf1641, *(uint32_t*)buf1642); + *(float3*)buf1643 = rsGetElementAt_float3(*(rs_allocation*)buf1644, *(uint32_t*)buf1645, *(uint32_t*)buf1646, *(uint32_t*)buf1647); + *(float4*)buf1648 = rsGetElementAt_float4(*(rs_allocation*)buf1649, *(uint32_t*)buf1650, *(uint32_t*)buf1651, *(uint32_t*)buf1652); + *(double*)buf1653 = rsGetElementAt_double(*(rs_allocation*)buf1654, *(uint32_t*)buf1655, *(uint32_t*)buf1656, *(uint32_t*)buf1657); + *(double2*)buf1658 = rsGetElementAt_double2(*(rs_allocation*)buf1659, *(uint32_t*)buf1660, *(uint32_t*)buf1661, *(uint32_t*)buf1662); + *(double3*)buf1663 = rsGetElementAt_double3(*(rs_allocation*)buf1664, *(uint32_t*)buf1665, *(uint32_t*)buf1666, *(uint32_t*)buf1667); + *(double4*)buf1668 = rsGetElementAt_double4(*(rs_allocation*)buf1669, *(uint32_t*)buf1670, *(uint32_t*)buf1671, *(uint32_t*)buf1672); + *(char*)buf1673 = rsGetElementAt_char(*(rs_allocation*)buf1674, *(uint32_t*)buf1675, *(uint32_t*)buf1676, *(uint32_t*)buf1677); + *(char2*)buf1678 = rsGetElementAt_char2(*(rs_allocation*)buf1679, *(uint32_t*)buf1680, *(uint32_t*)buf1681, *(uint32_t*)buf1682); + *(char3*)buf1683 = rsGetElementAt_char3(*(rs_allocation*)buf1684, *(uint32_t*)buf1685, *(uint32_t*)buf1686, *(uint32_t*)buf1687); + *(char4*)buf1688 = rsGetElementAt_char4(*(rs_allocation*)buf1689, *(uint32_t*)buf1690, *(uint32_t*)buf1691, *(uint32_t*)buf1692); + *(uchar*)buf1693 = rsGetElementAt_uchar(*(rs_allocation*)buf1694, *(uint32_t*)buf1695, *(uint32_t*)buf1696, *(uint32_t*)buf1697); + *(uchar2*)buf1698 = rsGetElementAt_uchar2(*(rs_allocation*)buf1699, *(uint32_t*)buf1700, *(uint32_t*)buf1701, *(uint32_t*)buf1702); + *(uchar3*)buf1703 = rsGetElementAt_uchar3(*(rs_allocation*)buf1704, *(uint32_t*)buf1705, *(uint32_t*)buf1706, *(uint32_t*)buf1707); + *(uchar4*)buf1708 = rsGetElementAt_uchar4(*(rs_allocation*)buf1709, *(uint32_t*)buf1710, *(uint32_t*)buf1711, *(uint32_t*)buf1712); + *(short*)buf1713 = rsGetElementAt_short(*(rs_allocation*)buf1714, *(uint32_t*)buf1715, *(uint32_t*)buf1716, *(uint32_t*)buf1717); + *(short2*)buf1718 = rsGetElementAt_short2(*(rs_allocation*)buf1719, *(uint32_t*)buf1720, *(uint32_t*)buf1721, *(uint32_t*)buf1722); + *(short3*)buf1723 = rsGetElementAt_short3(*(rs_allocation*)buf1724, *(uint32_t*)buf1725, *(uint32_t*)buf1726, *(uint32_t*)buf1727); + *(short4*)buf1728 = rsGetElementAt_short4(*(rs_allocation*)buf1729, *(uint32_t*)buf1730, *(uint32_t*)buf1731, *(uint32_t*)buf1732); + *(ushort*)buf1733 = rsGetElementAt_ushort(*(rs_allocation*)buf1734, *(uint32_t*)buf1735, *(uint32_t*)buf1736, *(uint32_t*)buf1737); + *(ushort2*)buf1738 = rsGetElementAt_ushort2(*(rs_allocation*)buf1739, *(uint32_t*)buf1740, *(uint32_t*)buf1741, *(uint32_t*)buf1742); + *(ushort3*)buf1743 = rsGetElementAt_ushort3(*(rs_allocation*)buf1744, *(uint32_t*)buf1745, *(uint32_t*)buf1746, *(uint32_t*)buf1747); + *(ushort4*)buf1748 = rsGetElementAt_ushort4(*(rs_allocation*)buf1749, *(uint32_t*)buf1750, *(uint32_t*)buf1751, *(uint32_t*)buf1752); + *(int*)buf1753 = rsGetElementAt_int(*(rs_allocation*)buf1754, *(uint32_t*)buf1755, *(uint32_t*)buf1756, *(uint32_t*)buf1757); + *(int2*)buf1758 = rsGetElementAt_int2(*(rs_allocation*)buf1759, *(uint32_t*)buf1760, *(uint32_t*)buf1761, *(uint32_t*)buf1762); + *(int3*)buf1763 = rsGetElementAt_int3(*(rs_allocation*)buf1764, *(uint32_t*)buf1765, *(uint32_t*)buf1766, *(uint32_t*)buf1767); + *(int4*)buf1768 = rsGetElementAt_int4(*(rs_allocation*)buf1769, *(uint32_t*)buf1770, *(uint32_t*)buf1771, *(uint32_t*)buf1772); + *(uint*)buf1773 = rsGetElementAt_uint(*(rs_allocation*)buf1774, *(uint32_t*)buf1775, *(uint32_t*)buf1776, *(uint32_t*)buf1777); + *(uint2*)buf1778 = rsGetElementAt_uint2(*(rs_allocation*)buf1779, *(uint32_t*)buf1780, *(uint32_t*)buf1781, *(uint32_t*)buf1782); + *(uint3*)buf1783 = rsGetElementAt_uint3(*(rs_allocation*)buf1784, *(uint32_t*)buf1785, *(uint32_t*)buf1786, *(uint32_t*)buf1787); + *(uint4*)buf1788 = rsGetElementAt_uint4(*(rs_allocation*)buf1789, *(uint32_t*)buf1790, *(uint32_t*)buf1791, *(uint32_t*)buf1792); + *(long*)buf1793 = rsGetElementAt_long(*(rs_allocation*)buf1794, *(uint32_t*)buf1795, *(uint32_t*)buf1796, *(uint32_t*)buf1797); + *(long2*)buf1798 = rsGetElementAt_long2(*(rs_allocation*)buf1799, *(uint32_t*)buf1800, *(uint32_t*)buf1801, *(uint32_t*)buf1802); + *(long3*)buf1803 = rsGetElementAt_long3(*(rs_allocation*)buf1804, *(uint32_t*)buf1805, *(uint32_t*)buf1806, *(uint32_t*)buf1807); + *(long4*)buf1808 = rsGetElementAt_long4(*(rs_allocation*)buf1809, *(uint32_t*)buf1810, *(uint32_t*)buf1811, *(uint32_t*)buf1812); + *(ulong*)buf1813 = rsGetElementAt_ulong(*(rs_allocation*)buf1814, *(uint32_t*)buf1815, *(uint32_t*)buf1816, *(uint32_t*)buf1817); + *(ulong2*)buf1818 = rsGetElementAt_ulong2(*(rs_allocation*)buf1819, *(uint32_t*)buf1820, *(uint32_t*)buf1821, *(uint32_t*)buf1822); + *(ulong3*)buf1823 = rsGetElementAt_ulong3(*(rs_allocation*)buf1824, *(uint32_t*)buf1825, *(uint32_t*)buf1826, *(uint32_t*)buf1827); + *(ulong4*)buf1828 = rsGetElementAt_ulong4(*(rs_allocation*)buf1829, *(uint32_t*)buf1830, *(uint32_t*)buf1831, *(uint32_t*)buf1832); + *(bool*)buf1833 = rsIsObject(*(rs_element*)buf1834); + *(bool*)buf1835 = rsIsObject(*(rs_type*)buf1836); + *(bool*)buf1837 = rsIsObject(*(rs_allocation*)buf1838); + *(bool*)buf1839 = rsIsObject(*(rs_sampler*)buf1840); + *(bool*)buf1841 = rsIsObject(*(rs_script*)buf1842); +#ifndef __LP64__ + *(bool*)buf1843 = rsIsObject(*(rs_mesh*)buf1844); + *(bool*)buf1845 = rsIsObject(*(rs_program_fragment*)buf1846); + *(bool*)buf1847 = rsIsObject(*(rs_program_vertex*)buf1848); + *(bool*)buf1849 = rsIsObject(*(rs_program_raster*)buf1850); + *(bool*)buf1851 = rsIsObject(*(rs_program_store*)buf1852); + *(bool*)buf1853 = rsIsObject(*(rs_font*)buf1854); +#endif + *(bool*)buf1855 = rsIsSphereInFrustum((float4*) buf1856, (float4*) buf1857, (float4*) buf1858, (float4*) buf1859, (float4*) buf1860, (float4*) buf1861, (float4*) buf1862); + *(rs_tm**)buf1863 = rsLocaltime((rs_tm*) buf1864, (const rs_time_t*) buf1865); + *(float*)buf1866 = rsMatrixGet((const rs_matrix4x4*) buf1867, *(uint32_t*)buf1868, *(uint32_t*)buf1869); + *(float*)buf1870 = rsMatrixGet((const rs_matrix3x3*) buf1871, *(uint32_t*)buf1872, *(uint32_t*)buf1873); + *(float*)buf1874 = rsMatrixGet((const rs_matrix2x2*) buf1875, *(uint32_t*)buf1876, *(uint32_t*)buf1877); + *(bool*)buf1878 = rsMatrixInverse((rs_matrix4x4*) buf1879); + *(bool*)buf1880 = rsMatrixInverseTranspose((rs_matrix4x4*) buf1881); + rsMatrixLoad((rs_matrix4x4*) buf1882, (const float*) buf1883); + rsMatrixLoad((rs_matrix3x3*) buf1884, (const float*) buf1885); + rsMatrixLoad((rs_matrix2x2*) buf1886, (const float*) buf1887); + rsMatrixLoad((rs_matrix4x4*) buf1888, (const rs_matrix4x4*) buf1889); + rsMatrixLoad((rs_matrix3x3*) buf1890, (const rs_matrix3x3*) buf1891); + rsMatrixLoad((rs_matrix2x2*) buf1892, (const rs_matrix2x2*) buf1893); + rsMatrixLoad((rs_matrix4x4*) buf1894, (const rs_matrix3x3*) buf1895); + rsMatrixLoad((rs_matrix4x4*) buf1896, (const rs_matrix2x2*) buf1897); + rsMatrixLoadFrustum((rs_matrix4x4*) buf1898, *(float*)buf1899, *(float*)buf1900, *(float*)buf1901, *(float*)buf1902, *(float*)buf1903, *(float*)buf1904); + rsMatrixLoadIdentity((rs_matrix4x4*) buf1905); + rsMatrixLoadIdentity((rs_matrix3x3*) buf1906); + rsMatrixLoadIdentity((rs_matrix2x2*) buf1907); + rsMatrixLoadMultiply((rs_matrix4x4*) buf1908, (const rs_matrix4x4*) buf1909, (const rs_matrix4x4*) buf1910); + rsMatrixLoadMultiply((rs_matrix3x3*) buf1911, (const rs_matrix3x3*) buf1912, (const rs_matrix3x3*) buf1913); + rsMatrixLoadMultiply((rs_matrix2x2*) buf1914, (const rs_matrix2x2*) buf1915, (const rs_matrix2x2*) buf1916); + rsMatrixLoadOrtho((rs_matrix4x4*) buf1917, *(float*)buf1918, *(float*)buf1919, *(float*)buf1920, *(float*)buf1921, *(float*)buf1922, *(float*)buf1923); + rsMatrixLoadPerspective((rs_matrix4x4*) buf1924, *(float*)buf1925, *(float*)buf1926, *(float*)buf1927, *(float*)buf1928); + rsMatrixLoadRotate((rs_matrix4x4*) buf1929, *(float*)buf1930, *(float*)buf1931, *(float*)buf1932, *(float*)buf1933); + rsMatrixLoadScale((rs_matrix4x4*) buf1934, *(float*)buf1935, *(float*)buf1936, *(float*)buf1937); + rsMatrixLoadTranslate((rs_matrix4x4*) buf1938, *(float*)buf1939, *(float*)buf1940, *(float*)buf1941); + rsMatrixMultiply((rs_matrix4x4*) buf1942, (const rs_matrix4x4*) buf1943); + rsMatrixMultiply((rs_matrix3x3*) buf1944, (const rs_matrix3x3*) buf1945); + rsMatrixMultiply((rs_matrix2x2*) buf1946, (const rs_matrix2x2*) buf1947); + *(float4*)buf1948 = rsMatrixMultiply((rs_matrix4x4*) buf1949, *(float4*)buf1950); + *(float4*)buf1951 = rsMatrixMultiply((rs_matrix4x4*) buf1952, *(float3*)buf1953); + *(float4*)buf1954 = rsMatrixMultiply((rs_matrix4x4*) buf1955, *(float2*)buf1956); + *(float3*)buf1957 = rsMatrixMultiply((rs_matrix3x3*) buf1958, *(float3*)buf1959); + *(float3*)buf1960 = rsMatrixMultiply((rs_matrix3x3*) buf1961, *(float2*)buf1962); + *(float2*)buf1963 = rsMatrixMultiply((rs_matrix2x2*) buf1964, *(float2*)buf1965); + rsMatrixRotate((rs_matrix4x4*) buf1966, *(float*)buf1967, *(float*)buf1968, *(float*)buf1969, *(float*)buf1970); + rsMatrixScale((rs_matrix4x4*) buf1971, *(float*)buf1972, *(float*)buf1973, *(float*)buf1974); + rsMatrixSet((rs_matrix4x4*) buf1975, *(uint32_t*)buf1976, *(uint32_t*)buf1977, *(float*)buf1978); + rsMatrixSet((rs_matrix3x3*) buf1979, *(uint32_t*)buf1980, *(uint32_t*)buf1981, *(float*)buf1982); + rsMatrixSet((rs_matrix2x2*) buf1983, *(uint32_t*)buf1984, *(uint32_t*)buf1985, *(float*)buf1986); + rsMatrixTranslate((rs_matrix4x4*) buf1987, *(float*)buf1988, *(float*)buf1989, *(float*)buf1990); + rsMatrixTranspose((rs_matrix4x4*) buf1991); + rsMatrixTranspose((rs_matrix3x3*) buf1992); + rsMatrixTranspose((rs_matrix2x2*) buf1993); + *(uchar4*)buf1994 = rsPackColorTo8888(*(float*)buf1995, *(float*)buf1996, *(float*)buf1997); + *(uchar4*)buf1998 = rsPackColorTo8888(*(float*)buf1999, *(float*)buf2000, *(float*)buf2001, *(float*)buf2002); + *(uchar4*)buf2003 = rsPackColorTo8888(*(float3*)buf2004); + *(uchar4*)buf2005 = rsPackColorTo8888(*(float4*)buf2006); + rsQuaternionAdd((rs_quaternion*) buf2007, (const rs_quaternion*) buf2008); + rsQuaternionConjugate((rs_quaternion*) buf2009); + *(float*)buf2010 = rsQuaternionDot((const rs_quaternion*) buf2011, (const rs_quaternion*) buf2012); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2013, (const rs_quaternion*) buf2014); + rsQuaternionLoadRotate((rs_quaternion*) buf2015, *(float*)buf2016, *(float*)buf2017, *(float*)buf2018, *(float*)buf2019); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2020, *(float*)buf2021, *(float*)buf2022, *(float*)buf2023, *(float*)buf2024); + rsQuaternionMultiply((rs_quaternion*) buf2025, *(float*)buf2026); + rsQuaternionMultiply((rs_quaternion*) buf2027, (const rs_quaternion*) buf2028); + rsQuaternionNormalize((rs_quaternion*) buf2029); + rsQuaternionSet((rs_quaternion*) buf2030, *(float*)buf2031, *(float*)buf2032, *(float*)buf2033, *(float*)buf2034); + rsQuaternionSet((rs_quaternion*) buf2035, (const rs_quaternion*) buf2036); + rsQuaternionSlerp((rs_quaternion*) buf2037, (const rs_quaternion*) buf2038, (const rs_quaternion*) buf2039, *(float*)buf2040); + *(int*)buf2041 = rsRand(*(int*)buf2042); + *(int*)buf2043 = rsRand(*(int*)buf2044, *(int*)buf2045); + *(float*)buf2046 = rsRand(*(float*)buf2047); + *(float*)buf2048 = rsRand(*(float*)buf2049, *(float*)buf2050); + *(bool*)buf2051 = rsSendToClient(*(int*)buf2052); + *(bool*)buf2053 = rsSendToClient(*(int*)buf2054, (const void*) buf2055, *(uint*)buf2056); + rsSendToClientBlocking(*(int*)buf2057); + rsSendToClientBlocking(*(int*)buf2058, (const void*) buf2059, *(uint*)buf2060); + rsSetObject((rs_element*) buf2061, *(rs_element*)buf2062); + rsSetObject((rs_type*) buf2063, *(rs_type*)buf2064); + rsSetObject((rs_allocation*) buf2065, *(rs_allocation*)buf2066); + rsSetObject((rs_sampler*) buf2067, *(rs_sampler*)buf2068); + rsSetObject((rs_script*) buf2069, *(rs_script*)buf2070); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2071, *(rs_mesh*)buf2072); + rsSetObject((rs_program_fragment*) buf2073, *(rs_program_fragment*)buf2074); + rsSetObject((rs_program_vertex*) buf2075, *(rs_program_vertex*)buf2076); + rsSetObject((rs_program_raster*) buf2077, *(rs_program_raster*)buf2078); + rsSetObject((rs_program_store*) buf2079, *(rs_program_store*)buf2080); + rsSetObject((rs_font*) buf2081, *(rs_font*)buf2082); +#endif + *(rs_time_t*)buf2083 = rsTime((rs_time_t*) buf2084); + *(float4*)buf2085 = rsUnpackColor8888(*(uchar4*)buf2086); + *(int64_t*)buf2087 = rsUptimeMillis(); + *(int64_t*)buf2088 = rsUptimeNanos(); + *(float4*)buf2089 = rsYuvToRGBA_float4(*(uchar*)buf2090, *(uchar*)buf2091, *(uchar*)buf2092); + *(uchar4*)buf2093 = rsYuvToRGBA_uchar4(*(uchar*)buf2094, *(uchar*)buf2095, *(uchar*)buf2096); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2097); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2098, *(uint*)buf2099, *(rs_allocation*)buf2100); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2101, *(uint*)buf2102, *(rs_allocation*)buf2103); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2104); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2105); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2106); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2107); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2108); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2109, *(uint*)buf2110, *(rs_sampler*)buf2111); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2112, *(uint*)buf2113, *(rs_allocation*)buf2114); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2115, *(float*)buf2116, *(float*)buf2117, *(float*)buf2118); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2119); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2120); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2121, *(uint*)buf2122); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2123, *(uint*)buf2124, *(uint*)buf2125, *(uint*)buf2126); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2127, *(float*)buf2128, *(float*)buf2129, *(float*)buf2130, *(float*)buf2131, *(float*)buf2132, *(float*)buf2133, *(float*)buf2134, *(float*)buf2135, *(float*)buf2136, *(float*)buf2137, *(float*)buf2138); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2139, *(float*)buf2140, *(float*)buf2141, *(float*)buf2142, *(float*)buf2143, *(float*)buf2144, *(float*)buf2145, *(float*)buf2146, *(float*)buf2147, *(float*)buf2148, *(float*)buf2149, *(float*)buf2150, *(float*)buf2151, *(float*)buf2152, *(float*)buf2153, *(float*)buf2154, *(float*)buf2155, *(float*)buf2156, *(float*)buf2157, *(float*)buf2158); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2159, *(float*)buf2160, *(float*)buf2161, *(float*)buf2162, *(float*)buf2163); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2164, *(float*)buf2165, *(float*)buf2166, *(float*)buf2167, *(float*)buf2168); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2169, *(int*)buf2170, *(int*)buf2171); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2172, *(int*)buf2173, *(int*)buf2174); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2175, *(float*)buf2176, *(float*)buf2177, *(float*)buf2178); +#endif +#ifndef __LP64__ + *(uint*)buf2179 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2180 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2181, (int*) buf2182, (int*) buf2183, (int*) buf2184, (int*) buf2185); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2186, (int*) buf2187, (int*) buf2188, (int*) buf2189, (int*) buf2190); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2191, (float*) buf2192, (float*) buf2193, (float*) buf2194, (float*) buf2195, (float*) buf2196, (float*) buf2197); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2198, (float3*) buf2199, (float3*) buf2200); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf2201, *(float*)buf2202, *(float*)buf2203, *(float*)buf2204, *(float*)buf2205); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf2206); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf2207); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf2208); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf2209); +#endif + *(float*)buf2210 = rsqrt(*(float*)buf2211); + *(float2*)buf2212 = rsqrt(*(float2*)buf2213); + *(float3*)buf2214 = rsqrt(*(float3*)buf2215); + *(float4*)buf2216 = rsqrt(*(float4*)buf2217); + *(float*)buf2218 = sign(*(float*)buf2219); + *(float2*)buf2220 = sign(*(float2*)buf2221); + *(float3*)buf2222 = sign(*(float3*)buf2223); + *(float4*)buf2224 = sign(*(float4*)buf2225); + *(float*)buf2226 = sin(*(float*)buf2227); + *(float2*)buf2228 = sin(*(float2*)buf2229); + *(float3*)buf2230 = sin(*(float3*)buf2231); + *(float4*)buf2232 = sin(*(float4*)buf2233); + *(float*)buf2234 = sincos(*(float*)buf2235, (float*) buf2236); + *(float2*)buf2237 = sincos(*(float2*)buf2238, (float2*) buf2239); + *(float3*)buf2240 = sincos(*(float3*)buf2241, (float3*) buf2242); + *(float4*)buf2243 = sincos(*(float4*)buf2244, (float4*) buf2245); + *(float*)buf2246 = sinh(*(float*)buf2247); + *(float2*)buf2248 = sinh(*(float2*)buf2249); + *(float3*)buf2250 = sinh(*(float3*)buf2251); + *(float4*)buf2252 = sinh(*(float4*)buf2253); + *(float*)buf2254 = sinpi(*(float*)buf2255); + *(float2*)buf2256 = sinpi(*(float2*)buf2257); + *(float3*)buf2258 = sinpi(*(float3*)buf2259); + *(float4*)buf2260 = sinpi(*(float4*)buf2261); + *(float*)buf2262 = sqrt(*(float*)buf2263); + *(float2*)buf2264 = sqrt(*(float2*)buf2265); + *(float3*)buf2266 = sqrt(*(float3*)buf2267); + *(float4*)buf2268 = sqrt(*(float4*)buf2269); + *(float*)buf2270 = step(*(float*)buf2271, *(float*)buf2272); + *(float2*)buf2273 = step(*(float2*)buf2274, *(float2*)buf2275); + *(float3*)buf2276 = step(*(float3*)buf2277, *(float3*)buf2278); + *(float4*)buf2279 = step(*(float4*)buf2280, *(float4*)buf2281); + *(float2*)buf2282 = step(*(float2*)buf2283, *(float*)buf2284); + *(float3*)buf2285 = step(*(float3*)buf2286, *(float*)buf2287); + *(float4*)buf2288 = step(*(float4*)buf2289, *(float*)buf2290); + *(float*)buf2291 = tan(*(float*)buf2292); + *(float2*)buf2293 = tan(*(float2*)buf2294); + *(float3*)buf2295 = tan(*(float3*)buf2296); + *(float4*)buf2297 = tan(*(float4*)buf2298); + *(float*)buf2299 = tanh(*(float*)buf2300); + *(float2*)buf2301 = tanh(*(float2*)buf2302); + *(float3*)buf2303 = tanh(*(float3*)buf2304); + *(float4*)buf2305 = tanh(*(float4*)buf2306); + *(float*)buf2307 = tanpi(*(float*)buf2308); + *(float2*)buf2309 = tanpi(*(float2*)buf2310); + *(float3*)buf2311 = tanpi(*(float3*)buf2312); + *(float4*)buf2313 = tanpi(*(float4*)buf2314); + *(float*)buf2315 = tgamma(*(float*)buf2316); + *(float2*)buf2317 = tgamma(*(float2*)buf2318); + *(float3*)buf2319 = tgamma(*(float3*)buf2320); + *(float4*)buf2321 = tgamma(*(float4*)buf2322); + *(float*)buf2323 = trunc(*(float*)buf2324); + *(float2*)buf2325 = trunc(*(float2*)buf2326); + *(float3*)buf2327 = trunc(*(float3*)buf2328); + *(float4*)buf2329 = trunc(*(float4*)buf2330); +}
diff --git a/slang/tests/P_all_api_11/stderr.txt.expect b/slang/tests/P_all_api_11/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_11/stderr.txt.expect
diff --git a/slang/tests/P_all_api_11/stdout.txt.expect b/slang/tests/P_all_api_11/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_11/stdout.txt.expect
diff --git a/slang/tests/P_all_api_12/all12.rs b/slang/tests/P_all_api_12/all12.rs new file mode 100644 index 0000000..98268c9 --- /dev/null +++ b/slang/tests/P_all_api_12/all12.rs
@@ -0,0 +1,3296 @@ +// -target-api 12 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; + +void root(const int* in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fdim(*(float*)buf637, *(float*)buf638); + *(float2*)buf639 = fdim(*(float2*)buf640, *(float2*)buf641); + *(float3*)buf642 = fdim(*(float3*)buf643, *(float3*)buf644); + *(float4*)buf645 = fdim(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = floor(*(float*)buf649); + *(float2*)buf650 = floor(*(float2*)buf651); + *(float3*)buf652 = floor(*(float3*)buf653); + *(float4*)buf654 = floor(*(float4*)buf655); + *(float*)buf656 = fma(*(float*)buf657, *(float*)buf658, *(float*)buf659); + *(float2*)buf660 = fma(*(float2*)buf661, *(float2*)buf662, *(float2*)buf663); + *(float3*)buf664 = fma(*(float3*)buf665, *(float3*)buf666, *(float3*)buf667); + *(float4*)buf668 = fma(*(float4*)buf669, *(float4*)buf670, *(float4*)buf671); + *(float*)buf672 = fmax(*(float*)buf673, *(float*)buf674); + *(float2*)buf675 = fmax(*(float2*)buf676, *(float2*)buf677); + *(float3*)buf678 = fmax(*(float3*)buf679, *(float3*)buf680); + *(float4*)buf681 = fmax(*(float4*)buf682, *(float4*)buf683); + *(float2*)buf684 = fmax(*(float2*)buf685, *(float*)buf686); + *(float3*)buf687 = fmax(*(float3*)buf688, *(float*)buf689); + *(float4*)buf690 = fmax(*(float4*)buf691, *(float*)buf692); + *(float*)buf693 = fmin(*(float*)buf694, *(float*)buf695); + *(float2*)buf696 = fmin(*(float2*)buf697, *(float2*)buf698); + *(float3*)buf699 = fmin(*(float3*)buf700, *(float3*)buf701); + *(float4*)buf702 = fmin(*(float4*)buf703, *(float4*)buf704); + *(float2*)buf705 = fmin(*(float2*)buf706, *(float*)buf707); + *(float3*)buf708 = fmin(*(float3*)buf709, *(float*)buf710); + *(float4*)buf711 = fmin(*(float4*)buf712, *(float*)buf713); + *(float*)buf714 = fmod(*(float*)buf715, *(float*)buf716); + *(float2*)buf717 = fmod(*(float2*)buf718, *(float2*)buf719); + *(float3*)buf720 = fmod(*(float3*)buf721, *(float3*)buf722); + *(float4*)buf723 = fmod(*(float4*)buf724, *(float4*)buf725); + *(float*)buf726 = fract(*(float*)buf727, (float*) buf728); + *(float2*)buf729 = fract(*(float2*)buf730, (float2*) buf731); + *(float3*)buf732 = fract(*(float3*)buf733, (float3*) buf734); + *(float4*)buf735 = fract(*(float4*)buf736, (float4*) buf737); + *(float*)buf738 = fract(*(float*)buf739); + *(float2*)buf740 = fract(*(float2*)buf741); + *(float3*)buf742 = fract(*(float3*)buf743); + *(float4*)buf744 = fract(*(float4*)buf745); + *(float*)buf746 = frexp(*(float*)buf747, (int*) buf748); + *(float2*)buf749 = frexp(*(float2*)buf750, (int2*) buf751); + *(float3*)buf752 = frexp(*(float3*)buf753, (int3*) buf754); + *(float4*)buf755 = frexp(*(float4*)buf756, (int4*) buf757); + *(float*)buf758 = hypot(*(float*)buf759, *(float*)buf760); + *(float2*)buf761 = hypot(*(float2*)buf762, *(float2*)buf763); + *(float3*)buf764 = hypot(*(float3*)buf765, *(float3*)buf766); + *(float4*)buf767 = hypot(*(float4*)buf768, *(float4*)buf769); + *(int*)buf770 = ilogb(*(float*)buf771); + *(int2*)buf772 = ilogb(*(float2*)buf773); + *(int3*)buf774 = ilogb(*(float3*)buf775); + *(int4*)buf776 = ilogb(*(float4*)buf777); + *(float*)buf778 = ldexp(*(float*)buf779, *(int*)buf780); + *(float2*)buf781 = ldexp(*(float2*)buf782, *(int2*)buf783); + *(float3*)buf784 = ldexp(*(float3*)buf785, *(int3*)buf786); + *(float4*)buf787 = ldexp(*(float4*)buf788, *(int4*)buf789); + *(float2*)buf790 = ldexp(*(float2*)buf791, *(int*)buf792); + *(float3*)buf793 = ldexp(*(float3*)buf794, *(int*)buf795); + *(float4*)buf796 = ldexp(*(float4*)buf797, *(int*)buf798); + *(float*)buf799 = length(*(float*)buf800); + *(float*)buf801 = length(*(float2*)buf802); + *(float*)buf803 = length(*(float3*)buf804); + *(float*)buf805 = length(*(float4*)buf806); + *(float*)buf807 = lgamma(*(float*)buf808); + *(float2*)buf809 = lgamma(*(float2*)buf810); + *(float3*)buf811 = lgamma(*(float3*)buf812); + *(float4*)buf813 = lgamma(*(float4*)buf814); + *(float*)buf815 = lgamma(*(float*)buf816, (int*) buf817); + *(float2*)buf818 = lgamma(*(float2*)buf819, (int2*) buf820); + *(float3*)buf821 = lgamma(*(float3*)buf822, (int3*) buf823); + *(float4*)buf824 = lgamma(*(float4*)buf825, (int4*) buf826); + *(float*)buf827 = log(*(float*)buf828); + *(float2*)buf829 = log(*(float2*)buf830); + *(float3*)buf831 = log(*(float3*)buf832); + *(float4*)buf833 = log(*(float4*)buf834); + *(float*)buf835 = log10(*(float*)buf836); + *(float2*)buf837 = log10(*(float2*)buf838); + *(float3*)buf839 = log10(*(float3*)buf840); + *(float4*)buf841 = log10(*(float4*)buf842); + *(float*)buf843 = log1p(*(float*)buf844); + *(float2*)buf845 = log1p(*(float2*)buf846); + *(float3*)buf847 = log1p(*(float3*)buf848); + *(float4*)buf849 = log1p(*(float4*)buf850); + *(float*)buf851 = log2(*(float*)buf852); + *(float2*)buf853 = log2(*(float2*)buf854); + *(float3*)buf855 = log2(*(float3*)buf856); + *(float4*)buf857 = log2(*(float4*)buf858); + *(float*)buf859 = logb(*(float*)buf860); + *(float2*)buf861 = logb(*(float2*)buf862); + *(float3*)buf863 = logb(*(float3*)buf864); + *(float4*)buf865 = logb(*(float4*)buf866); + *(float*)buf867 = mad(*(float*)buf868, *(float*)buf869, *(float*)buf870); + *(float2*)buf871 = mad(*(float2*)buf872, *(float2*)buf873, *(float2*)buf874); + *(float3*)buf875 = mad(*(float3*)buf876, *(float3*)buf877, *(float3*)buf878); + *(float4*)buf879 = mad(*(float4*)buf880, *(float4*)buf881, *(float4*)buf882); + *(float*)buf883 = max(*(float*)buf884, *(float*)buf885); + *(float2*)buf886 = max(*(float2*)buf887, *(float2*)buf888); + *(float3*)buf889 = max(*(float3*)buf890, *(float3*)buf891); + *(float4*)buf892 = max(*(float4*)buf893, *(float4*)buf894); + *(float2*)buf895 = max(*(float2*)buf896, *(float*)buf897); + *(float3*)buf898 = max(*(float3*)buf899, *(float*)buf900); + *(float4*)buf901 = max(*(float4*)buf902, *(float*)buf903); + *(char*)buf904 = max(*(char*)buf905, *(char*)buf906); + *(uchar*)buf907 = max(*(uchar*)buf908, *(uchar*)buf909); + *(short*)buf910 = max(*(short*)buf911, *(short*)buf912); + *(ushort*)buf913 = max(*(ushort*)buf914, *(ushort*)buf915); + *(int*)buf916 = max(*(int*)buf917, *(int*)buf918); + *(uint*)buf919 = max(*(uint*)buf920, *(uint*)buf921); + *(char2*)buf922 = max(*(char2*)buf923, *(char2*)buf924); + *(uchar2*)buf925 = max(*(uchar2*)buf926, *(uchar2*)buf927); + *(short2*)buf928 = max(*(short2*)buf929, *(short2*)buf930); + *(ushort2*)buf931 = max(*(ushort2*)buf932, *(ushort2*)buf933); + *(int2*)buf934 = max(*(int2*)buf935, *(int2*)buf936); + *(uint2*)buf937 = max(*(uint2*)buf938, *(uint2*)buf939); + *(char3*)buf940 = max(*(char3*)buf941, *(char3*)buf942); + *(uchar3*)buf943 = max(*(uchar3*)buf944, *(uchar3*)buf945); + *(short3*)buf946 = max(*(short3*)buf947, *(short3*)buf948); + *(ushort3*)buf949 = max(*(ushort3*)buf950, *(ushort3*)buf951); + *(int3*)buf952 = max(*(int3*)buf953, *(int3*)buf954); + *(uint3*)buf955 = max(*(uint3*)buf956, *(uint3*)buf957); + *(char4*)buf958 = max(*(char4*)buf959, *(char4*)buf960); + *(uchar4*)buf961 = max(*(uchar4*)buf962, *(uchar4*)buf963); + *(short4*)buf964 = max(*(short4*)buf965, *(short4*)buf966); + *(ushort4*)buf967 = max(*(ushort4*)buf968, *(ushort4*)buf969); + *(int4*)buf970 = max(*(int4*)buf971, *(int4*)buf972); + *(uint4*)buf973 = max(*(uint4*)buf974, *(uint4*)buf975); + *(float*)buf976 = min(*(float*)buf977, *(float*)buf978); + *(float2*)buf979 = min(*(float2*)buf980, *(float2*)buf981); + *(float3*)buf982 = min(*(float3*)buf983, *(float3*)buf984); + *(float4*)buf985 = min(*(float4*)buf986, *(float4*)buf987); + *(float2*)buf988 = min(*(float2*)buf989, *(float*)buf990); + *(float3*)buf991 = min(*(float3*)buf992, *(float*)buf993); + *(float4*)buf994 = min(*(float4*)buf995, *(float*)buf996); + *(char*)buf997 = min(*(char*)buf998, *(char*)buf999); + *(uchar*)buf1000 = min(*(uchar*)buf1001, *(uchar*)buf1002); + *(short*)buf1003 = min(*(short*)buf1004, *(short*)buf1005); + *(ushort*)buf1006 = min(*(ushort*)buf1007, *(ushort*)buf1008); + *(int*)buf1009 = min(*(int*)buf1010, *(int*)buf1011); + *(uint*)buf1012 = min(*(uint*)buf1013, *(uint*)buf1014); + *(char2*)buf1015 = min(*(char2*)buf1016, *(char2*)buf1017); + *(uchar2*)buf1018 = min(*(uchar2*)buf1019, *(uchar2*)buf1020); + *(short2*)buf1021 = min(*(short2*)buf1022, *(short2*)buf1023); + *(ushort2*)buf1024 = min(*(ushort2*)buf1025, *(ushort2*)buf1026); + *(int2*)buf1027 = min(*(int2*)buf1028, *(int2*)buf1029); + *(uint2*)buf1030 = min(*(uint2*)buf1031, *(uint2*)buf1032); + *(char3*)buf1033 = min(*(char3*)buf1034, *(char3*)buf1035); + *(uchar3*)buf1036 = min(*(uchar3*)buf1037, *(uchar3*)buf1038); + *(short3*)buf1039 = min(*(short3*)buf1040, *(short3*)buf1041); + *(ushort3*)buf1042 = min(*(ushort3*)buf1043, *(ushort3*)buf1044); + *(int3*)buf1045 = min(*(int3*)buf1046, *(int3*)buf1047); + *(uint3*)buf1048 = min(*(uint3*)buf1049, *(uint3*)buf1050); + *(char4*)buf1051 = min(*(char4*)buf1052, *(char4*)buf1053); + *(uchar4*)buf1054 = min(*(uchar4*)buf1055, *(uchar4*)buf1056); + *(short4*)buf1057 = min(*(short4*)buf1058, *(short4*)buf1059); + *(ushort4*)buf1060 = min(*(ushort4*)buf1061, *(ushort4*)buf1062); + *(int4*)buf1063 = min(*(int4*)buf1064, *(int4*)buf1065); + *(uint4*)buf1066 = min(*(uint4*)buf1067, *(uint4*)buf1068); + *(float*)buf1069 = mix(*(float*)buf1070, *(float*)buf1071, *(float*)buf1072); + *(float2*)buf1073 = mix(*(float2*)buf1074, *(float2*)buf1075, *(float2*)buf1076); + *(float3*)buf1077 = mix(*(float3*)buf1078, *(float3*)buf1079, *(float3*)buf1080); + *(float4*)buf1081 = mix(*(float4*)buf1082, *(float4*)buf1083, *(float4*)buf1084); + *(float2*)buf1085 = mix(*(float2*)buf1086, *(float2*)buf1087, *(float*)buf1088); + *(float3*)buf1089 = mix(*(float3*)buf1090, *(float3*)buf1091, *(float*)buf1092); + *(float4*)buf1093 = mix(*(float4*)buf1094, *(float4*)buf1095, *(float*)buf1096); + *(float*)buf1097 = modf(*(float*)buf1098, (float*) buf1099); + *(float2*)buf1100 = modf(*(float2*)buf1101, (float2*) buf1102); + *(float3*)buf1103 = modf(*(float3*)buf1104, (float3*) buf1105); + *(float4*)buf1106 = modf(*(float4*)buf1107, (float4*) buf1108); + *(float*)buf1109 = nan(*(uint*)buf1110); + *(float*)buf1111 = nextafter(*(float*)buf1112, *(float*)buf1113); + *(float2*)buf1114 = nextafter(*(float2*)buf1115, *(float2*)buf1116); + *(float3*)buf1117 = nextafter(*(float3*)buf1118, *(float3*)buf1119); + *(float4*)buf1120 = nextafter(*(float4*)buf1121, *(float4*)buf1122); + *(float*)buf1123 = normalize(*(float*)buf1124); + *(float2*)buf1125 = normalize(*(float2*)buf1126); + *(float3*)buf1127 = normalize(*(float3*)buf1128); + *(float4*)buf1129 = normalize(*(float4*)buf1130); + *(float*)buf1131 = pow(*(float*)buf1132, *(float*)buf1133); + *(float2*)buf1134 = pow(*(float2*)buf1135, *(float2*)buf1136); + *(float3*)buf1137 = pow(*(float3*)buf1138, *(float3*)buf1139); + *(float4*)buf1140 = pow(*(float4*)buf1141, *(float4*)buf1142); + *(float*)buf1143 = pown(*(float*)buf1144, *(int*)buf1145); + *(float2*)buf1146 = pown(*(float2*)buf1147, *(int2*)buf1148); + *(float3*)buf1149 = pown(*(float3*)buf1150, *(int3*)buf1151); + *(float4*)buf1152 = pown(*(float4*)buf1153, *(int4*)buf1154); + *(float*)buf1155 = powr(*(float*)buf1156, *(float*)buf1157); + *(float2*)buf1158 = powr(*(float2*)buf1159, *(float2*)buf1160); + *(float3*)buf1161 = powr(*(float3*)buf1162, *(float3*)buf1163); + *(float4*)buf1164 = powr(*(float4*)buf1165, *(float4*)buf1166); + *(float*)buf1167 = radians(*(float*)buf1168); + *(float2*)buf1169 = radians(*(float2*)buf1170); + *(float3*)buf1171 = radians(*(float3*)buf1172); + *(float4*)buf1173 = radians(*(float4*)buf1174); + *(float*)buf1175 = remainder(*(float*)buf1176, *(float*)buf1177); + *(float2*)buf1178 = remainder(*(float2*)buf1179, *(float2*)buf1180); + *(float3*)buf1181 = remainder(*(float3*)buf1182, *(float3*)buf1183); + *(float4*)buf1184 = remainder(*(float4*)buf1185, *(float4*)buf1186); + *(float*)buf1187 = remquo(*(float*)buf1188, *(float*)buf1189, (int*) buf1190); + *(float2*)buf1191 = remquo(*(float2*)buf1192, *(float2*)buf1193, (int2*) buf1194); + *(float3*)buf1195 = remquo(*(float3*)buf1196, *(float3*)buf1197, (int3*) buf1198); + *(float4*)buf1199 = remquo(*(float4*)buf1200, *(float4*)buf1201, (int4*) buf1202); + *(float*)buf1203 = rint(*(float*)buf1204); + *(float2*)buf1205 = rint(*(float2*)buf1206); + *(float3*)buf1207 = rint(*(float3*)buf1208); + *(float4*)buf1209 = rint(*(float4*)buf1210); + *(float*)buf1211 = rootn(*(float*)buf1212, *(int*)buf1213); + *(float2*)buf1214 = rootn(*(float2*)buf1215, *(int2*)buf1216); + *(float3*)buf1217 = rootn(*(float3*)buf1218, *(int3*)buf1219); + *(float4*)buf1220 = rootn(*(float4*)buf1221, *(int4*)buf1222); + *(float*)buf1223 = round(*(float*)buf1224); + *(float2*)buf1225 = round(*(float2*)buf1226); + *(float3*)buf1227 = round(*(float3*)buf1228); + *(float4*)buf1229 = round(*(float4*)buf1230); + *(uint32_t*)buf1231 = rsAllocationGetDimFaces(*(rs_allocation*)buf1232); + *(uint32_t*)buf1233 = rsAllocationGetDimLOD(*(rs_allocation*)buf1234); + *(uint32_t*)buf1235 = rsAllocationGetDimX(*(rs_allocation*)buf1236); + *(uint32_t*)buf1237 = rsAllocationGetDimY(*(rs_allocation*)buf1238); + *(uint32_t*)buf1239 = rsAllocationGetDimZ(*(rs_allocation*)buf1240); + *(rs_element*)buf1241 = rsAllocationGetElement(*(rs_allocation*)buf1242); + *(char*)buf1243 = rsClamp(*(char*)buf1244, *(char*)buf1245, *(char*)buf1246); + *(uchar*)buf1247 = rsClamp(*(uchar*)buf1248, *(uchar*)buf1249, *(uchar*)buf1250); + *(short*)buf1251 = rsClamp(*(short*)buf1252, *(short*)buf1253, *(short*)buf1254); + *(ushort*)buf1255 = rsClamp(*(ushort*)buf1256, *(ushort*)buf1257, *(ushort*)buf1258); + *(int*)buf1259 = rsClamp(*(int*)buf1260, *(int*)buf1261, *(int*)buf1262); + *(uint*)buf1263 = rsClamp(*(uint*)buf1264, *(uint*)buf1265, *(uint*)buf1266); + rsClearObject((rs_element*) buf1267); + rsClearObject((rs_type*) buf1268); + rsClearObject((rs_allocation*) buf1269); + rsClearObject((rs_sampler*) buf1270); + rsClearObject((rs_script*) buf1271); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1272); + rsClearObject((rs_program_fragment*) buf1273); + rsClearObject((rs_program_vertex*) buf1274); + rsClearObject((rs_program_raster*) buf1275); + rsClearObject((rs_program_store*) buf1276); + rsClearObject((rs_font*) buf1277); +#endif + rsDebug((const char*) buf1278, *(double*)buf1279); + rsDebug((const char*) buf1280, *(int*)buf1281); + rsDebug((const char*) buf1282, *(uint*)buf1283); + rsDebug((const char*) buf1284, *(long*)buf1285); + rsDebug((const char*) buf1286, *(ulong*)buf1287); + rsDebug((const char*) buf1288, *(float*)buf1289); + rsDebug((const char*) buf1290, *(float2*)buf1291); + rsDebug((const char*) buf1292, *(float3*)buf1293); + rsDebug((const char*) buf1294, *(float4*)buf1295); + rsDebug((const char*) buf1296, *(float*)buf1297, *(float*)buf1298); + rsDebug((const char*) buf1299, *(float*)buf1300, *(float*)buf1301, *(float*)buf1302); + rsDebug((const char*) buf1303, *(float*)buf1304, *(float*)buf1305, *(float*)buf1306, *(float*)buf1307); + rsDebug((const char*) buf1308, *(long long*)buf1309); + rsDebug((const char*) buf1310, *(unsigned long long*)buf1311); + rsDebug((const char*) buf1312, (const void*) buf1313); + rsDebug((const char*) buf1314, (const rs_matrix4x4*) buf1315); + rsDebug((const char*) buf1316, (const rs_matrix3x3*) buf1317); + rsDebug((const char*) buf1318, (const rs_matrix2x2*) buf1319); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1320, (float4*) buf1321, (float4*) buf1322, (float4*) buf1323, (float4*) buf1324, (float4*) buf1325, (float4*) buf1326); + rsForEach(*(rs_script*)buf1327, *(rs_allocation*)buf1328, *(rs_allocation*)buf1329, (const void*) buf1330, (const rs_script_call_t*) buf1331); + rsForEach(*(rs_script*)buf1332, *(rs_allocation*)buf1333, *(rs_allocation*)buf1334, (const void*) buf1335); + *(float*)buf1336 = rsFrac(*(float*)buf1337); + *(rs_allocation*)buf1338 = rsGetAllocation((const void*) buf1339); + *(float*)buf1340 = rsGetDt(); + *(const void**)buf1341 = rsGetElementAt(*(rs_allocation*)buf1342, *(uint32_t*)buf1343); + *(const void**)buf1344 = rsGetElementAt(*(rs_allocation*)buf1345, *(uint32_t*)buf1346, *(uint32_t*)buf1347); + *(const void**)buf1348 = rsGetElementAt(*(rs_allocation*)buf1349, *(uint32_t*)buf1350, *(uint32_t*)buf1351, *(uint32_t*)buf1352); + *(float*)buf1353 = rsGetElementAt_float(*(rs_allocation*)buf1354, *(uint32_t*)buf1355); + *(float2*)buf1356 = rsGetElementAt_float2(*(rs_allocation*)buf1357, *(uint32_t*)buf1358); + *(float3*)buf1359 = rsGetElementAt_float3(*(rs_allocation*)buf1360, *(uint32_t*)buf1361); + *(float4*)buf1362 = rsGetElementAt_float4(*(rs_allocation*)buf1363, *(uint32_t*)buf1364); + *(double*)buf1365 = rsGetElementAt_double(*(rs_allocation*)buf1366, *(uint32_t*)buf1367); + *(double2*)buf1368 = rsGetElementAt_double2(*(rs_allocation*)buf1369, *(uint32_t*)buf1370); + *(double3*)buf1371 = rsGetElementAt_double3(*(rs_allocation*)buf1372, *(uint32_t*)buf1373); + *(double4*)buf1374 = rsGetElementAt_double4(*(rs_allocation*)buf1375, *(uint32_t*)buf1376); + *(char*)buf1377 = rsGetElementAt_char(*(rs_allocation*)buf1378, *(uint32_t*)buf1379); + *(char2*)buf1380 = rsGetElementAt_char2(*(rs_allocation*)buf1381, *(uint32_t*)buf1382); + *(char3*)buf1383 = rsGetElementAt_char3(*(rs_allocation*)buf1384, *(uint32_t*)buf1385); + *(char4*)buf1386 = rsGetElementAt_char4(*(rs_allocation*)buf1387, *(uint32_t*)buf1388); + *(uchar*)buf1389 = rsGetElementAt_uchar(*(rs_allocation*)buf1390, *(uint32_t*)buf1391); + *(uchar2*)buf1392 = rsGetElementAt_uchar2(*(rs_allocation*)buf1393, *(uint32_t*)buf1394); + *(uchar3*)buf1395 = rsGetElementAt_uchar3(*(rs_allocation*)buf1396, *(uint32_t*)buf1397); + *(uchar4*)buf1398 = rsGetElementAt_uchar4(*(rs_allocation*)buf1399, *(uint32_t*)buf1400); + *(short*)buf1401 = rsGetElementAt_short(*(rs_allocation*)buf1402, *(uint32_t*)buf1403); + *(short2*)buf1404 = rsGetElementAt_short2(*(rs_allocation*)buf1405, *(uint32_t*)buf1406); + *(short3*)buf1407 = rsGetElementAt_short3(*(rs_allocation*)buf1408, *(uint32_t*)buf1409); + *(short4*)buf1410 = rsGetElementAt_short4(*(rs_allocation*)buf1411, *(uint32_t*)buf1412); + *(ushort*)buf1413 = rsGetElementAt_ushort(*(rs_allocation*)buf1414, *(uint32_t*)buf1415); + *(ushort2*)buf1416 = rsGetElementAt_ushort2(*(rs_allocation*)buf1417, *(uint32_t*)buf1418); + *(ushort3*)buf1419 = rsGetElementAt_ushort3(*(rs_allocation*)buf1420, *(uint32_t*)buf1421); + *(ushort4*)buf1422 = rsGetElementAt_ushort4(*(rs_allocation*)buf1423, *(uint32_t*)buf1424); + *(int*)buf1425 = rsGetElementAt_int(*(rs_allocation*)buf1426, *(uint32_t*)buf1427); + *(int2*)buf1428 = rsGetElementAt_int2(*(rs_allocation*)buf1429, *(uint32_t*)buf1430); + *(int3*)buf1431 = rsGetElementAt_int3(*(rs_allocation*)buf1432, *(uint32_t*)buf1433); + *(int4*)buf1434 = rsGetElementAt_int4(*(rs_allocation*)buf1435, *(uint32_t*)buf1436); + *(uint*)buf1437 = rsGetElementAt_uint(*(rs_allocation*)buf1438, *(uint32_t*)buf1439); + *(uint2*)buf1440 = rsGetElementAt_uint2(*(rs_allocation*)buf1441, *(uint32_t*)buf1442); + *(uint3*)buf1443 = rsGetElementAt_uint3(*(rs_allocation*)buf1444, *(uint32_t*)buf1445); + *(uint4*)buf1446 = rsGetElementAt_uint4(*(rs_allocation*)buf1447, *(uint32_t*)buf1448); + *(long*)buf1449 = rsGetElementAt_long(*(rs_allocation*)buf1450, *(uint32_t*)buf1451); + *(long2*)buf1452 = rsGetElementAt_long2(*(rs_allocation*)buf1453, *(uint32_t*)buf1454); + *(long3*)buf1455 = rsGetElementAt_long3(*(rs_allocation*)buf1456, *(uint32_t*)buf1457); + *(long4*)buf1458 = rsGetElementAt_long4(*(rs_allocation*)buf1459, *(uint32_t*)buf1460); + *(ulong*)buf1461 = rsGetElementAt_ulong(*(rs_allocation*)buf1462, *(uint32_t*)buf1463); + *(ulong2*)buf1464 = rsGetElementAt_ulong2(*(rs_allocation*)buf1465, *(uint32_t*)buf1466); + *(ulong3*)buf1467 = rsGetElementAt_ulong3(*(rs_allocation*)buf1468, *(uint32_t*)buf1469); + *(ulong4*)buf1470 = rsGetElementAt_ulong4(*(rs_allocation*)buf1471, *(uint32_t*)buf1472); + *(float*)buf1473 = rsGetElementAt_float(*(rs_allocation*)buf1474, *(uint32_t*)buf1475, *(uint32_t*)buf1476); + *(float2*)buf1477 = rsGetElementAt_float2(*(rs_allocation*)buf1478, *(uint32_t*)buf1479, *(uint32_t*)buf1480); + *(float3*)buf1481 = rsGetElementAt_float3(*(rs_allocation*)buf1482, *(uint32_t*)buf1483, *(uint32_t*)buf1484); + *(float4*)buf1485 = rsGetElementAt_float4(*(rs_allocation*)buf1486, *(uint32_t*)buf1487, *(uint32_t*)buf1488); + *(double*)buf1489 = rsGetElementAt_double(*(rs_allocation*)buf1490, *(uint32_t*)buf1491, *(uint32_t*)buf1492); + *(double2*)buf1493 = rsGetElementAt_double2(*(rs_allocation*)buf1494, *(uint32_t*)buf1495, *(uint32_t*)buf1496); + *(double3*)buf1497 = rsGetElementAt_double3(*(rs_allocation*)buf1498, *(uint32_t*)buf1499, *(uint32_t*)buf1500); + *(double4*)buf1501 = rsGetElementAt_double4(*(rs_allocation*)buf1502, *(uint32_t*)buf1503, *(uint32_t*)buf1504); + *(char*)buf1505 = rsGetElementAt_char(*(rs_allocation*)buf1506, *(uint32_t*)buf1507, *(uint32_t*)buf1508); + *(char2*)buf1509 = rsGetElementAt_char2(*(rs_allocation*)buf1510, *(uint32_t*)buf1511, *(uint32_t*)buf1512); + *(char3*)buf1513 = rsGetElementAt_char3(*(rs_allocation*)buf1514, *(uint32_t*)buf1515, *(uint32_t*)buf1516); + *(char4*)buf1517 = rsGetElementAt_char4(*(rs_allocation*)buf1518, *(uint32_t*)buf1519, *(uint32_t*)buf1520); + *(uchar*)buf1521 = rsGetElementAt_uchar(*(rs_allocation*)buf1522, *(uint32_t*)buf1523, *(uint32_t*)buf1524); + *(uchar2*)buf1525 = rsGetElementAt_uchar2(*(rs_allocation*)buf1526, *(uint32_t*)buf1527, *(uint32_t*)buf1528); + *(uchar3*)buf1529 = rsGetElementAt_uchar3(*(rs_allocation*)buf1530, *(uint32_t*)buf1531, *(uint32_t*)buf1532); + *(uchar4*)buf1533 = rsGetElementAt_uchar4(*(rs_allocation*)buf1534, *(uint32_t*)buf1535, *(uint32_t*)buf1536); + *(short*)buf1537 = rsGetElementAt_short(*(rs_allocation*)buf1538, *(uint32_t*)buf1539, *(uint32_t*)buf1540); + *(short2*)buf1541 = rsGetElementAt_short2(*(rs_allocation*)buf1542, *(uint32_t*)buf1543, *(uint32_t*)buf1544); + *(short3*)buf1545 = rsGetElementAt_short3(*(rs_allocation*)buf1546, *(uint32_t*)buf1547, *(uint32_t*)buf1548); + *(short4*)buf1549 = rsGetElementAt_short4(*(rs_allocation*)buf1550, *(uint32_t*)buf1551, *(uint32_t*)buf1552); + *(ushort*)buf1553 = rsGetElementAt_ushort(*(rs_allocation*)buf1554, *(uint32_t*)buf1555, *(uint32_t*)buf1556); + *(ushort2*)buf1557 = rsGetElementAt_ushort2(*(rs_allocation*)buf1558, *(uint32_t*)buf1559, *(uint32_t*)buf1560); + *(ushort3*)buf1561 = rsGetElementAt_ushort3(*(rs_allocation*)buf1562, *(uint32_t*)buf1563, *(uint32_t*)buf1564); + *(ushort4*)buf1565 = rsGetElementAt_ushort4(*(rs_allocation*)buf1566, *(uint32_t*)buf1567, *(uint32_t*)buf1568); + *(int*)buf1569 = rsGetElementAt_int(*(rs_allocation*)buf1570, *(uint32_t*)buf1571, *(uint32_t*)buf1572); + *(int2*)buf1573 = rsGetElementAt_int2(*(rs_allocation*)buf1574, *(uint32_t*)buf1575, *(uint32_t*)buf1576); + *(int3*)buf1577 = rsGetElementAt_int3(*(rs_allocation*)buf1578, *(uint32_t*)buf1579, *(uint32_t*)buf1580); + *(int4*)buf1581 = rsGetElementAt_int4(*(rs_allocation*)buf1582, *(uint32_t*)buf1583, *(uint32_t*)buf1584); + *(uint*)buf1585 = rsGetElementAt_uint(*(rs_allocation*)buf1586, *(uint32_t*)buf1587, *(uint32_t*)buf1588); + *(uint2*)buf1589 = rsGetElementAt_uint2(*(rs_allocation*)buf1590, *(uint32_t*)buf1591, *(uint32_t*)buf1592); + *(uint3*)buf1593 = rsGetElementAt_uint3(*(rs_allocation*)buf1594, *(uint32_t*)buf1595, *(uint32_t*)buf1596); + *(uint4*)buf1597 = rsGetElementAt_uint4(*(rs_allocation*)buf1598, *(uint32_t*)buf1599, *(uint32_t*)buf1600); + *(long*)buf1601 = rsGetElementAt_long(*(rs_allocation*)buf1602, *(uint32_t*)buf1603, *(uint32_t*)buf1604); + *(long2*)buf1605 = rsGetElementAt_long2(*(rs_allocation*)buf1606, *(uint32_t*)buf1607, *(uint32_t*)buf1608); + *(long3*)buf1609 = rsGetElementAt_long3(*(rs_allocation*)buf1610, *(uint32_t*)buf1611, *(uint32_t*)buf1612); + *(long4*)buf1613 = rsGetElementAt_long4(*(rs_allocation*)buf1614, *(uint32_t*)buf1615, *(uint32_t*)buf1616); + *(ulong*)buf1617 = rsGetElementAt_ulong(*(rs_allocation*)buf1618, *(uint32_t*)buf1619, *(uint32_t*)buf1620); + *(ulong2*)buf1621 = rsGetElementAt_ulong2(*(rs_allocation*)buf1622, *(uint32_t*)buf1623, *(uint32_t*)buf1624); + *(ulong3*)buf1625 = rsGetElementAt_ulong3(*(rs_allocation*)buf1626, *(uint32_t*)buf1627, *(uint32_t*)buf1628); + *(ulong4*)buf1629 = rsGetElementAt_ulong4(*(rs_allocation*)buf1630, *(uint32_t*)buf1631, *(uint32_t*)buf1632); + *(float*)buf1633 = rsGetElementAt_float(*(rs_allocation*)buf1634, *(uint32_t*)buf1635, *(uint32_t*)buf1636, *(uint32_t*)buf1637); + *(float2*)buf1638 = rsGetElementAt_float2(*(rs_allocation*)buf1639, *(uint32_t*)buf1640, *(uint32_t*)buf1641, *(uint32_t*)buf1642); + *(float3*)buf1643 = rsGetElementAt_float3(*(rs_allocation*)buf1644, *(uint32_t*)buf1645, *(uint32_t*)buf1646, *(uint32_t*)buf1647); + *(float4*)buf1648 = rsGetElementAt_float4(*(rs_allocation*)buf1649, *(uint32_t*)buf1650, *(uint32_t*)buf1651, *(uint32_t*)buf1652); + *(double*)buf1653 = rsGetElementAt_double(*(rs_allocation*)buf1654, *(uint32_t*)buf1655, *(uint32_t*)buf1656, *(uint32_t*)buf1657); + *(double2*)buf1658 = rsGetElementAt_double2(*(rs_allocation*)buf1659, *(uint32_t*)buf1660, *(uint32_t*)buf1661, *(uint32_t*)buf1662); + *(double3*)buf1663 = rsGetElementAt_double3(*(rs_allocation*)buf1664, *(uint32_t*)buf1665, *(uint32_t*)buf1666, *(uint32_t*)buf1667); + *(double4*)buf1668 = rsGetElementAt_double4(*(rs_allocation*)buf1669, *(uint32_t*)buf1670, *(uint32_t*)buf1671, *(uint32_t*)buf1672); + *(char*)buf1673 = rsGetElementAt_char(*(rs_allocation*)buf1674, *(uint32_t*)buf1675, *(uint32_t*)buf1676, *(uint32_t*)buf1677); + *(char2*)buf1678 = rsGetElementAt_char2(*(rs_allocation*)buf1679, *(uint32_t*)buf1680, *(uint32_t*)buf1681, *(uint32_t*)buf1682); + *(char3*)buf1683 = rsGetElementAt_char3(*(rs_allocation*)buf1684, *(uint32_t*)buf1685, *(uint32_t*)buf1686, *(uint32_t*)buf1687); + *(char4*)buf1688 = rsGetElementAt_char4(*(rs_allocation*)buf1689, *(uint32_t*)buf1690, *(uint32_t*)buf1691, *(uint32_t*)buf1692); + *(uchar*)buf1693 = rsGetElementAt_uchar(*(rs_allocation*)buf1694, *(uint32_t*)buf1695, *(uint32_t*)buf1696, *(uint32_t*)buf1697); + *(uchar2*)buf1698 = rsGetElementAt_uchar2(*(rs_allocation*)buf1699, *(uint32_t*)buf1700, *(uint32_t*)buf1701, *(uint32_t*)buf1702); + *(uchar3*)buf1703 = rsGetElementAt_uchar3(*(rs_allocation*)buf1704, *(uint32_t*)buf1705, *(uint32_t*)buf1706, *(uint32_t*)buf1707); + *(uchar4*)buf1708 = rsGetElementAt_uchar4(*(rs_allocation*)buf1709, *(uint32_t*)buf1710, *(uint32_t*)buf1711, *(uint32_t*)buf1712); + *(short*)buf1713 = rsGetElementAt_short(*(rs_allocation*)buf1714, *(uint32_t*)buf1715, *(uint32_t*)buf1716, *(uint32_t*)buf1717); + *(short2*)buf1718 = rsGetElementAt_short2(*(rs_allocation*)buf1719, *(uint32_t*)buf1720, *(uint32_t*)buf1721, *(uint32_t*)buf1722); + *(short3*)buf1723 = rsGetElementAt_short3(*(rs_allocation*)buf1724, *(uint32_t*)buf1725, *(uint32_t*)buf1726, *(uint32_t*)buf1727); + *(short4*)buf1728 = rsGetElementAt_short4(*(rs_allocation*)buf1729, *(uint32_t*)buf1730, *(uint32_t*)buf1731, *(uint32_t*)buf1732); + *(ushort*)buf1733 = rsGetElementAt_ushort(*(rs_allocation*)buf1734, *(uint32_t*)buf1735, *(uint32_t*)buf1736, *(uint32_t*)buf1737); + *(ushort2*)buf1738 = rsGetElementAt_ushort2(*(rs_allocation*)buf1739, *(uint32_t*)buf1740, *(uint32_t*)buf1741, *(uint32_t*)buf1742); + *(ushort3*)buf1743 = rsGetElementAt_ushort3(*(rs_allocation*)buf1744, *(uint32_t*)buf1745, *(uint32_t*)buf1746, *(uint32_t*)buf1747); + *(ushort4*)buf1748 = rsGetElementAt_ushort4(*(rs_allocation*)buf1749, *(uint32_t*)buf1750, *(uint32_t*)buf1751, *(uint32_t*)buf1752); + *(int*)buf1753 = rsGetElementAt_int(*(rs_allocation*)buf1754, *(uint32_t*)buf1755, *(uint32_t*)buf1756, *(uint32_t*)buf1757); + *(int2*)buf1758 = rsGetElementAt_int2(*(rs_allocation*)buf1759, *(uint32_t*)buf1760, *(uint32_t*)buf1761, *(uint32_t*)buf1762); + *(int3*)buf1763 = rsGetElementAt_int3(*(rs_allocation*)buf1764, *(uint32_t*)buf1765, *(uint32_t*)buf1766, *(uint32_t*)buf1767); + *(int4*)buf1768 = rsGetElementAt_int4(*(rs_allocation*)buf1769, *(uint32_t*)buf1770, *(uint32_t*)buf1771, *(uint32_t*)buf1772); + *(uint*)buf1773 = rsGetElementAt_uint(*(rs_allocation*)buf1774, *(uint32_t*)buf1775, *(uint32_t*)buf1776, *(uint32_t*)buf1777); + *(uint2*)buf1778 = rsGetElementAt_uint2(*(rs_allocation*)buf1779, *(uint32_t*)buf1780, *(uint32_t*)buf1781, *(uint32_t*)buf1782); + *(uint3*)buf1783 = rsGetElementAt_uint3(*(rs_allocation*)buf1784, *(uint32_t*)buf1785, *(uint32_t*)buf1786, *(uint32_t*)buf1787); + *(uint4*)buf1788 = rsGetElementAt_uint4(*(rs_allocation*)buf1789, *(uint32_t*)buf1790, *(uint32_t*)buf1791, *(uint32_t*)buf1792); + *(long*)buf1793 = rsGetElementAt_long(*(rs_allocation*)buf1794, *(uint32_t*)buf1795, *(uint32_t*)buf1796, *(uint32_t*)buf1797); + *(long2*)buf1798 = rsGetElementAt_long2(*(rs_allocation*)buf1799, *(uint32_t*)buf1800, *(uint32_t*)buf1801, *(uint32_t*)buf1802); + *(long3*)buf1803 = rsGetElementAt_long3(*(rs_allocation*)buf1804, *(uint32_t*)buf1805, *(uint32_t*)buf1806, *(uint32_t*)buf1807); + *(long4*)buf1808 = rsGetElementAt_long4(*(rs_allocation*)buf1809, *(uint32_t*)buf1810, *(uint32_t*)buf1811, *(uint32_t*)buf1812); + *(ulong*)buf1813 = rsGetElementAt_ulong(*(rs_allocation*)buf1814, *(uint32_t*)buf1815, *(uint32_t*)buf1816, *(uint32_t*)buf1817); + *(ulong2*)buf1818 = rsGetElementAt_ulong2(*(rs_allocation*)buf1819, *(uint32_t*)buf1820, *(uint32_t*)buf1821, *(uint32_t*)buf1822); + *(ulong3*)buf1823 = rsGetElementAt_ulong3(*(rs_allocation*)buf1824, *(uint32_t*)buf1825, *(uint32_t*)buf1826, *(uint32_t*)buf1827); + *(ulong4*)buf1828 = rsGetElementAt_ulong4(*(rs_allocation*)buf1829, *(uint32_t*)buf1830, *(uint32_t*)buf1831, *(uint32_t*)buf1832); + *(bool*)buf1833 = rsIsObject(*(rs_element*)buf1834); + *(bool*)buf1835 = rsIsObject(*(rs_type*)buf1836); + *(bool*)buf1837 = rsIsObject(*(rs_allocation*)buf1838); + *(bool*)buf1839 = rsIsObject(*(rs_sampler*)buf1840); + *(bool*)buf1841 = rsIsObject(*(rs_script*)buf1842); +#ifndef __LP64__ + *(bool*)buf1843 = rsIsObject(*(rs_mesh*)buf1844); + *(bool*)buf1845 = rsIsObject(*(rs_program_fragment*)buf1846); + *(bool*)buf1847 = rsIsObject(*(rs_program_vertex*)buf1848); + *(bool*)buf1849 = rsIsObject(*(rs_program_raster*)buf1850); + *(bool*)buf1851 = rsIsObject(*(rs_program_store*)buf1852); + *(bool*)buf1853 = rsIsObject(*(rs_font*)buf1854); +#endif + *(bool*)buf1855 = rsIsSphereInFrustum((float4*) buf1856, (float4*) buf1857, (float4*) buf1858, (float4*) buf1859, (float4*) buf1860, (float4*) buf1861, (float4*) buf1862); + *(rs_tm**)buf1863 = rsLocaltime((rs_tm*) buf1864, (const rs_time_t*) buf1865); + *(float*)buf1866 = rsMatrixGet((const rs_matrix4x4*) buf1867, *(uint32_t*)buf1868, *(uint32_t*)buf1869); + *(float*)buf1870 = rsMatrixGet((const rs_matrix3x3*) buf1871, *(uint32_t*)buf1872, *(uint32_t*)buf1873); + *(float*)buf1874 = rsMatrixGet((const rs_matrix2x2*) buf1875, *(uint32_t*)buf1876, *(uint32_t*)buf1877); + *(bool*)buf1878 = rsMatrixInverse((rs_matrix4x4*) buf1879); + *(bool*)buf1880 = rsMatrixInverseTranspose((rs_matrix4x4*) buf1881); + rsMatrixLoad((rs_matrix4x4*) buf1882, (const float*) buf1883); + rsMatrixLoad((rs_matrix3x3*) buf1884, (const float*) buf1885); + rsMatrixLoad((rs_matrix2x2*) buf1886, (const float*) buf1887); + rsMatrixLoad((rs_matrix4x4*) buf1888, (const rs_matrix4x4*) buf1889); + rsMatrixLoad((rs_matrix3x3*) buf1890, (const rs_matrix3x3*) buf1891); + rsMatrixLoad((rs_matrix2x2*) buf1892, (const rs_matrix2x2*) buf1893); + rsMatrixLoad((rs_matrix4x4*) buf1894, (const rs_matrix3x3*) buf1895); + rsMatrixLoad((rs_matrix4x4*) buf1896, (const rs_matrix2x2*) buf1897); + rsMatrixLoadFrustum((rs_matrix4x4*) buf1898, *(float*)buf1899, *(float*)buf1900, *(float*)buf1901, *(float*)buf1902, *(float*)buf1903, *(float*)buf1904); + rsMatrixLoadIdentity((rs_matrix4x4*) buf1905); + rsMatrixLoadIdentity((rs_matrix3x3*) buf1906); + rsMatrixLoadIdentity((rs_matrix2x2*) buf1907); + rsMatrixLoadMultiply((rs_matrix4x4*) buf1908, (const rs_matrix4x4*) buf1909, (const rs_matrix4x4*) buf1910); + rsMatrixLoadMultiply((rs_matrix3x3*) buf1911, (const rs_matrix3x3*) buf1912, (const rs_matrix3x3*) buf1913); + rsMatrixLoadMultiply((rs_matrix2x2*) buf1914, (const rs_matrix2x2*) buf1915, (const rs_matrix2x2*) buf1916); + rsMatrixLoadOrtho((rs_matrix4x4*) buf1917, *(float*)buf1918, *(float*)buf1919, *(float*)buf1920, *(float*)buf1921, *(float*)buf1922, *(float*)buf1923); + rsMatrixLoadPerspective((rs_matrix4x4*) buf1924, *(float*)buf1925, *(float*)buf1926, *(float*)buf1927, *(float*)buf1928); + rsMatrixLoadRotate((rs_matrix4x4*) buf1929, *(float*)buf1930, *(float*)buf1931, *(float*)buf1932, *(float*)buf1933); + rsMatrixLoadScale((rs_matrix4x4*) buf1934, *(float*)buf1935, *(float*)buf1936, *(float*)buf1937); + rsMatrixLoadTranslate((rs_matrix4x4*) buf1938, *(float*)buf1939, *(float*)buf1940, *(float*)buf1941); + rsMatrixMultiply((rs_matrix4x4*) buf1942, (const rs_matrix4x4*) buf1943); + rsMatrixMultiply((rs_matrix3x3*) buf1944, (const rs_matrix3x3*) buf1945); + rsMatrixMultiply((rs_matrix2x2*) buf1946, (const rs_matrix2x2*) buf1947); + *(float4*)buf1948 = rsMatrixMultiply((rs_matrix4x4*) buf1949, *(float4*)buf1950); + *(float4*)buf1951 = rsMatrixMultiply((rs_matrix4x4*) buf1952, *(float3*)buf1953); + *(float4*)buf1954 = rsMatrixMultiply((rs_matrix4x4*) buf1955, *(float2*)buf1956); + *(float3*)buf1957 = rsMatrixMultiply((rs_matrix3x3*) buf1958, *(float3*)buf1959); + *(float3*)buf1960 = rsMatrixMultiply((rs_matrix3x3*) buf1961, *(float2*)buf1962); + *(float2*)buf1963 = rsMatrixMultiply((rs_matrix2x2*) buf1964, *(float2*)buf1965); + rsMatrixRotate((rs_matrix4x4*) buf1966, *(float*)buf1967, *(float*)buf1968, *(float*)buf1969, *(float*)buf1970); + rsMatrixScale((rs_matrix4x4*) buf1971, *(float*)buf1972, *(float*)buf1973, *(float*)buf1974); + rsMatrixSet((rs_matrix4x4*) buf1975, *(uint32_t*)buf1976, *(uint32_t*)buf1977, *(float*)buf1978); + rsMatrixSet((rs_matrix3x3*) buf1979, *(uint32_t*)buf1980, *(uint32_t*)buf1981, *(float*)buf1982); + rsMatrixSet((rs_matrix2x2*) buf1983, *(uint32_t*)buf1984, *(uint32_t*)buf1985, *(float*)buf1986); + rsMatrixTranslate((rs_matrix4x4*) buf1987, *(float*)buf1988, *(float*)buf1989, *(float*)buf1990); + rsMatrixTranspose((rs_matrix4x4*) buf1991); + rsMatrixTranspose((rs_matrix3x3*) buf1992); + rsMatrixTranspose((rs_matrix2x2*) buf1993); + *(uchar4*)buf1994 = rsPackColorTo8888(*(float*)buf1995, *(float*)buf1996, *(float*)buf1997); + *(uchar4*)buf1998 = rsPackColorTo8888(*(float*)buf1999, *(float*)buf2000, *(float*)buf2001, *(float*)buf2002); + *(uchar4*)buf2003 = rsPackColorTo8888(*(float3*)buf2004); + *(uchar4*)buf2005 = rsPackColorTo8888(*(float4*)buf2006); + rsQuaternionAdd((rs_quaternion*) buf2007, (const rs_quaternion*) buf2008); + rsQuaternionConjugate((rs_quaternion*) buf2009); + *(float*)buf2010 = rsQuaternionDot((const rs_quaternion*) buf2011, (const rs_quaternion*) buf2012); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2013, (const rs_quaternion*) buf2014); + rsQuaternionLoadRotate((rs_quaternion*) buf2015, *(float*)buf2016, *(float*)buf2017, *(float*)buf2018, *(float*)buf2019); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2020, *(float*)buf2021, *(float*)buf2022, *(float*)buf2023, *(float*)buf2024); + rsQuaternionMultiply((rs_quaternion*) buf2025, *(float*)buf2026); + rsQuaternionMultiply((rs_quaternion*) buf2027, (const rs_quaternion*) buf2028); + rsQuaternionNormalize((rs_quaternion*) buf2029); + rsQuaternionSet((rs_quaternion*) buf2030, *(float*)buf2031, *(float*)buf2032, *(float*)buf2033, *(float*)buf2034); + rsQuaternionSet((rs_quaternion*) buf2035, (const rs_quaternion*) buf2036); + rsQuaternionSlerp((rs_quaternion*) buf2037, (const rs_quaternion*) buf2038, (const rs_quaternion*) buf2039, *(float*)buf2040); + *(int*)buf2041 = rsRand(*(int*)buf2042); + *(int*)buf2043 = rsRand(*(int*)buf2044, *(int*)buf2045); + *(float*)buf2046 = rsRand(*(float*)buf2047); + *(float*)buf2048 = rsRand(*(float*)buf2049, *(float*)buf2050); + *(bool*)buf2051 = rsSendToClient(*(int*)buf2052); + *(bool*)buf2053 = rsSendToClient(*(int*)buf2054, (const void*) buf2055, *(uint*)buf2056); + rsSendToClientBlocking(*(int*)buf2057); + rsSendToClientBlocking(*(int*)buf2058, (const void*) buf2059, *(uint*)buf2060); + rsSetObject((rs_element*) buf2061, *(rs_element*)buf2062); + rsSetObject((rs_type*) buf2063, *(rs_type*)buf2064); + rsSetObject((rs_allocation*) buf2065, *(rs_allocation*)buf2066); + rsSetObject((rs_sampler*) buf2067, *(rs_sampler*)buf2068); + rsSetObject((rs_script*) buf2069, *(rs_script*)buf2070); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2071, *(rs_mesh*)buf2072); + rsSetObject((rs_program_fragment*) buf2073, *(rs_program_fragment*)buf2074); + rsSetObject((rs_program_vertex*) buf2075, *(rs_program_vertex*)buf2076); + rsSetObject((rs_program_raster*) buf2077, *(rs_program_raster*)buf2078); + rsSetObject((rs_program_store*) buf2079, *(rs_program_store*)buf2080); + rsSetObject((rs_font*) buf2081, *(rs_font*)buf2082); +#endif + *(rs_time_t*)buf2083 = rsTime((rs_time_t*) buf2084); + *(float4*)buf2085 = rsUnpackColor8888(*(uchar4*)buf2086); + *(int64_t*)buf2087 = rsUptimeMillis(); + *(int64_t*)buf2088 = rsUptimeNanos(); + *(float4*)buf2089 = rsYuvToRGBA_float4(*(uchar*)buf2090, *(uchar*)buf2091, *(uchar*)buf2092); + *(uchar4*)buf2093 = rsYuvToRGBA_uchar4(*(uchar*)buf2094, *(uchar*)buf2095, *(uchar*)buf2096); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2097); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2098, *(uint*)buf2099, *(rs_allocation*)buf2100); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2101, *(uint*)buf2102, *(rs_allocation*)buf2103); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2104); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2105); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2106); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2107); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2108); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2109, *(uint*)buf2110, *(rs_sampler*)buf2111); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2112, *(uint*)buf2113, *(rs_allocation*)buf2114); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2115, *(float*)buf2116, *(float*)buf2117, *(float*)buf2118); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2119); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2120); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2121, *(uint*)buf2122); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2123, *(uint*)buf2124, *(uint*)buf2125, *(uint*)buf2126); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2127, *(float*)buf2128, *(float*)buf2129, *(float*)buf2130, *(float*)buf2131, *(float*)buf2132, *(float*)buf2133, *(float*)buf2134, *(float*)buf2135, *(float*)buf2136, *(float*)buf2137, *(float*)buf2138); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2139, *(float*)buf2140, *(float*)buf2141, *(float*)buf2142, *(float*)buf2143, *(float*)buf2144, *(float*)buf2145, *(float*)buf2146, *(float*)buf2147, *(float*)buf2148, *(float*)buf2149, *(float*)buf2150, *(float*)buf2151, *(float*)buf2152, *(float*)buf2153, *(float*)buf2154, *(float*)buf2155, *(float*)buf2156, *(float*)buf2157, *(float*)buf2158); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2159, *(float*)buf2160, *(float*)buf2161, *(float*)buf2162, *(float*)buf2163); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2164, *(float*)buf2165, *(float*)buf2166, *(float*)buf2167, *(float*)buf2168); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2169, *(int*)buf2170, *(int*)buf2171); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2172, *(int*)buf2173, *(int*)buf2174); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2175, *(float*)buf2176, *(float*)buf2177, *(float*)buf2178); +#endif +#ifndef __LP64__ + *(uint*)buf2179 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2180 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2181, (int*) buf2182, (int*) buf2183, (int*) buf2184, (int*) buf2185); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2186, (int*) buf2187, (int*) buf2188, (int*) buf2189, (int*) buf2190); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2191, (float*) buf2192, (float*) buf2193, (float*) buf2194, (float*) buf2195, (float*) buf2196, (float*) buf2197); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2198, (float3*) buf2199, (float3*) buf2200); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf2201, *(float*)buf2202, *(float*)buf2203, *(float*)buf2204, *(float*)buf2205); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf2206); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf2207); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf2208); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf2209); +#endif + *(float*)buf2210 = rsqrt(*(float*)buf2211); + *(float2*)buf2212 = rsqrt(*(float2*)buf2213); + *(float3*)buf2214 = rsqrt(*(float3*)buf2215); + *(float4*)buf2216 = rsqrt(*(float4*)buf2217); + *(float*)buf2218 = sign(*(float*)buf2219); + *(float2*)buf2220 = sign(*(float2*)buf2221); + *(float3*)buf2222 = sign(*(float3*)buf2223); + *(float4*)buf2224 = sign(*(float4*)buf2225); + *(float*)buf2226 = sin(*(float*)buf2227); + *(float2*)buf2228 = sin(*(float2*)buf2229); + *(float3*)buf2230 = sin(*(float3*)buf2231); + *(float4*)buf2232 = sin(*(float4*)buf2233); + *(float*)buf2234 = sincos(*(float*)buf2235, (float*) buf2236); + *(float2*)buf2237 = sincos(*(float2*)buf2238, (float2*) buf2239); + *(float3*)buf2240 = sincos(*(float3*)buf2241, (float3*) buf2242); + *(float4*)buf2243 = sincos(*(float4*)buf2244, (float4*) buf2245); + *(float*)buf2246 = sinh(*(float*)buf2247); + *(float2*)buf2248 = sinh(*(float2*)buf2249); + *(float3*)buf2250 = sinh(*(float3*)buf2251); + *(float4*)buf2252 = sinh(*(float4*)buf2253); + *(float*)buf2254 = sinpi(*(float*)buf2255); + *(float2*)buf2256 = sinpi(*(float2*)buf2257); + *(float3*)buf2258 = sinpi(*(float3*)buf2259); + *(float4*)buf2260 = sinpi(*(float4*)buf2261); + *(float*)buf2262 = sqrt(*(float*)buf2263); + *(float2*)buf2264 = sqrt(*(float2*)buf2265); + *(float3*)buf2266 = sqrt(*(float3*)buf2267); + *(float4*)buf2268 = sqrt(*(float4*)buf2269); + *(float*)buf2270 = step(*(float*)buf2271, *(float*)buf2272); + *(float2*)buf2273 = step(*(float2*)buf2274, *(float2*)buf2275); + *(float3*)buf2276 = step(*(float3*)buf2277, *(float3*)buf2278); + *(float4*)buf2279 = step(*(float4*)buf2280, *(float4*)buf2281); + *(float2*)buf2282 = step(*(float2*)buf2283, *(float*)buf2284); + *(float3*)buf2285 = step(*(float3*)buf2286, *(float*)buf2287); + *(float4*)buf2288 = step(*(float4*)buf2289, *(float*)buf2290); + *(float*)buf2291 = tan(*(float*)buf2292); + *(float2*)buf2293 = tan(*(float2*)buf2294); + *(float3*)buf2295 = tan(*(float3*)buf2296); + *(float4*)buf2297 = tan(*(float4*)buf2298); + *(float*)buf2299 = tanh(*(float*)buf2300); + *(float2*)buf2301 = tanh(*(float2*)buf2302); + *(float3*)buf2303 = tanh(*(float3*)buf2304); + *(float4*)buf2305 = tanh(*(float4*)buf2306); + *(float*)buf2307 = tanpi(*(float*)buf2308); + *(float2*)buf2309 = tanpi(*(float2*)buf2310); + *(float3*)buf2311 = tanpi(*(float3*)buf2312); + *(float4*)buf2313 = tanpi(*(float4*)buf2314); + *(float*)buf2315 = tgamma(*(float*)buf2316); + *(float2*)buf2317 = tgamma(*(float2*)buf2318); + *(float3*)buf2319 = tgamma(*(float3*)buf2320); + *(float4*)buf2321 = tgamma(*(float4*)buf2322); + *(float*)buf2323 = trunc(*(float*)buf2324); + *(float2*)buf2325 = trunc(*(float2*)buf2326); + *(float3*)buf2327 = trunc(*(float3*)buf2328); + *(float4*)buf2329 = trunc(*(float4*)buf2330); +}
diff --git a/slang/tests/P_all_api_12/stderr.txt.expect b/slang/tests/P_all_api_12/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_12/stderr.txt.expect
diff --git a/slang/tests/P_all_api_12/stdout.txt.expect b/slang/tests/P_all_api_12/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_12/stdout.txt.expect
diff --git a/slang/tests/P_all_api_13/all13.rs b/slang/tests/P_all_api_13/all13.rs new file mode 100644 index 0000000..0e14e1a --- /dev/null +++ b/slang/tests/P_all_api_13/all13.rs
@@ -0,0 +1,3296 @@ +// -target-api 13 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; + +void root(const int* in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fdim(*(float*)buf637, *(float*)buf638); + *(float2*)buf639 = fdim(*(float2*)buf640, *(float2*)buf641); + *(float3*)buf642 = fdim(*(float3*)buf643, *(float3*)buf644); + *(float4*)buf645 = fdim(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = floor(*(float*)buf649); + *(float2*)buf650 = floor(*(float2*)buf651); + *(float3*)buf652 = floor(*(float3*)buf653); + *(float4*)buf654 = floor(*(float4*)buf655); + *(float*)buf656 = fma(*(float*)buf657, *(float*)buf658, *(float*)buf659); + *(float2*)buf660 = fma(*(float2*)buf661, *(float2*)buf662, *(float2*)buf663); + *(float3*)buf664 = fma(*(float3*)buf665, *(float3*)buf666, *(float3*)buf667); + *(float4*)buf668 = fma(*(float4*)buf669, *(float4*)buf670, *(float4*)buf671); + *(float*)buf672 = fmax(*(float*)buf673, *(float*)buf674); + *(float2*)buf675 = fmax(*(float2*)buf676, *(float2*)buf677); + *(float3*)buf678 = fmax(*(float3*)buf679, *(float3*)buf680); + *(float4*)buf681 = fmax(*(float4*)buf682, *(float4*)buf683); + *(float2*)buf684 = fmax(*(float2*)buf685, *(float*)buf686); + *(float3*)buf687 = fmax(*(float3*)buf688, *(float*)buf689); + *(float4*)buf690 = fmax(*(float4*)buf691, *(float*)buf692); + *(float*)buf693 = fmin(*(float*)buf694, *(float*)buf695); + *(float2*)buf696 = fmin(*(float2*)buf697, *(float2*)buf698); + *(float3*)buf699 = fmin(*(float3*)buf700, *(float3*)buf701); + *(float4*)buf702 = fmin(*(float4*)buf703, *(float4*)buf704); + *(float2*)buf705 = fmin(*(float2*)buf706, *(float*)buf707); + *(float3*)buf708 = fmin(*(float3*)buf709, *(float*)buf710); + *(float4*)buf711 = fmin(*(float4*)buf712, *(float*)buf713); + *(float*)buf714 = fmod(*(float*)buf715, *(float*)buf716); + *(float2*)buf717 = fmod(*(float2*)buf718, *(float2*)buf719); + *(float3*)buf720 = fmod(*(float3*)buf721, *(float3*)buf722); + *(float4*)buf723 = fmod(*(float4*)buf724, *(float4*)buf725); + *(float*)buf726 = fract(*(float*)buf727, (float*) buf728); + *(float2*)buf729 = fract(*(float2*)buf730, (float2*) buf731); + *(float3*)buf732 = fract(*(float3*)buf733, (float3*) buf734); + *(float4*)buf735 = fract(*(float4*)buf736, (float4*) buf737); + *(float*)buf738 = fract(*(float*)buf739); + *(float2*)buf740 = fract(*(float2*)buf741); + *(float3*)buf742 = fract(*(float3*)buf743); + *(float4*)buf744 = fract(*(float4*)buf745); + *(float*)buf746 = frexp(*(float*)buf747, (int*) buf748); + *(float2*)buf749 = frexp(*(float2*)buf750, (int2*) buf751); + *(float3*)buf752 = frexp(*(float3*)buf753, (int3*) buf754); + *(float4*)buf755 = frexp(*(float4*)buf756, (int4*) buf757); + *(float*)buf758 = hypot(*(float*)buf759, *(float*)buf760); + *(float2*)buf761 = hypot(*(float2*)buf762, *(float2*)buf763); + *(float3*)buf764 = hypot(*(float3*)buf765, *(float3*)buf766); + *(float4*)buf767 = hypot(*(float4*)buf768, *(float4*)buf769); + *(int*)buf770 = ilogb(*(float*)buf771); + *(int2*)buf772 = ilogb(*(float2*)buf773); + *(int3*)buf774 = ilogb(*(float3*)buf775); + *(int4*)buf776 = ilogb(*(float4*)buf777); + *(float*)buf778 = ldexp(*(float*)buf779, *(int*)buf780); + *(float2*)buf781 = ldexp(*(float2*)buf782, *(int2*)buf783); + *(float3*)buf784 = ldexp(*(float3*)buf785, *(int3*)buf786); + *(float4*)buf787 = ldexp(*(float4*)buf788, *(int4*)buf789); + *(float2*)buf790 = ldexp(*(float2*)buf791, *(int*)buf792); + *(float3*)buf793 = ldexp(*(float3*)buf794, *(int*)buf795); + *(float4*)buf796 = ldexp(*(float4*)buf797, *(int*)buf798); + *(float*)buf799 = length(*(float*)buf800); + *(float*)buf801 = length(*(float2*)buf802); + *(float*)buf803 = length(*(float3*)buf804); + *(float*)buf805 = length(*(float4*)buf806); + *(float*)buf807 = lgamma(*(float*)buf808); + *(float2*)buf809 = lgamma(*(float2*)buf810); + *(float3*)buf811 = lgamma(*(float3*)buf812); + *(float4*)buf813 = lgamma(*(float4*)buf814); + *(float*)buf815 = lgamma(*(float*)buf816, (int*) buf817); + *(float2*)buf818 = lgamma(*(float2*)buf819, (int2*) buf820); + *(float3*)buf821 = lgamma(*(float3*)buf822, (int3*) buf823); + *(float4*)buf824 = lgamma(*(float4*)buf825, (int4*) buf826); + *(float*)buf827 = log(*(float*)buf828); + *(float2*)buf829 = log(*(float2*)buf830); + *(float3*)buf831 = log(*(float3*)buf832); + *(float4*)buf833 = log(*(float4*)buf834); + *(float*)buf835 = log10(*(float*)buf836); + *(float2*)buf837 = log10(*(float2*)buf838); + *(float3*)buf839 = log10(*(float3*)buf840); + *(float4*)buf841 = log10(*(float4*)buf842); + *(float*)buf843 = log1p(*(float*)buf844); + *(float2*)buf845 = log1p(*(float2*)buf846); + *(float3*)buf847 = log1p(*(float3*)buf848); + *(float4*)buf849 = log1p(*(float4*)buf850); + *(float*)buf851 = log2(*(float*)buf852); + *(float2*)buf853 = log2(*(float2*)buf854); + *(float3*)buf855 = log2(*(float3*)buf856); + *(float4*)buf857 = log2(*(float4*)buf858); + *(float*)buf859 = logb(*(float*)buf860); + *(float2*)buf861 = logb(*(float2*)buf862); + *(float3*)buf863 = logb(*(float3*)buf864); + *(float4*)buf865 = logb(*(float4*)buf866); + *(float*)buf867 = mad(*(float*)buf868, *(float*)buf869, *(float*)buf870); + *(float2*)buf871 = mad(*(float2*)buf872, *(float2*)buf873, *(float2*)buf874); + *(float3*)buf875 = mad(*(float3*)buf876, *(float3*)buf877, *(float3*)buf878); + *(float4*)buf879 = mad(*(float4*)buf880, *(float4*)buf881, *(float4*)buf882); + *(float*)buf883 = max(*(float*)buf884, *(float*)buf885); + *(float2*)buf886 = max(*(float2*)buf887, *(float2*)buf888); + *(float3*)buf889 = max(*(float3*)buf890, *(float3*)buf891); + *(float4*)buf892 = max(*(float4*)buf893, *(float4*)buf894); + *(float2*)buf895 = max(*(float2*)buf896, *(float*)buf897); + *(float3*)buf898 = max(*(float3*)buf899, *(float*)buf900); + *(float4*)buf901 = max(*(float4*)buf902, *(float*)buf903); + *(char*)buf904 = max(*(char*)buf905, *(char*)buf906); + *(uchar*)buf907 = max(*(uchar*)buf908, *(uchar*)buf909); + *(short*)buf910 = max(*(short*)buf911, *(short*)buf912); + *(ushort*)buf913 = max(*(ushort*)buf914, *(ushort*)buf915); + *(int*)buf916 = max(*(int*)buf917, *(int*)buf918); + *(uint*)buf919 = max(*(uint*)buf920, *(uint*)buf921); + *(char2*)buf922 = max(*(char2*)buf923, *(char2*)buf924); + *(uchar2*)buf925 = max(*(uchar2*)buf926, *(uchar2*)buf927); + *(short2*)buf928 = max(*(short2*)buf929, *(short2*)buf930); + *(ushort2*)buf931 = max(*(ushort2*)buf932, *(ushort2*)buf933); + *(int2*)buf934 = max(*(int2*)buf935, *(int2*)buf936); + *(uint2*)buf937 = max(*(uint2*)buf938, *(uint2*)buf939); + *(char3*)buf940 = max(*(char3*)buf941, *(char3*)buf942); + *(uchar3*)buf943 = max(*(uchar3*)buf944, *(uchar3*)buf945); + *(short3*)buf946 = max(*(short3*)buf947, *(short3*)buf948); + *(ushort3*)buf949 = max(*(ushort3*)buf950, *(ushort3*)buf951); + *(int3*)buf952 = max(*(int3*)buf953, *(int3*)buf954); + *(uint3*)buf955 = max(*(uint3*)buf956, *(uint3*)buf957); + *(char4*)buf958 = max(*(char4*)buf959, *(char4*)buf960); + *(uchar4*)buf961 = max(*(uchar4*)buf962, *(uchar4*)buf963); + *(short4*)buf964 = max(*(short4*)buf965, *(short4*)buf966); + *(ushort4*)buf967 = max(*(ushort4*)buf968, *(ushort4*)buf969); + *(int4*)buf970 = max(*(int4*)buf971, *(int4*)buf972); + *(uint4*)buf973 = max(*(uint4*)buf974, *(uint4*)buf975); + *(float*)buf976 = min(*(float*)buf977, *(float*)buf978); + *(float2*)buf979 = min(*(float2*)buf980, *(float2*)buf981); + *(float3*)buf982 = min(*(float3*)buf983, *(float3*)buf984); + *(float4*)buf985 = min(*(float4*)buf986, *(float4*)buf987); + *(float2*)buf988 = min(*(float2*)buf989, *(float*)buf990); + *(float3*)buf991 = min(*(float3*)buf992, *(float*)buf993); + *(float4*)buf994 = min(*(float4*)buf995, *(float*)buf996); + *(char*)buf997 = min(*(char*)buf998, *(char*)buf999); + *(uchar*)buf1000 = min(*(uchar*)buf1001, *(uchar*)buf1002); + *(short*)buf1003 = min(*(short*)buf1004, *(short*)buf1005); + *(ushort*)buf1006 = min(*(ushort*)buf1007, *(ushort*)buf1008); + *(int*)buf1009 = min(*(int*)buf1010, *(int*)buf1011); + *(uint*)buf1012 = min(*(uint*)buf1013, *(uint*)buf1014); + *(char2*)buf1015 = min(*(char2*)buf1016, *(char2*)buf1017); + *(uchar2*)buf1018 = min(*(uchar2*)buf1019, *(uchar2*)buf1020); + *(short2*)buf1021 = min(*(short2*)buf1022, *(short2*)buf1023); + *(ushort2*)buf1024 = min(*(ushort2*)buf1025, *(ushort2*)buf1026); + *(int2*)buf1027 = min(*(int2*)buf1028, *(int2*)buf1029); + *(uint2*)buf1030 = min(*(uint2*)buf1031, *(uint2*)buf1032); + *(char3*)buf1033 = min(*(char3*)buf1034, *(char3*)buf1035); + *(uchar3*)buf1036 = min(*(uchar3*)buf1037, *(uchar3*)buf1038); + *(short3*)buf1039 = min(*(short3*)buf1040, *(short3*)buf1041); + *(ushort3*)buf1042 = min(*(ushort3*)buf1043, *(ushort3*)buf1044); + *(int3*)buf1045 = min(*(int3*)buf1046, *(int3*)buf1047); + *(uint3*)buf1048 = min(*(uint3*)buf1049, *(uint3*)buf1050); + *(char4*)buf1051 = min(*(char4*)buf1052, *(char4*)buf1053); + *(uchar4*)buf1054 = min(*(uchar4*)buf1055, *(uchar4*)buf1056); + *(short4*)buf1057 = min(*(short4*)buf1058, *(short4*)buf1059); + *(ushort4*)buf1060 = min(*(ushort4*)buf1061, *(ushort4*)buf1062); + *(int4*)buf1063 = min(*(int4*)buf1064, *(int4*)buf1065); + *(uint4*)buf1066 = min(*(uint4*)buf1067, *(uint4*)buf1068); + *(float*)buf1069 = mix(*(float*)buf1070, *(float*)buf1071, *(float*)buf1072); + *(float2*)buf1073 = mix(*(float2*)buf1074, *(float2*)buf1075, *(float2*)buf1076); + *(float3*)buf1077 = mix(*(float3*)buf1078, *(float3*)buf1079, *(float3*)buf1080); + *(float4*)buf1081 = mix(*(float4*)buf1082, *(float4*)buf1083, *(float4*)buf1084); + *(float2*)buf1085 = mix(*(float2*)buf1086, *(float2*)buf1087, *(float*)buf1088); + *(float3*)buf1089 = mix(*(float3*)buf1090, *(float3*)buf1091, *(float*)buf1092); + *(float4*)buf1093 = mix(*(float4*)buf1094, *(float4*)buf1095, *(float*)buf1096); + *(float*)buf1097 = modf(*(float*)buf1098, (float*) buf1099); + *(float2*)buf1100 = modf(*(float2*)buf1101, (float2*) buf1102); + *(float3*)buf1103 = modf(*(float3*)buf1104, (float3*) buf1105); + *(float4*)buf1106 = modf(*(float4*)buf1107, (float4*) buf1108); + *(float*)buf1109 = nan(*(uint*)buf1110); + *(float*)buf1111 = nextafter(*(float*)buf1112, *(float*)buf1113); + *(float2*)buf1114 = nextafter(*(float2*)buf1115, *(float2*)buf1116); + *(float3*)buf1117 = nextafter(*(float3*)buf1118, *(float3*)buf1119); + *(float4*)buf1120 = nextafter(*(float4*)buf1121, *(float4*)buf1122); + *(float*)buf1123 = normalize(*(float*)buf1124); + *(float2*)buf1125 = normalize(*(float2*)buf1126); + *(float3*)buf1127 = normalize(*(float3*)buf1128); + *(float4*)buf1129 = normalize(*(float4*)buf1130); + *(float*)buf1131 = pow(*(float*)buf1132, *(float*)buf1133); + *(float2*)buf1134 = pow(*(float2*)buf1135, *(float2*)buf1136); + *(float3*)buf1137 = pow(*(float3*)buf1138, *(float3*)buf1139); + *(float4*)buf1140 = pow(*(float4*)buf1141, *(float4*)buf1142); + *(float*)buf1143 = pown(*(float*)buf1144, *(int*)buf1145); + *(float2*)buf1146 = pown(*(float2*)buf1147, *(int2*)buf1148); + *(float3*)buf1149 = pown(*(float3*)buf1150, *(int3*)buf1151); + *(float4*)buf1152 = pown(*(float4*)buf1153, *(int4*)buf1154); + *(float*)buf1155 = powr(*(float*)buf1156, *(float*)buf1157); + *(float2*)buf1158 = powr(*(float2*)buf1159, *(float2*)buf1160); + *(float3*)buf1161 = powr(*(float3*)buf1162, *(float3*)buf1163); + *(float4*)buf1164 = powr(*(float4*)buf1165, *(float4*)buf1166); + *(float*)buf1167 = radians(*(float*)buf1168); + *(float2*)buf1169 = radians(*(float2*)buf1170); + *(float3*)buf1171 = radians(*(float3*)buf1172); + *(float4*)buf1173 = radians(*(float4*)buf1174); + *(float*)buf1175 = remainder(*(float*)buf1176, *(float*)buf1177); + *(float2*)buf1178 = remainder(*(float2*)buf1179, *(float2*)buf1180); + *(float3*)buf1181 = remainder(*(float3*)buf1182, *(float3*)buf1183); + *(float4*)buf1184 = remainder(*(float4*)buf1185, *(float4*)buf1186); + *(float*)buf1187 = remquo(*(float*)buf1188, *(float*)buf1189, (int*) buf1190); + *(float2*)buf1191 = remquo(*(float2*)buf1192, *(float2*)buf1193, (int2*) buf1194); + *(float3*)buf1195 = remquo(*(float3*)buf1196, *(float3*)buf1197, (int3*) buf1198); + *(float4*)buf1199 = remquo(*(float4*)buf1200, *(float4*)buf1201, (int4*) buf1202); + *(float*)buf1203 = rint(*(float*)buf1204); + *(float2*)buf1205 = rint(*(float2*)buf1206); + *(float3*)buf1207 = rint(*(float3*)buf1208); + *(float4*)buf1209 = rint(*(float4*)buf1210); + *(float*)buf1211 = rootn(*(float*)buf1212, *(int*)buf1213); + *(float2*)buf1214 = rootn(*(float2*)buf1215, *(int2*)buf1216); + *(float3*)buf1217 = rootn(*(float3*)buf1218, *(int3*)buf1219); + *(float4*)buf1220 = rootn(*(float4*)buf1221, *(int4*)buf1222); + *(float*)buf1223 = round(*(float*)buf1224); + *(float2*)buf1225 = round(*(float2*)buf1226); + *(float3*)buf1227 = round(*(float3*)buf1228); + *(float4*)buf1229 = round(*(float4*)buf1230); + *(uint32_t*)buf1231 = rsAllocationGetDimFaces(*(rs_allocation*)buf1232); + *(uint32_t*)buf1233 = rsAllocationGetDimLOD(*(rs_allocation*)buf1234); + *(uint32_t*)buf1235 = rsAllocationGetDimX(*(rs_allocation*)buf1236); + *(uint32_t*)buf1237 = rsAllocationGetDimY(*(rs_allocation*)buf1238); + *(uint32_t*)buf1239 = rsAllocationGetDimZ(*(rs_allocation*)buf1240); + *(rs_element*)buf1241 = rsAllocationGetElement(*(rs_allocation*)buf1242); + *(char*)buf1243 = rsClamp(*(char*)buf1244, *(char*)buf1245, *(char*)buf1246); + *(uchar*)buf1247 = rsClamp(*(uchar*)buf1248, *(uchar*)buf1249, *(uchar*)buf1250); + *(short*)buf1251 = rsClamp(*(short*)buf1252, *(short*)buf1253, *(short*)buf1254); + *(ushort*)buf1255 = rsClamp(*(ushort*)buf1256, *(ushort*)buf1257, *(ushort*)buf1258); + *(int*)buf1259 = rsClamp(*(int*)buf1260, *(int*)buf1261, *(int*)buf1262); + *(uint*)buf1263 = rsClamp(*(uint*)buf1264, *(uint*)buf1265, *(uint*)buf1266); + rsClearObject((rs_element*) buf1267); + rsClearObject((rs_type*) buf1268); + rsClearObject((rs_allocation*) buf1269); + rsClearObject((rs_sampler*) buf1270); + rsClearObject((rs_script*) buf1271); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1272); + rsClearObject((rs_program_fragment*) buf1273); + rsClearObject((rs_program_vertex*) buf1274); + rsClearObject((rs_program_raster*) buf1275); + rsClearObject((rs_program_store*) buf1276); + rsClearObject((rs_font*) buf1277); +#endif + rsDebug((const char*) buf1278, *(double*)buf1279); + rsDebug((const char*) buf1280, *(int*)buf1281); + rsDebug((const char*) buf1282, *(uint*)buf1283); + rsDebug((const char*) buf1284, *(long*)buf1285); + rsDebug((const char*) buf1286, *(ulong*)buf1287); + rsDebug((const char*) buf1288, *(float*)buf1289); + rsDebug((const char*) buf1290, *(float2*)buf1291); + rsDebug((const char*) buf1292, *(float3*)buf1293); + rsDebug((const char*) buf1294, *(float4*)buf1295); + rsDebug((const char*) buf1296, *(float*)buf1297, *(float*)buf1298); + rsDebug((const char*) buf1299, *(float*)buf1300, *(float*)buf1301, *(float*)buf1302); + rsDebug((const char*) buf1303, *(float*)buf1304, *(float*)buf1305, *(float*)buf1306, *(float*)buf1307); + rsDebug((const char*) buf1308, *(long long*)buf1309); + rsDebug((const char*) buf1310, *(unsigned long long*)buf1311); + rsDebug((const char*) buf1312, (const void*) buf1313); + rsDebug((const char*) buf1314, (const rs_matrix4x4*) buf1315); + rsDebug((const char*) buf1316, (const rs_matrix3x3*) buf1317); + rsDebug((const char*) buf1318, (const rs_matrix2x2*) buf1319); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1320, (float4*) buf1321, (float4*) buf1322, (float4*) buf1323, (float4*) buf1324, (float4*) buf1325, (float4*) buf1326); + rsForEach(*(rs_script*)buf1327, *(rs_allocation*)buf1328, *(rs_allocation*)buf1329, (const void*) buf1330, (const rs_script_call_t*) buf1331); + rsForEach(*(rs_script*)buf1332, *(rs_allocation*)buf1333, *(rs_allocation*)buf1334, (const void*) buf1335); + *(float*)buf1336 = rsFrac(*(float*)buf1337); + *(rs_allocation*)buf1338 = rsGetAllocation((const void*) buf1339); + *(float*)buf1340 = rsGetDt(); + *(const void**)buf1341 = rsGetElementAt(*(rs_allocation*)buf1342, *(uint32_t*)buf1343); + *(const void**)buf1344 = rsGetElementAt(*(rs_allocation*)buf1345, *(uint32_t*)buf1346, *(uint32_t*)buf1347); + *(const void**)buf1348 = rsGetElementAt(*(rs_allocation*)buf1349, *(uint32_t*)buf1350, *(uint32_t*)buf1351, *(uint32_t*)buf1352); + *(float*)buf1353 = rsGetElementAt_float(*(rs_allocation*)buf1354, *(uint32_t*)buf1355); + *(float2*)buf1356 = rsGetElementAt_float2(*(rs_allocation*)buf1357, *(uint32_t*)buf1358); + *(float3*)buf1359 = rsGetElementAt_float3(*(rs_allocation*)buf1360, *(uint32_t*)buf1361); + *(float4*)buf1362 = rsGetElementAt_float4(*(rs_allocation*)buf1363, *(uint32_t*)buf1364); + *(double*)buf1365 = rsGetElementAt_double(*(rs_allocation*)buf1366, *(uint32_t*)buf1367); + *(double2*)buf1368 = rsGetElementAt_double2(*(rs_allocation*)buf1369, *(uint32_t*)buf1370); + *(double3*)buf1371 = rsGetElementAt_double3(*(rs_allocation*)buf1372, *(uint32_t*)buf1373); + *(double4*)buf1374 = rsGetElementAt_double4(*(rs_allocation*)buf1375, *(uint32_t*)buf1376); + *(char*)buf1377 = rsGetElementAt_char(*(rs_allocation*)buf1378, *(uint32_t*)buf1379); + *(char2*)buf1380 = rsGetElementAt_char2(*(rs_allocation*)buf1381, *(uint32_t*)buf1382); + *(char3*)buf1383 = rsGetElementAt_char3(*(rs_allocation*)buf1384, *(uint32_t*)buf1385); + *(char4*)buf1386 = rsGetElementAt_char4(*(rs_allocation*)buf1387, *(uint32_t*)buf1388); + *(uchar*)buf1389 = rsGetElementAt_uchar(*(rs_allocation*)buf1390, *(uint32_t*)buf1391); + *(uchar2*)buf1392 = rsGetElementAt_uchar2(*(rs_allocation*)buf1393, *(uint32_t*)buf1394); + *(uchar3*)buf1395 = rsGetElementAt_uchar3(*(rs_allocation*)buf1396, *(uint32_t*)buf1397); + *(uchar4*)buf1398 = rsGetElementAt_uchar4(*(rs_allocation*)buf1399, *(uint32_t*)buf1400); + *(short*)buf1401 = rsGetElementAt_short(*(rs_allocation*)buf1402, *(uint32_t*)buf1403); + *(short2*)buf1404 = rsGetElementAt_short2(*(rs_allocation*)buf1405, *(uint32_t*)buf1406); + *(short3*)buf1407 = rsGetElementAt_short3(*(rs_allocation*)buf1408, *(uint32_t*)buf1409); + *(short4*)buf1410 = rsGetElementAt_short4(*(rs_allocation*)buf1411, *(uint32_t*)buf1412); + *(ushort*)buf1413 = rsGetElementAt_ushort(*(rs_allocation*)buf1414, *(uint32_t*)buf1415); + *(ushort2*)buf1416 = rsGetElementAt_ushort2(*(rs_allocation*)buf1417, *(uint32_t*)buf1418); + *(ushort3*)buf1419 = rsGetElementAt_ushort3(*(rs_allocation*)buf1420, *(uint32_t*)buf1421); + *(ushort4*)buf1422 = rsGetElementAt_ushort4(*(rs_allocation*)buf1423, *(uint32_t*)buf1424); + *(int*)buf1425 = rsGetElementAt_int(*(rs_allocation*)buf1426, *(uint32_t*)buf1427); + *(int2*)buf1428 = rsGetElementAt_int2(*(rs_allocation*)buf1429, *(uint32_t*)buf1430); + *(int3*)buf1431 = rsGetElementAt_int3(*(rs_allocation*)buf1432, *(uint32_t*)buf1433); + *(int4*)buf1434 = rsGetElementAt_int4(*(rs_allocation*)buf1435, *(uint32_t*)buf1436); + *(uint*)buf1437 = rsGetElementAt_uint(*(rs_allocation*)buf1438, *(uint32_t*)buf1439); + *(uint2*)buf1440 = rsGetElementAt_uint2(*(rs_allocation*)buf1441, *(uint32_t*)buf1442); + *(uint3*)buf1443 = rsGetElementAt_uint3(*(rs_allocation*)buf1444, *(uint32_t*)buf1445); + *(uint4*)buf1446 = rsGetElementAt_uint4(*(rs_allocation*)buf1447, *(uint32_t*)buf1448); + *(long*)buf1449 = rsGetElementAt_long(*(rs_allocation*)buf1450, *(uint32_t*)buf1451); + *(long2*)buf1452 = rsGetElementAt_long2(*(rs_allocation*)buf1453, *(uint32_t*)buf1454); + *(long3*)buf1455 = rsGetElementAt_long3(*(rs_allocation*)buf1456, *(uint32_t*)buf1457); + *(long4*)buf1458 = rsGetElementAt_long4(*(rs_allocation*)buf1459, *(uint32_t*)buf1460); + *(ulong*)buf1461 = rsGetElementAt_ulong(*(rs_allocation*)buf1462, *(uint32_t*)buf1463); + *(ulong2*)buf1464 = rsGetElementAt_ulong2(*(rs_allocation*)buf1465, *(uint32_t*)buf1466); + *(ulong3*)buf1467 = rsGetElementAt_ulong3(*(rs_allocation*)buf1468, *(uint32_t*)buf1469); + *(ulong4*)buf1470 = rsGetElementAt_ulong4(*(rs_allocation*)buf1471, *(uint32_t*)buf1472); + *(float*)buf1473 = rsGetElementAt_float(*(rs_allocation*)buf1474, *(uint32_t*)buf1475, *(uint32_t*)buf1476); + *(float2*)buf1477 = rsGetElementAt_float2(*(rs_allocation*)buf1478, *(uint32_t*)buf1479, *(uint32_t*)buf1480); + *(float3*)buf1481 = rsGetElementAt_float3(*(rs_allocation*)buf1482, *(uint32_t*)buf1483, *(uint32_t*)buf1484); + *(float4*)buf1485 = rsGetElementAt_float4(*(rs_allocation*)buf1486, *(uint32_t*)buf1487, *(uint32_t*)buf1488); + *(double*)buf1489 = rsGetElementAt_double(*(rs_allocation*)buf1490, *(uint32_t*)buf1491, *(uint32_t*)buf1492); + *(double2*)buf1493 = rsGetElementAt_double2(*(rs_allocation*)buf1494, *(uint32_t*)buf1495, *(uint32_t*)buf1496); + *(double3*)buf1497 = rsGetElementAt_double3(*(rs_allocation*)buf1498, *(uint32_t*)buf1499, *(uint32_t*)buf1500); + *(double4*)buf1501 = rsGetElementAt_double4(*(rs_allocation*)buf1502, *(uint32_t*)buf1503, *(uint32_t*)buf1504); + *(char*)buf1505 = rsGetElementAt_char(*(rs_allocation*)buf1506, *(uint32_t*)buf1507, *(uint32_t*)buf1508); + *(char2*)buf1509 = rsGetElementAt_char2(*(rs_allocation*)buf1510, *(uint32_t*)buf1511, *(uint32_t*)buf1512); + *(char3*)buf1513 = rsGetElementAt_char3(*(rs_allocation*)buf1514, *(uint32_t*)buf1515, *(uint32_t*)buf1516); + *(char4*)buf1517 = rsGetElementAt_char4(*(rs_allocation*)buf1518, *(uint32_t*)buf1519, *(uint32_t*)buf1520); + *(uchar*)buf1521 = rsGetElementAt_uchar(*(rs_allocation*)buf1522, *(uint32_t*)buf1523, *(uint32_t*)buf1524); + *(uchar2*)buf1525 = rsGetElementAt_uchar2(*(rs_allocation*)buf1526, *(uint32_t*)buf1527, *(uint32_t*)buf1528); + *(uchar3*)buf1529 = rsGetElementAt_uchar3(*(rs_allocation*)buf1530, *(uint32_t*)buf1531, *(uint32_t*)buf1532); + *(uchar4*)buf1533 = rsGetElementAt_uchar4(*(rs_allocation*)buf1534, *(uint32_t*)buf1535, *(uint32_t*)buf1536); + *(short*)buf1537 = rsGetElementAt_short(*(rs_allocation*)buf1538, *(uint32_t*)buf1539, *(uint32_t*)buf1540); + *(short2*)buf1541 = rsGetElementAt_short2(*(rs_allocation*)buf1542, *(uint32_t*)buf1543, *(uint32_t*)buf1544); + *(short3*)buf1545 = rsGetElementAt_short3(*(rs_allocation*)buf1546, *(uint32_t*)buf1547, *(uint32_t*)buf1548); + *(short4*)buf1549 = rsGetElementAt_short4(*(rs_allocation*)buf1550, *(uint32_t*)buf1551, *(uint32_t*)buf1552); + *(ushort*)buf1553 = rsGetElementAt_ushort(*(rs_allocation*)buf1554, *(uint32_t*)buf1555, *(uint32_t*)buf1556); + *(ushort2*)buf1557 = rsGetElementAt_ushort2(*(rs_allocation*)buf1558, *(uint32_t*)buf1559, *(uint32_t*)buf1560); + *(ushort3*)buf1561 = rsGetElementAt_ushort3(*(rs_allocation*)buf1562, *(uint32_t*)buf1563, *(uint32_t*)buf1564); + *(ushort4*)buf1565 = rsGetElementAt_ushort4(*(rs_allocation*)buf1566, *(uint32_t*)buf1567, *(uint32_t*)buf1568); + *(int*)buf1569 = rsGetElementAt_int(*(rs_allocation*)buf1570, *(uint32_t*)buf1571, *(uint32_t*)buf1572); + *(int2*)buf1573 = rsGetElementAt_int2(*(rs_allocation*)buf1574, *(uint32_t*)buf1575, *(uint32_t*)buf1576); + *(int3*)buf1577 = rsGetElementAt_int3(*(rs_allocation*)buf1578, *(uint32_t*)buf1579, *(uint32_t*)buf1580); + *(int4*)buf1581 = rsGetElementAt_int4(*(rs_allocation*)buf1582, *(uint32_t*)buf1583, *(uint32_t*)buf1584); + *(uint*)buf1585 = rsGetElementAt_uint(*(rs_allocation*)buf1586, *(uint32_t*)buf1587, *(uint32_t*)buf1588); + *(uint2*)buf1589 = rsGetElementAt_uint2(*(rs_allocation*)buf1590, *(uint32_t*)buf1591, *(uint32_t*)buf1592); + *(uint3*)buf1593 = rsGetElementAt_uint3(*(rs_allocation*)buf1594, *(uint32_t*)buf1595, *(uint32_t*)buf1596); + *(uint4*)buf1597 = rsGetElementAt_uint4(*(rs_allocation*)buf1598, *(uint32_t*)buf1599, *(uint32_t*)buf1600); + *(long*)buf1601 = rsGetElementAt_long(*(rs_allocation*)buf1602, *(uint32_t*)buf1603, *(uint32_t*)buf1604); + *(long2*)buf1605 = rsGetElementAt_long2(*(rs_allocation*)buf1606, *(uint32_t*)buf1607, *(uint32_t*)buf1608); + *(long3*)buf1609 = rsGetElementAt_long3(*(rs_allocation*)buf1610, *(uint32_t*)buf1611, *(uint32_t*)buf1612); + *(long4*)buf1613 = rsGetElementAt_long4(*(rs_allocation*)buf1614, *(uint32_t*)buf1615, *(uint32_t*)buf1616); + *(ulong*)buf1617 = rsGetElementAt_ulong(*(rs_allocation*)buf1618, *(uint32_t*)buf1619, *(uint32_t*)buf1620); + *(ulong2*)buf1621 = rsGetElementAt_ulong2(*(rs_allocation*)buf1622, *(uint32_t*)buf1623, *(uint32_t*)buf1624); + *(ulong3*)buf1625 = rsGetElementAt_ulong3(*(rs_allocation*)buf1626, *(uint32_t*)buf1627, *(uint32_t*)buf1628); + *(ulong4*)buf1629 = rsGetElementAt_ulong4(*(rs_allocation*)buf1630, *(uint32_t*)buf1631, *(uint32_t*)buf1632); + *(float*)buf1633 = rsGetElementAt_float(*(rs_allocation*)buf1634, *(uint32_t*)buf1635, *(uint32_t*)buf1636, *(uint32_t*)buf1637); + *(float2*)buf1638 = rsGetElementAt_float2(*(rs_allocation*)buf1639, *(uint32_t*)buf1640, *(uint32_t*)buf1641, *(uint32_t*)buf1642); + *(float3*)buf1643 = rsGetElementAt_float3(*(rs_allocation*)buf1644, *(uint32_t*)buf1645, *(uint32_t*)buf1646, *(uint32_t*)buf1647); + *(float4*)buf1648 = rsGetElementAt_float4(*(rs_allocation*)buf1649, *(uint32_t*)buf1650, *(uint32_t*)buf1651, *(uint32_t*)buf1652); + *(double*)buf1653 = rsGetElementAt_double(*(rs_allocation*)buf1654, *(uint32_t*)buf1655, *(uint32_t*)buf1656, *(uint32_t*)buf1657); + *(double2*)buf1658 = rsGetElementAt_double2(*(rs_allocation*)buf1659, *(uint32_t*)buf1660, *(uint32_t*)buf1661, *(uint32_t*)buf1662); + *(double3*)buf1663 = rsGetElementAt_double3(*(rs_allocation*)buf1664, *(uint32_t*)buf1665, *(uint32_t*)buf1666, *(uint32_t*)buf1667); + *(double4*)buf1668 = rsGetElementAt_double4(*(rs_allocation*)buf1669, *(uint32_t*)buf1670, *(uint32_t*)buf1671, *(uint32_t*)buf1672); + *(char*)buf1673 = rsGetElementAt_char(*(rs_allocation*)buf1674, *(uint32_t*)buf1675, *(uint32_t*)buf1676, *(uint32_t*)buf1677); + *(char2*)buf1678 = rsGetElementAt_char2(*(rs_allocation*)buf1679, *(uint32_t*)buf1680, *(uint32_t*)buf1681, *(uint32_t*)buf1682); + *(char3*)buf1683 = rsGetElementAt_char3(*(rs_allocation*)buf1684, *(uint32_t*)buf1685, *(uint32_t*)buf1686, *(uint32_t*)buf1687); + *(char4*)buf1688 = rsGetElementAt_char4(*(rs_allocation*)buf1689, *(uint32_t*)buf1690, *(uint32_t*)buf1691, *(uint32_t*)buf1692); + *(uchar*)buf1693 = rsGetElementAt_uchar(*(rs_allocation*)buf1694, *(uint32_t*)buf1695, *(uint32_t*)buf1696, *(uint32_t*)buf1697); + *(uchar2*)buf1698 = rsGetElementAt_uchar2(*(rs_allocation*)buf1699, *(uint32_t*)buf1700, *(uint32_t*)buf1701, *(uint32_t*)buf1702); + *(uchar3*)buf1703 = rsGetElementAt_uchar3(*(rs_allocation*)buf1704, *(uint32_t*)buf1705, *(uint32_t*)buf1706, *(uint32_t*)buf1707); + *(uchar4*)buf1708 = rsGetElementAt_uchar4(*(rs_allocation*)buf1709, *(uint32_t*)buf1710, *(uint32_t*)buf1711, *(uint32_t*)buf1712); + *(short*)buf1713 = rsGetElementAt_short(*(rs_allocation*)buf1714, *(uint32_t*)buf1715, *(uint32_t*)buf1716, *(uint32_t*)buf1717); + *(short2*)buf1718 = rsGetElementAt_short2(*(rs_allocation*)buf1719, *(uint32_t*)buf1720, *(uint32_t*)buf1721, *(uint32_t*)buf1722); + *(short3*)buf1723 = rsGetElementAt_short3(*(rs_allocation*)buf1724, *(uint32_t*)buf1725, *(uint32_t*)buf1726, *(uint32_t*)buf1727); + *(short4*)buf1728 = rsGetElementAt_short4(*(rs_allocation*)buf1729, *(uint32_t*)buf1730, *(uint32_t*)buf1731, *(uint32_t*)buf1732); + *(ushort*)buf1733 = rsGetElementAt_ushort(*(rs_allocation*)buf1734, *(uint32_t*)buf1735, *(uint32_t*)buf1736, *(uint32_t*)buf1737); + *(ushort2*)buf1738 = rsGetElementAt_ushort2(*(rs_allocation*)buf1739, *(uint32_t*)buf1740, *(uint32_t*)buf1741, *(uint32_t*)buf1742); + *(ushort3*)buf1743 = rsGetElementAt_ushort3(*(rs_allocation*)buf1744, *(uint32_t*)buf1745, *(uint32_t*)buf1746, *(uint32_t*)buf1747); + *(ushort4*)buf1748 = rsGetElementAt_ushort4(*(rs_allocation*)buf1749, *(uint32_t*)buf1750, *(uint32_t*)buf1751, *(uint32_t*)buf1752); + *(int*)buf1753 = rsGetElementAt_int(*(rs_allocation*)buf1754, *(uint32_t*)buf1755, *(uint32_t*)buf1756, *(uint32_t*)buf1757); + *(int2*)buf1758 = rsGetElementAt_int2(*(rs_allocation*)buf1759, *(uint32_t*)buf1760, *(uint32_t*)buf1761, *(uint32_t*)buf1762); + *(int3*)buf1763 = rsGetElementAt_int3(*(rs_allocation*)buf1764, *(uint32_t*)buf1765, *(uint32_t*)buf1766, *(uint32_t*)buf1767); + *(int4*)buf1768 = rsGetElementAt_int4(*(rs_allocation*)buf1769, *(uint32_t*)buf1770, *(uint32_t*)buf1771, *(uint32_t*)buf1772); + *(uint*)buf1773 = rsGetElementAt_uint(*(rs_allocation*)buf1774, *(uint32_t*)buf1775, *(uint32_t*)buf1776, *(uint32_t*)buf1777); + *(uint2*)buf1778 = rsGetElementAt_uint2(*(rs_allocation*)buf1779, *(uint32_t*)buf1780, *(uint32_t*)buf1781, *(uint32_t*)buf1782); + *(uint3*)buf1783 = rsGetElementAt_uint3(*(rs_allocation*)buf1784, *(uint32_t*)buf1785, *(uint32_t*)buf1786, *(uint32_t*)buf1787); + *(uint4*)buf1788 = rsGetElementAt_uint4(*(rs_allocation*)buf1789, *(uint32_t*)buf1790, *(uint32_t*)buf1791, *(uint32_t*)buf1792); + *(long*)buf1793 = rsGetElementAt_long(*(rs_allocation*)buf1794, *(uint32_t*)buf1795, *(uint32_t*)buf1796, *(uint32_t*)buf1797); + *(long2*)buf1798 = rsGetElementAt_long2(*(rs_allocation*)buf1799, *(uint32_t*)buf1800, *(uint32_t*)buf1801, *(uint32_t*)buf1802); + *(long3*)buf1803 = rsGetElementAt_long3(*(rs_allocation*)buf1804, *(uint32_t*)buf1805, *(uint32_t*)buf1806, *(uint32_t*)buf1807); + *(long4*)buf1808 = rsGetElementAt_long4(*(rs_allocation*)buf1809, *(uint32_t*)buf1810, *(uint32_t*)buf1811, *(uint32_t*)buf1812); + *(ulong*)buf1813 = rsGetElementAt_ulong(*(rs_allocation*)buf1814, *(uint32_t*)buf1815, *(uint32_t*)buf1816, *(uint32_t*)buf1817); + *(ulong2*)buf1818 = rsGetElementAt_ulong2(*(rs_allocation*)buf1819, *(uint32_t*)buf1820, *(uint32_t*)buf1821, *(uint32_t*)buf1822); + *(ulong3*)buf1823 = rsGetElementAt_ulong3(*(rs_allocation*)buf1824, *(uint32_t*)buf1825, *(uint32_t*)buf1826, *(uint32_t*)buf1827); + *(ulong4*)buf1828 = rsGetElementAt_ulong4(*(rs_allocation*)buf1829, *(uint32_t*)buf1830, *(uint32_t*)buf1831, *(uint32_t*)buf1832); + *(bool*)buf1833 = rsIsObject(*(rs_element*)buf1834); + *(bool*)buf1835 = rsIsObject(*(rs_type*)buf1836); + *(bool*)buf1837 = rsIsObject(*(rs_allocation*)buf1838); + *(bool*)buf1839 = rsIsObject(*(rs_sampler*)buf1840); + *(bool*)buf1841 = rsIsObject(*(rs_script*)buf1842); +#ifndef __LP64__ + *(bool*)buf1843 = rsIsObject(*(rs_mesh*)buf1844); + *(bool*)buf1845 = rsIsObject(*(rs_program_fragment*)buf1846); + *(bool*)buf1847 = rsIsObject(*(rs_program_vertex*)buf1848); + *(bool*)buf1849 = rsIsObject(*(rs_program_raster*)buf1850); + *(bool*)buf1851 = rsIsObject(*(rs_program_store*)buf1852); + *(bool*)buf1853 = rsIsObject(*(rs_font*)buf1854); +#endif + *(bool*)buf1855 = rsIsSphereInFrustum((float4*) buf1856, (float4*) buf1857, (float4*) buf1858, (float4*) buf1859, (float4*) buf1860, (float4*) buf1861, (float4*) buf1862); + *(rs_tm**)buf1863 = rsLocaltime((rs_tm*) buf1864, (const rs_time_t*) buf1865); + *(float*)buf1866 = rsMatrixGet((const rs_matrix4x4*) buf1867, *(uint32_t*)buf1868, *(uint32_t*)buf1869); + *(float*)buf1870 = rsMatrixGet((const rs_matrix3x3*) buf1871, *(uint32_t*)buf1872, *(uint32_t*)buf1873); + *(float*)buf1874 = rsMatrixGet((const rs_matrix2x2*) buf1875, *(uint32_t*)buf1876, *(uint32_t*)buf1877); + *(bool*)buf1878 = rsMatrixInverse((rs_matrix4x4*) buf1879); + *(bool*)buf1880 = rsMatrixInverseTranspose((rs_matrix4x4*) buf1881); + rsMatrixLoad((rs_matrix4x4*) buf1882, (const float*) buf1883); + rsMatrixLoad((rs_matrix3x3*) buf1884, (const float*) buf1885); + rsMatrixLoad((rs_matrix2x2*) buf1886, (const float*) buf1887); + rsMatrixLoad((rs_matrix4x4*) buf1888, (const rs_matrix4x4*) buf1889); + rsMatrixLoad((rs_matrix3x3*) buf1890, (const rs_matrix3x3*) buf1891); + rsMatrixLoad((rs_matrix2x2*) buf1892, (const rs_matrix2x2*) buf1893); + rsMatrixLoad((rs_matrix4x4*) buf1894, (const rs_matrix3x3*) buf1895); + rsMatrixLoad((rs_matrix4x4*) buf1896, (const rs_matrix2x2*) buf1897); + rsMatrixLoadFrustum((rs_matrix4x4*) buf1898, *(float*)buf1899, *(float*)buf1900, *(float*)buf1901, *(float*)buf1902, *(float*)buf1903, *(float*)buf1904); + rsMatrixLoadIdentity((rs_matrix4x4*) buf1905); + rsMatrixLoadIdentity((rs_matrix3x3*) buf1906); + rsMatrixLoadIdentity((rs_matrix2x2*) buf1907); + rsMatrixLoadMultiply((rs_matrix4x4*) buf1908, (const rs_matrix4x4*) buf1909, (const rs_matrix4x4*) buf1910); + rsMatrixLoadMultiply((rs_matrix3x3*) buf1911, (const rs_matrix3x3*) buf1912, (const rs_matrix3x3*) buf1913); + rsMatrixLoadMultiply((rs_matrix2x2*) buf1914, (const rs_matrix2x2*) buf1915, (const rs_matrix2x2*) buf1916); + rsMatrixLoadOrtho((rs_matrix4x4*) buf1917, *(float*)buf1918, *(float*)buf1919, *(float*)buf1920, *(float*)buf1921, *(float*)buf1922, *(float*)buf1923); + rsMatrixLoadPerspective((rs_matrix4x4*) buf1924, *(float*)buf1925, *(float*)buf1926, *(float*)buf1927, *(float*)buf1928); + rsMatrixLoadRotate((rs_matrix4x4*) buf1929, *(float*)buf1930, *(float*)buf1931, *(float*)buf1932, *(float*)buf1933); + rsMatrixLoadScale((rs_matrix4x4*) buf1934, *(float*)buf1935, *(float*)buf1936, *(float*)buf1937); + rsMatrixLoadTranslate((rs_matrix4x4*) buf1938, *(float*)buf1939, *(float*)buf1940, *(float*)buf1941); + rsMatrixMultiply((rs_matrix4x4*) buf1942, (const rs_matrix4x4*) buf1943); + rsMatrixMultiply((rs_matrix3x3*) buf1944, (const rs_matrix3x3*) buf1945); + rsMatrixMultiply((rs_matrix2x2*) buf1946, (const rs_matrix2x2*) buf1947); + *(float4*)buf1948 = rsMatrixMultiply((rs_matrix4x4*) buf1949, *(float4*)buf1950); + *(float4*)buf1951 = rsMatrixMultiply((rs_matrix4x4*) buf1952, *(float3*)buf1953); + *(float4*)buf1954 = rsMatrixMultiply((rs_matrix4x4*) buf1955, *(float2*)buf1956); + *(float3*)buf1957 = rsMatrixMultiply((rs_matrix3x3*) buf1958, *(float3*)buf1959); + *(float3*)buf1960 = rsMatrixMultiply((rs_matrix3x3*) buf1961, *(float2*)buf1962); + *(float2*)buf1963 = rsMatrixMultiply((rs_matrix2x2*) buf1964, *(float2*)buf1965); + rsMatrixRotate((rs_matrix4x4*) buf1966, *(float*)buf1967, *(float*)buf1968, *(float*)buf1969, *(float*)buf1970); + rsMatrixScale((rs_matrix4x4*) buf1971, *(float*)buf1972, *(float*)buf1973, *(float*)buf1974); + rsMatrixSet((rs_matrix4x4*) buf1975, *(uint32_t*)buf1976, *(uint32_t*)buf1977, *(float*)buf1978); + rsMatrixSet((rs_matrix3x3*) buf1979, *(uint32_t*)buf1980, *(uint32_t*)buf1981, *(float*)buf1982); + rsMatrixSet((rs_matrix2x2*) buf1983, *(uint32_t*)buf1984, *(uint32_t*)buf1985, *(float*)buf1986); + rsMatrixTranslate((rs_matrix4x4*) buf1987, *(float*)buf1988, *(float*)buf1989, *(float*)buf1990); + rsMatrixTranspose((rs_matrix4x4*) buf1991); + rsMatrixTranspose((rs_matrix3x3*) buf1992); + rsMatrixTranspose((rs_matrix2x2*) buf1993); + *(uchar4*)buf1994 = rsPackColorTo8888(*(float*)buf1995, *(float*)buf1996, *(float*)buf1997); + *(uchar4*)buf1998 = rsPackColorTo8888(*(float*)buf1999, *(float*)buf2000, *(float*)buf2001, *(float*)buf2002); + *(uchar4*)buf2003 = rsPackColorTo8888(*(float3*)buf2004); + *(uchar4*)buf2005 = rsPackColorTo8888(*(float4*)buf2006); + rsQuaternionAdd((rs_quaternion*) buf2007, (const rs_quaternion*) buf2008); + rsQuaternionConjugate((rs_quaternion*) buf2009); + *(float*)buf2010 = rsQuaternionDot((const rs_quaternion*) buf2011, (const rs_quaternion*) buf2012); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2013, (const rs_quaternion*) buf2014); + rsQuaternionLoadRotate((rs_quaternion*) buf2015, *(float*)buf2016, *(float*)buf2017, *(float*)buf2018, *(float*)buf2019); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2020, *(float*)buf2021, *(float*)buf2022, *(float*)buf2023, *(float*)buf2024); + rsQuaternionMultiply((rs_quaternion*) buf2025, *(float*)buf2026); + rsQuaternionMultiply((rs_quaternion*) buf2027, (const rs_quaternion*) buf2028); + rsQuaternionNormalize((rs_quaternion*) buf2029); + rsQuaternionSet((rs_quaternion*) buf2030, *(float*)buf2031, *(float*)buf2032, *(float*)buf2033, *(float*)buf2034); + rsQuaternionSet((rs_quaternion*) buf2035, (const rs_quaternion*) buf2036); + rsQuaternionSlerp((rs_quaternion*) buf2037, (const rs_quaternion*) buf2038, (const rs_quaternion*) buf2039, *(float*)buf2040); + *(int*)buf2041 = rsRand(*(int*)buf2042); + *(int*)buf2043 = rsRand(*(int*)buf2044, *(int*)buf2045); + *(float*)buf2046 = rsRand(*(float*)buf2047); + *(float*)buf2048 = rsRand(*(float*)buf2049, *(float*)buf2050); + *(bool*)buf2051 = rsSendToClient(*(int*)buf2052); + *(bool*)buf2053 = rsSendToClient(*(int*)buf2054, (const void*) buf2055, *(uint*)buf2056); + rsSendToClientBlocking(*(int*)buf2057); + rsSendToClientBlocking(*(int*)buf2058, (const void*) buf2059, *(uint*)buf2060); + rsSetObject((rs_element*) buf2061, *(rs_element*)buf2062); + rsSetObject((rs_type*) buf2063, *(rs_type*)buf2064); + rsSetObject((rs_allocation*) buf2065, *(rs_allocation*)buf2066); + rsSetObject((rs_sampler*) buf2067, *(rs_sampler*)buf2068); + rsSetObject((rs_script*) buf2069, *(rs_script*)buf2070); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2071, *(rs_mesh*)buf2072); + rsSetObject((rs_program_fragment*) buf2073, *(rs_program_fragment*)buf2074); + rsSetObject((rs_program_vertex*) buf2075, *(rs_program_vertex*)buf2076); + rsSetObject((rs_program_raster*) buf2077, *(rs_program_raster*)buf2078); + rsSetObject((rs_program_store*) buf2079, *(rs_program_store*)buf2080); + rsSetObject((rs_font*) buf2081, *(rs_font*)buf2082); +#endif + *(rs_time_t*)buf2083 = rsTime((rs_time_t*) buf2084); + *(float4*)buf2085 = rsUnpackColor8888(*(uchar4*)buf2086); + *(int64_t*)buf2087 = rsUptimeMillis(); + *(int64_t*)buf2088 = rsUptimeNanos(); + *(float4*)buf2089 = rsYuvToRGBA_float4(*(uchar*)buf2090, *(uchar*)buf2091, *(uchar*)buf2092); + *(uchar4*)buf2093 = rsYuvToRGBA_uchar4(*(uchar*)buf2094, *(uchar*)buf2095, *(uchar*)buf2096); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2097); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2098, *(uint*)buf2099, *(rs_allocation*)buf2100); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2101, *(uint*)buf2102, *(rs_allocation*)buf2103); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2104); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2105); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2106); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2107); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2108); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2109, *(uint*)buf2110, *(rs_sampler*)buf2111); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2112, *(uint*)buf2113, *(rs_allocation*)buf2114); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2115, *(float*)buf2116, *(float*)buf2117, *(float*)buf2118); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2119); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2120); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2121, *(uint*)buf2122); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2123, *(uint*)buf2124, *(uint*)buf2125, *(uint*)buf2126); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2127, *(float*)buf2128, *(float*)buf2129, *(float*)buf2130, *(float*)buf2131, *(float*)buf2132, *(float*)buf2133, *(float*)buf2134, *(float*)buf2135, *(float*)buf2136, *(float*)buf2137, *(float*)buf2138); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2139, *(float*)buf2140, *(float*)buf2141, *(float*)buf2142, *(float*)buf2143, *(float*)buf2144, *(float*)buf2145, *(float*)buf2146, *(float*)buf2147, *(float*)buf2148, *(float*)buf2149, *(float*)buf2150, *(float*)buf2151, *(float*)buf2152, *(float*)buf2153, *(float*)buf2154, *(float*)buf2155, *(float*)buf2156, *(float*)buf2157, *(float*)buf2158); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2159, *(float*)buf2160, *(float*)buf2161, *(float*)buf2162, *(float*)buf2163); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2164, *(float*)buf2165, *(float*)buf2166, *(float*)buf2167, *(float*)buf2168); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2169, *(int*)buf2170, *(int*)buf2171); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2172, *(int*)buf2173, *(int*)buf2174); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2175, *(float*)buf2176, *(float*)buf2177, *(float*)buf2178); +#endif +#ifndef __LP64__ + *(uint*)buf2179 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2180 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2181, (int*) buf2182, (int*) buf2183, (int*) buf2184, (int*) buf2185); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2186, (int*) buf2187, (int*) buf2188, (int*) buf2189, (int*) buf2190); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2191, (float*) buf2192, (float*) buf2193, (float*) buf2194, (float*) buf2195, (float*) buf2196, (float*) buf2197); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2198, (float3*) buf2199, (float3*) buf2200); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf2201, *(float*)buf2202, *(float*)buf2203, *(float*)buf2204, *(float*)buf2205); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf2206); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf2207); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf2208); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf2209); +#endif + *(float*)buf2210 = rsqrt(*(float*)buf2211); + *(float2*)buf2212 = rsqrt(*(float2*)buf2213); + *(float3*)buf2214 = rsqrt(*(float3*)buf2215); + *(float4*)buf2216 = rsqrt(*(float4*)buf2217); + *(float*)buf2218 = sign(*(float*)buf2219); + *(float2*)buf2220 = sign(*(float2*)buf2221); + *(float3*)buf2222 = sign(*(float3*)buf2223); + *(float4*)buf2224 = sign(*(float4*)buf2225); + *(float*)buf2226 = sin(*(float*)buf2227); + *(float2*)buf2228 = sin(*(float2*)buf2229); + *(float3*)buf2230 = sin(*(float3*)buf2231); + *(float4*)buf2232 = sin(*(float4*)buf2233); + *(float*)buf2234 = sincos(*(float*)buf2235, (float*) buf2236); + *(float2*)buf2237 = sincos(*(float2*)buf2238, (float2*) buf2239); + *(float3*)buf2240 = sincos(*(float3*)buf2241, (float3*) buf2242); + *(float4*)buf2243 = sincos(*(float4*)buf2244, (float4*) buf2245); + *(float*)buf2246 = sinh(*(float*)buf2247); + *(float2*)buf2248 = sinh(*(float2*)buf2249); + *(float3*)buf2250 = sinh(*(float3*)buf2251); + *(float4*)buf2252 = sinh(*(float4*)buf2253); + *(float*)buf2254 = sinpi(*(float*)buf2255); + *(float2*)buf2256 = sinpi(*(float2*)buf2257); + *(float3*)buf2258 = sinpi(*(float3*)buf2259); + *(float4*)buf2260 = sinpi(*(float4*)buf2261); + *(float*)buf2262 = sqrt(*(float*)buf2263); + *(float2*)buf2264 = sqrt(*(float2*)buf2265); + *(float3*)buf2266 = sqrt(*(float3*)buf2267); + *(float4*)buf2268 = sqrt(*(float4*)buf2269); + *(float*)buf2270 = step(*(float*)buf2271, *(float*)buf2272); + *(float2*)buf2273 = step(*(float2*)buf2274, *(float2*)buf2275); + *(float3*)buf2276 = step(*(float3*)buf2277, *(float3*)buf2278); + *(float4*)buf2279 = step(*(float4*)buf2280, *(float4*)buf2281); + *(float2*)buf2282 = step(*(float2*)buf2283, *(float*)buf2284); + *(float3*)buf2285 = step(*(float3*)buf2286, *(float*)buf2287); + *(float4*)buf2288 = step(*(float4*)buf2289, *(float*)buf2290); + *(float*)buf2291 = tan(*(float*)buf2292); + *(float2*)buf2293 = tan(*(float2*)buf2294); + *(float3*)buf2295 = tan(*(float3*)buf2296); + *(float4*)buf2297 = tan(*(float4*)buf2298); + *(float*)buf2299 = tanh(*(float*)buf2300); + *(float2*)buf2301 = tanh(*(float2*)buf2302); + *(float3*)buf2303 = tanh(*(float3*)buf2304); + *(float4*)buf2305 = tanh(*(float4*)buf2306); + *(float*)buf2307 = tanpi(*(float*)buf2308); + *(float2*)buf2309 = tanpi(*(float2*)buf2310); + *(float3*)buf2311 = tanpi(*(float3*)buf2312); + *(float4*)buf2313 = tanpi(*(float4*)buf2314); + *(float*)buf2315 = tgamma(*(float*)buf2316); + *(float2*)buf2317 = tgamma(*(float2*)buf2318); + *(float3*)buf2319 = tgamma(*(float3*)buf2320); + *(float4*)buf2321 = tgamma(*(float4*)buf2322); + *(float*)buf2323 = trunc(*(float*)buf2324); + *(float2*)buf2325 = trunc(*(float2*)buf2326); + *(float3*)buf2327 = trunc(*(float3*)buf2328); + *(float4*)buf2329 = trunc(*(float4*)buf2330); +}
diff --git a/slang/tests/P_all_api_13/stderr.txt.expect b/slang/tests/P_all_api_13/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_13/stderr.txt.expect
diff --git a/slang/tests/P_all_api_13/stdout.txt.expect b/slang/tests/P_all_api_13/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_13/stdout.txt.expect
diff --git a/slang/tests/P_all_api_14/all14.rs b/slang/tests/P_all_api_14/all14.rs new file mode 100644 index 0000000..9e69767 --- /dev/null +++ b/slang/tests/P_all_api_14/all14.rs
@@ -0,0 +1,3403 @@ +// -target-api 14 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; + +void root(const int* in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fdim(*(float*)buf637, *(float*)buf638); + *(float2*)buf639 = fdim(*(float2*)buf640, *(float2*)buf641); + *(float3*)buf642 = fdim(*(float3*)buf643, *(float3*)buf644); + *(float4*)buf645 = fdim(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = floor(*(float*)buf649); + *(float2*)buf650 = floor(*(float2*)buf651); + *(float3*)buf652 = floor(*(float3*)buf653); + *(float4*)buf654 = floor(*(float4*)buf655); + *(float*)buf656 = fma(*(float*)buf657, *(float*)buf658, *(float*)buf659); + *(float2*)buf660 = fma(*(float2*)buf661, *(float2*)buf662, *(float2*)buf663); + *(float3*)buf664 = fma(*(float3*)buf665, *(float3*)buf666, *(float3*)buf667); + *(float4*)buf668 = fma(*(float4*)buf669, *(float4*)buf670, *(float4*)buf671); + *(float*)buf672 = fmax(*(float*)buf673, *(float*)buf674); + *(float2*)buf675 = fmax(*(float2*)buf676, *(float2*)buf677); + *(float3*)buf678 = fmax(*(float3*)buf679, *(float3*)buf680); + *(float4*)buf681 = fmax(*(float4*)buf682, *(float4*)buf683); + *(float2*)buf684 = fmax(*(float2*)buf685, *(float*)buf686); + *(float3*)buf687 = fmax(*(float3*)buf688, *(float*)buf689); + *(float4*)buf690 = fmax(*(float4*)buf691, *(float*)buf692); + *(float*)buf693 = fmin(*(float*)buf694, *(float*)buf695); + *(float2*)buf696 = fmin(*(float2*)buf697, *(float2*)buf698); + *(float3*)buf699 = fmin(*(float3*)buf700, *(float3*)buf701); + *(float4*)buf702 = fmin(*(float4*)buf703, *(float4*)buf704); + *(float2*)buf705 = fmin(*(float2*)buf706, *(float*)buf707); + *(float3*)buf708 = fmin(*(float3*)buf709, *(float*)buf710); + *(float4*)buf711 = fmin(*(float4*)buf712, *(float*)buf713); + *(float*)buf714 = fmod(*(float*)buf715, *(float*)buf716); + *(float2*)buf717 = fmod(*(float2*)buf718, *(float2*)buf719); + *(float3*)buf720 = fmod(*(float3*)buf721, *(float3*)buf722); + *(float4*)buf723 = fmod(*(float4*)buf724, *(float4*)buf725); + *(float*)buf726 = fract(*(float*)buf727, (float*) buf728); + *(float2*)buf729 = fract(*(float2*)buf730, (float2*) buf731); + *(float3*)buf732 = fract(*(float3*)buf733, (float3*) buf734); + *(float4*)buf735 = fract(*(float4*)buf736, (float4*) buf737); + *(float*)buf738 = fract(*(float*)buf739); + *(float2*)buf740 = fract(*(float2*)buf741); + *(float3*)buf742 = fract(*(float3*)buf743); + *(float4*)buf744 = fract(*(float4*)buf745); + *(float*)buf746 = frexp(*(float*)buf747, (int*) buf748); + *(float2*)buf749 = frexp(*(float2*)buf750, (int2*) buf751); + *(float3*)buf752 = frexp(*(float3*)buf753, (int3*) buf754); + *(float4*)buf755 = frexp(*(float4*)buf756, (int4*) buf757); + *(float*)buf758 = hypot(*(float*)buf759, *(float*)buf760); + *(float2*)buf761 = hypot(*(float2*)buf762, *(float2*)buf763); + *(float3*)buf764 = hypot(*(float3*)buf765, *(float3*)buf766); + *(float4*)buf767 = hypot(*(float4*)buf768, *(float4*)buf769); + *(int*)buf770 = ilogb(*(float*)buf771); + *(int2*)buf772 = ilogb(*(float2*)buf773); + *(int3*)buf774 = ilogb(*(float3*)buf775); + *(int4*)buf776 = ilogb(*(float4*)buf777); + *(float*)buf778 = ldexp(*(float*)buf779, *(int*)buf780); + *(float2*)buf781 = ldexp(*(float2*)buf782, *(int2*)buf783); + *(float3*)buf784 = ldexp(*(float3*)buf785, *(int3*)buf786); + *(float4*)buf787 = ldexp(*(float4*)buf788, *(int4*)buf789); + *(float2*)buf790 = ldexp(*(float2*)buf791, *(int*)buf792); + *(float3*)buf793 = ldexp(*(float3*)buf794, *(int*)buf795); + *(float4*)buf796 = ldexp(*(float4*)buf797, *(int*)buf798); + *(float*)buf799 = length(*(float*)buf800); + *(float*)buf801 = length(*(float2*)buf802); + *(float*)buf803 = length(*(float3*)buf804); + *(float*)buf805 = length(*(float4*)buf806); + *(float*)buf807 = lgamma(*(float*)buf808); + *(float2*)buf809 = lgamma(*(float2*)buf810); + *(float3*)buf811 = lgamma(*(float3*)buf812); + *(float4*)buf813 = lgamma(*(float4*)buf814); + *(float*)buf815 = lgamma(*(float*)buf816, (int*) buf817); + *(float2*)buf818 = lgamma(*(float2*)buf819, (int2*) buf820); + *(float3*)buf821 = lgamma(*(float3*)buf822, (int3*) buf823); + *(float4*)buf824 = lgamma(*(float4*)buf825, (int4*) buf826); + *(float*)buf827 = log(*(float*)buf828); + *(float2*)buf829 = log(*(float2*)buf830); + *(float3*)buf831 = log(*(float3*)buf832); + *(float4*)buf833 = log(*(float4*)buf834); + *(float*)buf835 = log10(*(float*)buf836); + *(float2*)buf837 = log10(*(float2*)buf838); + *(float3*)buf839 = log10(*(float3*)buf840); + *(float4*)buf841 = log10(*(float4*)buf842); + *(float*)buf843 = log1p(*(float*)buf844); + *(float2*)buf845 = log1p(*(float2*)buf846); + *(float3*)buf847 = log1p(*(float3*)buf848); + *(float4*)buf849 = log1p(*(float4*)buf850); + *(float*)buf851 = log2(*(float*)buf852); + *(float2*)buf853 = log2(*(float2*)buf854); + *(float3*)buf855 = log2(*(float3*)buf856); + *(float4*)buf857 = log2(*(float4*)buf858); + *(float*)buf859 = logb(*(float*)buf860); + *(float2*)buf861 = logb(*(float2*)buf862); + *(float3*)buf863 = logb(*(float3*)buf864); + *(float4*)buf865 = logb(*(float4*)buf866); + *(float*)buf867 = mad(*(float*)buf868, *(float*)buf869, *(float*)buf870); + *(float2*)buf871 = mad(*(float2*)buf872, *(float2*)buf873, *(float2*)buf874); + *(float3*)buf875 = mad(*(float3*)buf876, *(float3*)buf877, *(float3*)buf878); + *(float4*)buf879 = mad(*(float4*)buf880, *(float4*)buf881, *(float4*)buf882); + *(float*)buf883 = max(*(float*)buf884, *(float*)buf885); + *(float2*)buf886 = max(*(float2*)buf887, *(float2*)buf888); + *(float3*)buf889 = max(*(float3*)buf890, *(float3*)buf891); + *(float4*)buf892 = max(*(float4*)buf893, *(float4*)buf894); + *(float2*)buf895 = max(*(float2*)buf896, *(float*)buf897); + *(float3*)buf898 = max(*(float3*)buf899, *(float*)buf900); + *(float4*)buf901 = max(*(float4*)buf902, *(float*)buf903); + *(char*)buf904 = max(*(char*)buf905, *(char*)buf906); + *(uchar*)buf907 = max(*(uchar*)buf908, *(uchar*)buf909); + *(short*)buf910 = max(*(short*)buf911, *(short*)buf912); + *(ushort*)buf913 = max(*(ushort*)buf914, *(ushort*)buf915); + *(int*)buf916 = max(*(int*)buf917, *(int*)buf918); + *(uint*)buf919 = max(*(uint*)buf920, *(uint*)buf921); + *(char2*)buf922 = max(*(char2*)buf923, *(char2*)buf924); + *(uchar2*)buf925 = max(*(uchar2*)buf926, *(uchar2*)buf927); + *(short2*)buf928 = max(*(short2*)buf929, *(short2*)buf930); + *(ushort2*)buf931 = max(*(ushort2*)buf932, *(ushort2*)buf933); + *(int2*)buf934 = max(*(int2*)buf935, *(int2*)buf936); + *(uint2*)buf937 = max(*(uint2*)buf938, *(uint2*)buf939); + *(char3*)buf940 = max(*(char3*)buf941, *(char3*)buf942); + *(uchar3*)buf943 = max(*(uchar3*)buf944, *(uchar3*)buf945); + *(short3*)buf946 = max(*(short3*)buf947, *(short3*)buf948); + *(ushort3*)buf949 = max(*(ushort3*)buf950, *(ushort3*)buf951); + *(int3*)buf952 = max(*(int3*)buf953, *(int3*)buf954); + *(uint3*)buf955 = max(*(uint3*)buf956, *(uint3*)buf957); + *(char4*)buf958 = max(*(char4*)buf959, *(char4*)buf960); + *(uchar4*)buf961 = max(*(uchar4*)buf962, *(uchar4*)buf963); + *(short4*)buf964 = max(*(short4*)buf965, *(short4*)buf966); + *(ushort4*)buf967 = max(*(ushort4*)buf968, *(ushort4*)buf969); + *(int4*)buf970 = max(*(int4*)buf971, *(int4*)buf972); + *(uint4*)buf973 = max(*(uint4*)buf974, *(uint4*)buf975); + *(float*)buf976 = min(*(float*)buf977, *(float*)buf978); + *(float2*)buf979 = min(*(float2*)buf980, *(float2*)buf981); + *(float3*)buf982 = min(*(float3*)buf983, *(float3*)buf984); + *(float4*)buf985 = min(*(float4*)buf986, *(float4*)buf987); + *(float2*)buf988 = min(*(float2*)buf989, *(float*)buf990); + *(float3*)buf991 = min(*(float3*)buf992, *(float*)buf993); + *(float4*)buf994 = min(*(float4*)buf995, *(float*)buf996); + *(char*)buf997 = min(*(char*)buf998, *(char*)buf999); + *(uchar*)buf1000 = min(*(uchar*)buf1001, *(uchar*)buf1002); + *(short*)buf1003 = min(*(short*)buf1004, *(short*)buf1005); + *(ushort*)buf1006 = min(*(ushort*)buf1007, *(ushort*)buf1008); + *(int*)buf1009 = min(*(int*)buf1010, *(int*)buf1011); + *(uint*)buf1012 = min(*(uint*)buf1013, *(uint*)buf1014); + *(char2*)buf1015 = min(*(char2*)buf1016, *(char2*)buf1017); + *(uchar2*)buf1018 = min(*(uchar2*)buf1019, *(uchar2*)buf1020); + *(short2*)buf1021 = min(*(short2*)buf1022, *(short2*)buf1023); + *(ushort2*)buf1024 = min(*(ushort2*)buf1025, *(ushort2*)buf1026); + *(int2*)buf1027 = min(*(int2*)buf1028, *(int2*)buf1029); + *(uint2*)buf1030 = min(*(uint2*)buf1031, *(uint2*)buf1032); + *(char3*)buf1033 = min(*(char3*)buf1034, *(char3*)buf1035); + *(uchar3*)buf1036 = min(*(uchar3*)buf1037, *(uchar3*)buf1038); + *(short3*)buf1039 = min(*(short3*)buf1040, *(short3*)buf1041); + *(ushort3*)buf1042 = min(*(ushort3*)buf1043, *(ushort3*)buf1044); + *(int3*)buf1045 = min(*(int3*)buf1046, *(int3*)buf1047); + *(uint3*)buf1048 = min(*(uint3*)buf1049, *(uint3*)buf1050); + *(char4*)buf1051 = min(*(char4*)buf1052, *(char4*)buf1053); + *(uchar4*)buf1054 = min(*(uchar4*)buf1055, *(uchar4*)buf1056); + *(short4*)buf1057 = min(*(short4*)buf1058, *(short4*)buf1059); + *(ushort4*)buf1060 = min(*(ushort4*)buf1061, *(ushort4*)buf1062); + *(int4*)buf1063 = min(*(int4*)buf1064, *(int4*)buf1065); + *(uint4*)buf1066 = min(*(uint4*)buf1067, *(uint4*)buf1068); + *(float*)buf1069 = mix(*(float*)buf1070, *(float*)buf1071, *(float*)buf1072); + *(float2*)buf1073 = mix(*(float2*)buf1074, *(float2*)buf1075, *(float2*)buf1076); + *(float3*)buf1077 = mix(*(float3*)buf1078, *(float3*)buf1079, *(float3*)buf1080); + *(float4*)buf1081 = mix(*(float4*)buf1082, *(float4*)buf1083, *(float4*)buf1084); + *(float2*)buf1085 = mix(*(float2*)buf1086, *(float2*)buf1087, *(float*)buf1088); + *(float3*)buf1089 = mix(*(float3*)buf1090, *(float3*)buf1091, *(float*)buf1092); + *(float4*)buf1093 = mix(*(float4*)buf1094, *(float4*)buf1095, *(float*)buf1096); + *(float*)buf1097 = modf(*(float*)buf1098, (float*) buf1099); + *(float2*)buf1100 = modf(*(float2*)buf1101, (float2*) buf1102); + *(float3*)buf1103 = modf(*(float3*)buf1104, (float3*) buf1105); + *(float4*)buf1106 = modf(*(float4*)buf1107, (float4*) buf1108); + *(float*)buf1109 = nan(*(uint*)buf1110); + *(float*)buf1111 = nextafter(*(float*)buf1112, *(float*)buf1113); + *(float2*)buf1114 = nextafter(*(float2*)buf1115, *(float2*)buf1116); + *(float3*)buf1117 = nextafter(*(float3*)buf1118, *(float3*)buf1119); + *(float4*)buf1120 = nextafter(*(float4*)buf1121, *(float4*)buf1122); + *(float*)buf1123 = normalize(*(float*)buf1124); + *(float2*)buf1125 = normalize(*(float2*)buf1126); + *(float3*)buf1127 = normalize(*(float3*)buf1128); + *(float4*)buf1129 = normalize(*(float4*)buf1130); + *(float*)buf1131 = pow(*(float*)buf1132, *(float*)buf1133); + *(float2*)buf1134 = pow(*(float2*)buf1135, *(float2*)buf1136); + *(float3*)buf1137 = pow(*(float3*)buf1138, *(float3*)buf1139); + *(float4*)buf1140 = pow(*(float4*)buf1141, *(float4*)buf1142); + *(float*)buf1143 = pown(*(float*)buf1144, *(int*)buf1145); + *(float2*)buf1146 = pown(*(float2*)buf1147, *(int2*)buf1148); + *(float3*)buf1149 = pown(*(float3*)buf1150, *(int3*)buf1151); + *(float4*)buf1152 = pown(*(float4*)buf1153, *(int4*)buf1154); + *(float*)buf1155 = powr(*(float*)buf1156, *(float*)buf1157); + *(float2*)buf1158 = powr(*(float2*)buf1159, *(float2*)buf1160); + *(float3*)buf1161 = powr(*(float3*)buf1162, *(float3*)buf1163); + *(float4*)buf1164 = powr(*(float4*)buf1165, *(float4*)buf1166); + *(float*)buf1167 = radians(*(float*)buf1168); + *(float2*)buf1169 = radians(*(float2*)buf1170); + *(float3*)buf1171 = radians(*(float3*)buf1172); + *(float4*)buf1173 = radians(*(float4*)buf1174); + *(float*)buf1175 = remainder(*(float*)buf1176, *(float*)buf1177); + *(float2*)buf1178 = remainder(*(float2*)buf1179, *(float2*)buf1180); + *(float3*)buf1181 = remainder(*(float3*)buf1182, *(float3*)buf1183); + *(float4*)buf1184 = remainder(*(float4*)buf1185, *(float4*)buf1186); + *(float*)buf1187 = remquo(*(float*)buf1188, *(float*)buf1189, (int*) buf1190); + *(float2*)buf1191 = remquo(*(float2*)buf1192, *(float2*)buf1193, (int2*) buf1194); + *(float3*)buf1195 = remquo(*(float3*)buf1196, *(float3*)buf1197, (int3*) buf1198); + *(float4*)buf1199 = remquo(*(float4*)buf1200, *(float4*)buf1201, (int4*) buf1202); + *(float*)buf1203 = rint(*(float*)buf1204); + *(float2*)buf1205 = rint(*(float2*)buf1206); + *(float3*)buf1207 = rint(*(float3*)buf1208); + *(float4*)buf1209 = rint(*(float4*)buf1210); + *(float*)buf1211 = rootn(*(float*)buf1212, *(int*)buf1213); + *(float2*)buf1214 = rootn(*(float2*)buf1215, *(int2*)buf1216); + *(float3*)buf1217 = rootn(*(float3*)buf1218, *(int3*)buf1219); + *(float4*)buf1220 = rootn(*(float4*)buf1221, *(int4*)buf1222); + *(float*)buf1223 = round(*(float*)buf1224); + *(float2*)buf1225 = round(*(float2*)buf1226); + *(float3*)buf1227 = round(*(float3*)buf1228); + *(float4*)buf1229 = round(*(float4*)buf1230); + rsAllocationCopy1DRange(*(rs_allocation*)buf1231, *(uint32_t*)buf1232, *(uint32_t*)buf1233, *(uint32_t*)buf1234, *(rs_allocation*)buf1235, *(uint32_t*)buf1236, *(uint32_t*)buf1237); + rsAllocationCopy2DRange(*(rs_allocation*)buf1238, *(uint32_t*)buf1239, *(uint32_t*)buf1240, *(uint32_t*)buf1241, *(rs_allocation_cubemap_face*)buf1242, *(uint32_t*)buf1243, *(uint32_t*)buf1244, *(rs_allocation*)buf1245, *(uint32_t*)buf1246, *(uint32_t*)buf1247, *(uint32_t*)buf1248, *(rs_allocation_cubemap_face*)buf1249); + *(uint32_t*)buf1250 = rsAllocationGetDimFaces(*(rs_allocation*)buf1251); + *(uint32_t*)buf1252 = rsAllocationGetDimLOD(*(rs_allocation*)buf1253); + *(uint32_t*)buf1254 = rsAllocationGetDimX(*(rs_allocation*)buf1255); + *(uint32_t*)buf1256 = rsAllocationGetDimY(*(rs_allocation*)buf1257); + *(uint32_t*)buf1258 = rsAllocationGetDimZ(*(rs_allocation*)buf1259); + *(rs_element*)buf1260 = rsAllocationGetElement(*(rs_allocation*)buf1261); + *(int32_t*)buf1262 = rsAtomicAdd((volatile int32_t*) buf1263, *(int32_t*)buf1264); + *(int32_t*)buf1265 = rsAtomicAnd((volatile int32_t*) buf1266, *(int32_t*)buf1267); + *(int32_t*)buf1268 = rsAtomicCas((volatile int32_t*) buf1269, *(int32_t*)buf1270, *(int32_t*)buf1271); + *(uint32_t*)buf1272 = rsAtomicCas((volatile uint32_t*) buf1273, *(uint32_t*)buf1274, *(uint32_t*)buf1275); + *(int32_t*)buf1276 = rsAtomicDec((volatile int32_t*) buf1277); + *(int32_t*)buf1278 = rsAtomicInc((volatile int32_t*) buf1279); + *(uint32_t*)buf1280 = rsAtomicMax((volatile uint32_t*) buf1281, *(uint32_t*)buf1282); + *(int32_t*)buf1283 = rsAtomicMax((volatile int32_t*) buf1284, *(int32_t*)buf1285); + *(uint32_t*)buf1286 = rsAtomicMin((volatile uint32_t*) buf1287, *(uint32_t*)buf1288); + *(int32_t*)buf1289 = rsAtomicMin((volatile int32_t*) buf1290, *(int32_t*)buf1291); + *(int32_t*)buf1292 = rsAtomicOr((volatile int32_t*) buf1293, *(int32_t*)buf1294); + *(int32_t*)buf1295 = rsAtomicSub((volatile int32_t*) buf1296, *(int32_t*)buf1297); + *(int32_t*)buf1298 = rsAtomicXor((volatile int32_t*) buf1299, *(int32_t*)buf1300); + *(char*)buf1301 = rsClamp(*(char*)buf1302, *(char*)buf1303, *(char*)buf1304); + *(uchar*)buf1305 = rsClamp(*(uchar*)buf1306, *(uchar*)buf1307, *(uchar*)buf1308); + *(short*)buf1309 = rsClamp(*(short*)buf1310, *(short*)buf1311, *(short*)buf1312); + *(ushort*)buf1313 = rsClamp(*(ushort*)buf1314, *(ushort*)buf1315, *(ushort*)buf1316); + *(int*)buf1317 = rsClamp(*(int*)buf1318, *(int*)buf1319, *(int*)buf1320); + *(uint*)buf1321 = rsClamp(*(uint*)buf1322, *(uint*)buf1323, *(uint*)buf1324); + rsClearObject((rs_element*) buf1325); + rsClearObject((rs_type*) buf1326); + rsClearObject((rs_allocation*) buf1327); + rsClearObject((rs_sampler*) buf1328); + rsClearObject((rs_script*) buf1329); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1330); + rsClearObject((rs_program_fragment*) buf1331); + rsClearObject((rs_program_vertex*) buf1332); + rsClearObject((rs_program_raster*) buf1333); + rsClearObject((rs_program_store*) buf1334); + rsClearObject((rs_font*) buf1335); +#endif + rsDebug((const char*) buf1336, *(double*)buf1337); + rsDebug((const char*) buf1338, *(int*)buf1339); + rsDebug((const char*) buf1340, *(uint*)buf1341); + rsDebug((const char*) buf1342, *(long*)buf1343); + rsDebug((const char*) buf1344, *(ulong*)buf1345); + rsDebug((const char*) buf1346, *(float*)buf1347); + rsDebug((const char*) buf1348, *(float2*)buf1349); + rsDebug((const char*) buf1350, *(float3*)buf1351); + rsDebug((const char*) buf1352, *(float4*)buf1353); + rsDebug((const char*) buf1354, *(float*)buf1355, *(float*)buf1356); + rsDebug((const char*) buf1357, *(float*)buf1358, *(float*)buf1359, *(float*)buf1360); + rsDebug((const char*) buf1361, *(float*)buf1362, *(float*)buf1363, *(float*)buf1364, *(float*)buf1365); + rsDebug((const char*) buf1366, *(long long*)buf1367); + rsDebug((const char*) buf1368, *(unsigned long long*)buf1369); + rsDebug((const char*) buf1370, (const void*) buf1371); + rsDebug((const char*) buf1372, (const rs_matrix4x4*) buf1373); + rsDebug((const char*) buf1374, (const rs_matrix3x3*) buf1375); + rsDebug((const char*) buf1376, (const rs_matrix2x2*) buf1377); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1378, (float4*) buf1379, (float4*) buf1380, (float4*) buf1381, (float4*) buf1382, (float4*) buf1383, (float4*) buf1384); + rsForEach(*(rs_script*)buf1385, *(rs_allocation*)buf1386, *(rs_allocation*)buf1387, (const void*) buf1388, *(size_t*)buf1389, (const rs_script_call_t*) buf1390); + rsForEach(*(rs_script*)buf1391, *(rs_allocation*)buf1392, *(rs_allocation*)buf1393, (const void*) buf1394, *(size_t*)buf1395); + rsForEach(*(rs_script*)buf1396, *(rs_allocation*)buf1397, *(rs_allocation*)buf1398); + *(float*)buf1399 = rsFrac(*(float*)buf1400); + *(rs_allocation*)buf1401 = rsGetAllocation((const void*) buf1402); + *(float*)buf1403 = rsGetDt(); + *(const void**)buf1404 = rsGetElementAt(*(rs_allocation*)buf1405, *(uint32_t*)buf1406); + *(const void**)buf1407 = rsGetElementAt(*(rs_allocation*)buf1408, *(uint32_t*)buf1409, *(uint32_t*)buf1410); + *(const void**)buf1411 = rsGetElementAt(*(rs_allocation*)buf1412, *(uint32_t*)buf1413, *(uint32_t*)buf1414, *(uint32_t*)buf1415); + *(float*)buf1416 = rsGetElementAt_float(*(rs_allocation*)buf1417, *(uint32_t*)buf1418); + *(float2*)buf1419 = rsGetElementAt_float2(*(rs_allocation*)buf1420, *(uint32_t*)buf1421); + *(float3*)buf1422 = rsGetElementAt_float3(*(rs_allocation*)buf1423, *(uint32_t*)buf1424); + *(float4*)buf1425 = rsGetElementAt_float4(*(rs_allocation*)buf1426, *(uint32_t*)buf1427); + *(double*)buf1428 = rsGetElementAt_double(*(rs_allocation*)buf1429, *(uint32_t*)buf1430); + *(double2*)buf1431 = rsGetElementAt_double2(*(rs_allocation*)buf1432, *(uint32_t*)buf1433); + *(double3*)buf1434 = rsGetElementAt_double3(*(rs_allocation*)buf1435, *(uint32_t*)buf1436); + *(double4*)buf1437 = rsGetElementAt_double4(*(rs_allocation*)buf1438, *(uint32_t*)buf1439); + *(char*)buf1440 = rsGetElementAt_char(*(rs_allocation*)buf1441, *(uint32_t*)buf1442); + *(char2*)buf1443 = rsGetElementAt_char2(*(rs_allocation*)buf1444, *(uint32_t*)buf1445); + *(char3*)buf1446 = rsGetElementAt_char3(*(rs_allocation*)buf1447, *(uint32_t*)buf1448); + *(char4*)buf1449 = rsGetElementAt_char4(*(rs_allocation*)buf1450, *(uint32_t*)buf1451); + *(uchar*)buf1452 = rsGetElementAt_uchar(*(rs_allocation*)buf1453, *(uint32_t*)buf1454); + *(uchar2*)buf1455 = rsGetElementAt_uchar2(*(rs_allocation*)buf1456, *(uint32_t*)buf1457); + *(uchar3*)buf1458 = rsGetElementAt_uchar3(*(rs_allocation*)buf1459, *(uint32_t*)buf1460); + *(uchar4*)buf1461 = rsGetElementAt_uchar4(*(rs_allocation*)buf1462, *(uint32_t*)buf1463); + *(short*)buf1464 = rsGetElementAt_short(*(rs_allocation*)buf1465, *(uint32_t*)buf1466); + *(short2*)buf1467 = rsGetElementAt_short2(*(rs_allocation*)buf1468, *(uint32_t*)buf1469); + *(short3*)buf1470 = rsGetElementAt_short3(*(rs_allocation*)buf1471, *(uint32_t*)buf1472); + *(short4*)buf1473 = rsGetElementAt_short4(*(rs_allocation*)buf1474, *(uint32_t*)buf1475); + *(ushort*)buf1476 = rsGetElementAt_ushort(*(rs_allocation*)buf1477, *(uint32_t*)buf1478); + *(ushort2*)buf1479 = rsGetElementAt_ushort2(*(rs_allocation*)buf1480, *(uint32_t*)buf1481); + *(ushort3*)buf1482 = rsGetElementAt_ushort3(*(rs_allocation*)buf1483, *(uint32_t*)buf1484); + *(ushort4*)buf1485 = rsGetElementAt_ushort4(*(rs_allocation*)buf1486, *(uint32_t*)buf1487); + *(int*)buf1488 = rsGetElementAt_int(*(rs_allocation*)buf1489, *(uint32_t*)buf1490); + *(int2*)buf1491 = rsGetElementAt_int2(*(rs_allocation*)buf1492, *(uint32_t*)buf1493); + *(int3*)buf1494 = rsGetElementAt_int3(*(rs_allocation*)buf1495, *(uint32_t*)buf1496); + *(int4*)buf1497 = rsGetElementAt_int4(*(rs_allocation*)buf1498, *(uint32_t*)buf1499); + *(uint*)buf1500 = rsGetElementAt_uint(*(rs_allocation*)buf1501, *(uint32_t*)buf1502); + *(uint2*)buf1503 = rsGetElementAt_uint2(*(rs_allocation*)buf1504, *(uint32_t*)buf1505); + *(uint3*)buf1506 = rsGetElementAt_uint3(*(rs_allocation*)buf1507, *(uint32_t*)buf1508); + *(uint4*)buf1509 = rsGetElementAt_uint4(*(rs_allocation*)buf1510, *(uint32_t*)buf1511); + *(long*)buf1512 = rsGetElementAt_long(*(rs_allocation*)buf1513, *(uint32_t*)buf1514); + *(long2*)buf1515 = rsGetElementAt_long2(*(rs_allocation*)buf1516, *(uint32_t*)buf1517); + *(long3*)buf1518 = rsGetElementAt_long3(*(rs_allocation*)buf1519, *(uint32_t*)buf1520); + *(long4*)buf1521 = rsGetElementAt_long4(*(rs_allocation*)buf1522, *(uint32_t*)buf1523); + *(ulong*)buf1524 = rsGetElementAt_ulong(*(rs_allocation*)buf1525, *(uint32_t*)buf1526); + *(ulong2*)buf1527 = rsGetElementAt_ulong2(*(rs_allocation*)buf1528, *(uint32_t*)buf1529); + *(ulong3*)buf1530 = rsGetElementAt_ulong3(*(rs_allocation*)buf1531, *(uint32_t*)buf1532); + *(ulong4*)buf1533 = rsGetElementAt_ulong4(*(rs_allocation*)buf1534, *(uint32_t*)buf1535); + *(float*)buf1536 = rsGetElementAt_float(*(rs_allocation*)buf1537, *(uint32_t*)buf1538, *(uint32_t*)buf1539); + *(float2*)buf1540 = rsGetElementAt_float2(*(rs_allocation*)buf1541, *(uint32_t*)buf1542, *(uint32_t*)buf1543); + *(float3*)buf1544 = rsGetElementAt_float3(*(rs_allocation*)buf1545, *(uint32_t*)buf1546, *(uint32_t*)buf1547); + *(float4*)buf1548 = rsGetElementAt_float4(*(rs_allocation*)buf1549, *(uint32_t*)buf1550, *(uint32_t*)buf1551); + *(double*)buf1552 = rsGetElementAt_double(*(rs_allocation*)buf1553, *(uint32_t*)buf1554, *(uint32_t*)buf1555); + *(double2*)buf1556 = rsGetElementAt_double2(*(rs_allocation*)buf1557, *(uint32_t*)buf1558, *(uint32_t*)buf1559); + *(double3*)buf1560 = rsGetElementAt_double3(*(rs_allocation*)buf1561, *(uint32_t*)buf1562, *(uint32_t*)buf1563); + *(double4*)buf1564 = rsGetElementAt_double4(*(rs_allocation*)buf1565, *(uint32_t*)buf1566, *(uint32_t*)buf1567); + *(char*)buf1568 = rsGetElementAt_char(*(rs_allocation*)buf1569, *(uint32_t*)buf1570, *(uint32_t*)buf1571); + *(char2*)buf1572 = rsGetElementAt_char2(*(rs_allocation*)buf1573, *(uint32_t*)buf1574, *(uint32_t*)buf1575); + *(char3*)buf1576 = rsGetElementAt_char3(*(rs_allocation*)buf1577, *(uint32_t*)buf1578, *(uint32_t*)buf1579); + *(char4*)buf1580 = rsGetElementAt_char4(*(rs_allocation*)buf1581, *(uint32_t*)buf1582, *(uint32_t*)buf1583); + *(uchar*)buf1584 = rsGetElementAt_uchar(*(rs_allocation*)buf1585, *(uint32_t*)buf1586, *(uint32_t*)buf1587); + *(uchar2*)buf1588 = rsGetElementAt_uchar2(*(rs_allocation*)buf1589, *(uint32_t*)buf1590, *(uint32_t*)buf1591); + *(uchar3*)buf1592 = rsGetElementAt_uchar3(*(rs_allocation*)buf1593, *(uint32_t*)buf1594, *(uint32_t*)buf1595); + *(uchar4*)buf1596 = rsGetElementAt_uchar4(*(rs_allocation*)buf1597, *(uint32_t*)buf1598, *(uint32_t*)buf1599); + *(short*)buf1600 = rsGetElementAt_short(*(rs_allocation*)buf1601, *(uint32_t*)buf1602, *(uint32_t*)buf1603); + *(short2*)buf1604 = rsGetElementAt_short2(*(rs_allocation*)buf1605, *(uint32_t*)buf1606, *(uint32_t*)buf1607); + *(short3*)buf1608 = rsGetElementAt_short3(*(rs_allocation*)buf1609, *(uint32_t*)buf1610, *(uint32_t*)buf1611); + *(short4*)buf1612 = rsGetElementAt_short4(*(rs_allocation*)buf1613, *(uint32_t*)buf1614, *(uint32_t*)buf1615); + *(ushort*)buf1616 = rsGetElementAt_ushort(*(rs_allocation*)buf1617, *(uint32_t*)buf1618, *(uint32_t*)buf1619); + *(ushort2*)buf1620 = rsGetElementAt_ushort2(*(rs_allocation*)buf1621, *(uint32_t*)buf1622, *(uint32_t*)buf1623); + *(ushort3*)buf1624 = rsGetElementAt_ushort3(*(rs_allocation*)buf1625, *(uint32_t*)buf1626, *(uint32_t*)buf1627); + *(ushort4*)buf1628 = rsGetElementAt_ushort4(*(rs_allocation*)buf1629, *(uint32_t*)buf1630, *(uint32_t*)buf1631); + *(int*)buf1632 = rsGetElementAt_int(*(rs_allocation*)buf1633, *(uint32_t*)buf1634, *(uint32_t*)buf1635); + *(int2*)buf1636 = rsGetElementAt_int2(*(rs_allocation*)buf1637, *(uint32_t*)buf1638, *(uint32_t*)buf1639); + *(int3*)buf1640 = rsGetElementAt_int3(*(rs_allocation*)buf1641, *(uint32_t*)buf1642, *(uint32_t*)buf1643); + *(int4*)buf1644 = rsGetElementAt_int4(*(rs_allocation*)buf1645, *(uint32_t*)buf1646, *(uint32_t*)buf1647); + *(uint*)buf1648 = rsGetElementAt_uint(*(rs_allocation*)buf1649, *(uint32_t*)buf1650, *(uint32_t*)buf1651); + *(uint2*)buf1652 = rsGetElementAt_uint2(*(rs_allocation*)buf1653, *(uint32_t*)buf1654, *(uint32_t*)buf1655); + *(uint3*)buf1656 = rsGetElementAt_uint3(*(rs_allocation*)buf1657, *(uint32_t*)buf1658, *(uint32_t*)buf1659); + *(uint4*)buf1660 = rsGetElementAt_uint4(*(rs_allocation*)buf1661, *(uint32_t*)buf1662, *(uint32_t*)buf1663); + *(long*)buf1664 = rsGetElementAt_long(*(rs_allocation*)buf1665, *(uint32_t*)buf1666, *(uint32_t*)buf1667); + *(long2*)buf1668 = rsGetElementAt_long2(*(rs_allocation*)buf1669, *(uint32_t*)buf1670, *(uint32_t*)buf1671); + *(long3*)buf1672 = rsGetElementAt_long3(*(rs_allocation*)buf1673, *(uint32_t*)buf1674, *(uint32_t*)buf1675); + *(long4*)buf1676 = rsGetElementAt_long4(*(rs_allocation*)buf1677, *(uint32_t*)buf1678, *(uint32_t*)buf1679); + *(ulong*)buf1680 = rsGetElementAt_ulong(*(rs_allocation*)buf1681, *(uint32_t*)buf1682, *(uint32_t*)buf1683); + *(ulong2*)buf1684 = rsGetElementAt_ulong2(*(rs_allocation*)buf1685, *(uint32_t*)buf1686, *(uint32_t*)buf1687); + *(ulong3*)buf1688 = rsGetElementAt_ulong3(*(rs_allocation*)buf1689, *(uint32_t*)buf1690, *(uint32_t*)buf1691); + *(ulong4*)buf1692 = rsGetElementAt_ulong4(*(rs_allocation*)buf1693, *(uint32_t*)buf1694, *(uint32_t*)buf1695); + *(float*)buf1696 = rsGetElementAt_float(*(rs_allocation*)buf1697, *(uint32_t*)buf1698, *(uint32_t*)buf1699, *(uint32_t*)buf1700); + *(float2*)buf1701 = rsGetElementAt_float2(*(rs_allocation*)buf1702, *(uint32_t*)buf1703, *(uint32_t*)buf1704, *(uint32_t*)buf1705); + *(float3*)buf1706 = rsGetElementAt_float3(*(rs_allocation*)buf1707, *(uint32_t*)buf1708, *(uint32_t*)buf1709, *(uint32_t*)buf1710); + *(float4*)buf1711 = rsGetElementAt_float4(*(rs_allocation*)buf1712, *(uint32_t*)buf1713, *(uint32_t*)buf1714, *(uint32_t*)buf1715); + *(double*)buf1716 = rsGetElementAt_double(*(rs_allocation*)buf1717, *(uint32_t*)buf1718, *(uint32_t*)buf1719, *(uint32_t*)buf1720); + *(double2*)buf1721 = rsGetElementAt_double2(*(rs_allocation*)buf1722, *(uint32_t*)buf1723, *(uint32_t*)buf1724, *(uint32_t*)buf1725); + *(double3*)buf1726 = rsGetElementAt_double3(*(rs_allocation*)buf1727, *(uint32_t*)buf1728, *(uint32_t*)buf1729, *(uint32_t*)buf1730); + *(double4*)buf1731 = rsGetElementAt_double4(*(rs_allocation*)buf1732, *(uint32_t*)buf1733, *(uint32_t*)buf1734, *(uint32_t*)buf1735); + *(char*)buf1736 = rsGetElementAt_char(*(rs_allocation*)buf1737, *(uint32_t*)buf1738, *(uint32_t*)buf1739, *(uint32_t*)buf1740); + *(char2*)buf1741 = rsGetElementAt_char2(*(rs_allocation*)buf1742, *(uint32_t*)buf1743, *(uint32_t*)buf1744, *(uint32_t*)buf1745); + *(char3*)buf1746 = rsGetElementAt_char3(*(rs_allocation*)buf1747, *(uint32_t*)buf1748, *(uint32_t*)buf1749, *(uint32_t*)buf1750); + *(char4*)buf1751 = rsGetElementAt_char4(*(rs_allocation*)buf1752, *(uint32_t*)buf1753, *(uint32_t*)buf1754, *(uint32_t*)buf1755); + *(uchar*)buf1756 = rsGetElementAt_uchar(*(rs_allocation*)buf1757, *(uint32_t*)buf1758, *(uint32_t*)buf1759, *(uint32_t*)buf1760); + *(uchar2*)buf1761 = rsGetElementAt_uchar2(*(rs_allocation*)buf1762, *(uint32_t*)buf1763, *(uint32_t*)buf1764, *(uint32_t*)buf1765); + *(uchar3*)buf1766 = rsGetElementAt_uchar3(*(rs_allocation*)buf1767, *(uint32_t*)buf1768, *(uint32_t*)buf1769, *(uint32_t*)buf1770); + *(uchar4*)buf1771 = rsGetElementAt_uchar4(*(rs_allocation*)buf1772, *(uint32_t*)buf1773, *(uint32_t*)buf1774, *(uint32_t*)buf1775); + *(short*)buf1776 = rsGetElementAt_short(*(rs_allocation*)buf1777, *(uint32_t*)buf1778, *(uint32_t*)buf1779, *(uint32_t*)buf1780); + *(short2*)buf1781 = rsGetElementAt_short2(*(rs_allocation*)buf1782, *(uint32_t*)buf1783, *(uint32_t*)buf1784, *(uint32_t*)buf1785); + *(short3*)buf1786 = rsGetElementAt_short3(*(rs_allocation*)buf1787, *(uint32_t*)buf1788, *(uint32_t*)buf1789, *(uint32_t*)buf1790); + *(short4*)buf1791 = rsGetElementAt_short4(*(rs_allocation*)buf1792, *(uint32_t*)buf1793, *(uint32_t*)buf1794, *(uint32_t*)buf1795); + *(ushort*)buf1796 = rsGetElementAt_ushort(*(rs_allocation*)buf1797, *(uint32_t*)buf1798, *(uint32_t*)buf1799, *(uint32_t*)buf1800); + *(ushort2*)buf1801 = rsGetElementAt_ushort2(*(rs_allocation*)buf1802, *(uint32_t*)buf1803, *(uint32_t*)buf1804, *(uint32_t*)buf1805); + *(ushort3*)buf1806 = rsGetElementAt_ushort3(*(rs_allocation*)buf1807, *(uint32_t*)buf1808, *(uint32_t*)buf1809, *(uint32_t*)buf1810); + *(ushort4*)buf1811 = rsGetElementAt_ushort4(*(rs_allocation*)buf1812, *(uint32_t*)buf1813, *(uint32_t*)buf1814, *(uint32_t*)buf1815); + *(int*)buf1816 = rsGetElementAt_int(*(rs_allocation*)buf1817, *(uint32_t*)buf1818, *(uint32_t*)buf1819, *(uint32_t*)buf1820); + *(int2*)buf1821 = rsGetElementAt_int2(*(rs_allocation*)buf1822, *(uint32_t*)buf1823, *(uint32_t*)buf1824, *(uint32_t*)buf1825); + *(int3*)buf1826 = rsGetElementAt_int3(*(rs_allocation*)buf1827, *(uint32_t*)buf1828, *(uint32_t*)buf1829, *(uint32_t*)buf1830); + *(int4*)buf1831 = rsGetElementAt_int4(*(rs_allocation*)buf1832, *(uint32_t*)buf1833, *(uint32_t*)buf1834, *(uint32_t*)buf1835); + *(uint*)buf1836 = rsGetElementAt_uint(*(rs_allocation*)buf1837, *(uint32_t*)buf1838, *(uint32_t*)buf1839, *(uint32_t*)buf1840); + *(uint2*)buf1841 = rsGetElementAt_uint2(*(rs_allocation*)buf1842, *(uint32_t*)buf1843, *(uint32_t*)buf1844, *(uint32_t*)buf1845); + *(uint3*)buf1846 = rsGetElementAt_uint3(*(rs_allocation*)buf1847, *(uint32_t*)buf1848, *(uint32_t*)buf1849, *(uint32_t*)buf1850); + *(uint4*)buf1851 = rsGetElementAt_uint4(*(rs_allocation*)buf1852, *(uint32_t*)buf1853, *(uint32_t*)buf1854, *(uint32_t*)buf1855); + *(long*)buf1856 = rsGetElementAt_long(*(rs_allocation*)buf1857, *(uint32_t*)buf1858, *(uint32_t*)buf1859, *(uint32_t*)buf1860); + *(long2*)buf1861 = rsGetElementAt_long2(*(rs_allocation*)buf1862, *(uint32_t*)buf1863, *(uint32_t*)buf1864, *(uint32_t*)buf1865); + *(long3*)buf1866 = rsGetElementAt_long3(*(rs_allocation*)buf1867, *(uint32_t*)buf1868, *(uint32_t*)buf1869, *(uint32_t*)buf1870); + *(long4*)buf1871 = rsGetElementAt_long4(*(rs_allocation*)buf1872, *(uint32_t*)buf1873, *(uint32_t*)buf1874, *(uint32_t*)buf1875); + *(ulong*)buf1876 = rsGetElementAt_ulong(*(rs_allocation*)buf1877, *(uint32_t*)buf1878, *(uint32_t*)buf1879, *(uint32_t*)buf1880); + *(ulong2*)buf1881 = rsGetElementAt_ulong2(*(rs_allocation*)buf1882, *(uint32_t*)buf1883, *(uint32_t*)buf1884, *(uint32_t*)buf1885); + *(ulong3*)buf1886 = rsGetElementAt_ulong3(*(rs_allocation*)buf1887, *(uint32_t*)buf1888, *(uint32_t*)buf1889, *(uint32_t*)buf1890); + *(ulong4*)buf1891 = rsGetElementAt_ulong4(*(rs_allocation*)buf1892, *(uint32_t*)buf1893, *(uint32_t*)buf1894, *(uint32_t*)buf1895); + *(bool*)buf1896 = rsIsObject(*(rs_element*)buf1897); + *(bool*)buf1898 = rsIsObject(*(rs_type*)buf1899); + *(bool*)buf1900 = rsIsObject(*(rs_allocation*)buf1901); + *(bool*)buf1902 = rsIsObject(*(rs_sampler*)buf1903); + *(bool*)buf1904 = rsIsObject(*(rs_script*)buf1905); +#ifndef __LP64__ + *(bool*)buf1906 = rsIsObject(*(rs_mesh*)buf1907); + *(bool*)buf1908 = rsIsObject(*(rs_program_fragment*)buf1909); + *(bool*)buf1910 = rsIsObject(*(rs_program_vertex*)buf1911); + *(bool*)buf1912 = rsIsObject(*(rs_program_raster*)buf1913); + *(bool*)buf1914 = rsIsObject(*(rs_program_store*)buf1915); + *(bool*)buf1916 = rsIsObject(*(rs_font*)buf1917); +#endif + *(bool*)buf1918 = rsIsSphereInFrustum((float4*) buf1919, (float4*) buf1920, (float4*) buf1921, (float4*) buf1922, (float4*) buf1923, (float4*) buf1924, (float4*) buf1925); + *(rs_tm**)buf1926 = rsLocaltime((rs_tm*) buf1927, (const rs_time_t*) buf1928); + *(float*)buf1929 = rsMatrixGet((const rs_matrix4x4*) buf1930, *(uint32_t*)buf1931, *(uint32_t*)buf1932); + *(float*)buf1933 = rsMatrixGet((const rs_matrix3x3*) buf1934, *(uint32_t*)buf1935, *(uint32_t*)buf1936); + *(float*)buf1937 = rsMatrixGet((const rs_matrix2x2*) buf1938, *(uint32_t*)buf1939, *(uint32_t*)buf1940); + *(bool*)buf1941 = rsMatrixInverse((rs_matrix4x4*) buf1942); + *(bool*)buf1943 = rsMatrixInverseTranspose((rs_matrix4x4*) buf1944); + rsMatrixLoad((rs_matrix4x4*) buf1945, (const float*) buf1946); + rsMatrixLoad((rs_matrix3x3*) buf1947, (const float*) buf1948); + rsMatrixLoad((rs_matrix2x2*) buf1949, (const float*) buf1950); + rsMatrixLoad((rs_matrix4x4*) buf1951, (const rs_matrix4x4*) buf1952); + rsMatrixLoad((rs_matrix3x3*) buf1953, (const rs_matrix3x3*) buf1954); + rsMatrixLoad((rs_matrix2x2*) buf1955, (const rs_matrix2x2*) buf1956); + rsMatrixLoad((rs_matrix4x4*) buf1957, (const rs_matrix3x3*) buf1958); + rsMatrixLoad((rs_matrix4x4*) buf1959, (const rs_matrix2x2*) buf1960); + rsMatrixLoadFrustum((rs_matrix4x4*) buf1961, *(float*)buf1962, *(float*)buf1963, *(float*)buf1964, *(float*)buf1965, *(float*)buf1966, *(float*)buf1967); + rsMatrixLoadIdentity((rs_matrix4x4*) buf1968); + rsMatrixLoadIdentity((rs_matrix3x3*) buf1969); + rsMatrixLoadIdentity((rs_matrix2x2*) buf1970); + rsMatrixLoadMultiply((rs_matrix4x4*) buf1971, (const rs_matrix4x4*) buf1972, (const rs_matrix4x4*) buf1973); + rsMatrixLoadMultiply((rs_matrix3x3*) buf1974, (const rs_matrix3x3*) buf1975, (const rs_matrix3x3*) buf1976); + rsMatrixLoadMultiply((rs_matrix2x2*) buf1977, (const rs_matrix2x2*) buf1978, (const rs_matrix2x2*) buf1979); + rsMatrixLoadOrtho((rs_matrix4x4*) buf1980, *(float*)buf1981, *(float*)buf1982, *(float*)buf1983, *(float*)buf1984, *(float*)buf1985, *(float*)buf1986); + rsMatrixLoadPerspective((rs_matrix4x4*) buf1987, *(float*)buf1988, *(float*)buf1989, *(float*)buf1990, *(float*)buf1991); + rsMatrixLoadRotate((rs_matrix4x4*) buf1992, *(float*)buf1993, *(float*)buf1994, *(float*)buf1995, *(float*)buf1996); + rsMatrixLoadScale((rs_matrix4x4*) buf1997, *(float*)buf1998, *(float*)buf1999, *(float*)buf2000); + rsMatrixLoadTranslate((rs_matrix4x4*) buf2001, *(float*)buf2002, *(float*)buf2003, *(float*)buf2004); + rsMatrixMultiply((rs_matrix4x4*) buf2005, (const rs_matrix4x4*) buf2006); + rsMatrixMultiply((rs_matrix3x3*) buf2007, (const rs_matrix3x3*) buf2008); + rsMatrixMultiply((rs_matrix2x2*) buf2009, (const rs_matrix2x2*) buf2010); + *(float4*)buf2011 = rsMatrixMultiply((const rs_matrix4x4*) buf2012, *(float4*)buf2013); + *(float4*)buf2014 = rsMatrixMultiply((const rs_matrix4x4*) buf2015, *(float3*)buf2016); + *(float4*)buf2017 = rsMatrixMultiply((const rs_matrix4x4*) buf2018, *(float2*)buf2019); + *(float3*)buf2020 = rsMatrixMultiply((const rs_matrix3x3*) buf2021, *(float3*)buf2022); + *(float3*)buf2023 = rsMatrixMultiply((const rs_matrix3x3*) buf2024, *(float2*)buf2025); + *(float2*)buf2026 = rsMatrixMultiply((const rs_matrix2x2*) buf2027, *(float2*)buf2028); + rsMatrixRotate((rs_matrix4x4*) buf2029, *(float*)buf2030, *(float*)buf2031, *(float*)buf2032, *(float*)buf2033); + rsMatrixScale((rs_matrix4x4*) buf2034, *(float*)buf2035, *(float*)buf2036, *(float*)buf2037); + rsMatrixSet((rs_matrix4x4*) buf2038, *(uint32_t*)buf2039, *(uint32_t*)buf2040, *(float*)buf2041); + rsMatrixSet((rs_matrix3x3*) buf2042, *(uint32_t*)buf2043, *(uint32_t*)buf2044, *(float*)buf2045); + rsMatrixSet((rs_matrix2x2*) buf2046, *(uint32_t*)buf2047, *(uint32_t*)buf2048, *(float*)buf2049); + rsMatrixTranslate((rs_matrix4x4*) buf2050, *(float*)buf2051, *(float*)buf2052, *(float*)buf2053); + rsMatrixTranspose((rs_matrix4x4*) buf2054); + rsMatrixTranspose((rs_matrix3x3*) buf2055); + rsMatrixTranspose((rs_matrix2x2*) buf2056); + *(uchar4*)buf2057 = rsPackColorTo8888(*(float*)buf2058, *(float*)buf2059, *(float*)buf2060); + *(uchar4*)buf2061 = rsPackColorTo8888(*(float*)buf2062, *(float*)buf2063, *(float*)buf2064, *(float*)buf2065); + *(uchar4*)buf2066 = rsPackColorTo8888(*(float3*)buf2067); + *(uchar4*)buf2068 = rsPackColorTo8888(*(float4*)buf2069); + rsQuaternionAdd((rs_quaternion*) buf2070, (const rs_quaternion*) buf2071); + rsQuaternionConjugate((rs_quaternion*) buf2072); + *(float*)buf2073 = rsQuaternionDot((const rs_quaternion*) buf2074, (const rs_quaternion*) buf2075); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2076, (const rs_quaternion*) buf2077); + rsQuaternionLoadRotate((rs_quaternion*) buf2078, *(float*)buf2079, *(float*)buf2080, *(float*)buf2081, *(float*)buf2082); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2083, *(float*)buf2084, *(float*)buf2085, *(float*)buf2086, *(float*)buf2087); + rsQuaternionMultiply((rs_quaternion*) buf2088, *(float*)buf2089); + rsQuaternionMultiply((rs_quaternion*) buf2090, (const rs_quaternion*) buf2091); + rsQuaternionNormalize((rs_quaternion*) buf2092); + rsQuaternionSet((rs_quaternion*) buf2093, *(float*)buf2094, *(float*)buf2095, *(float*)buf2096, *(float*)buf2097); + rsQuaternionSet((rs_quaternion*) buf2098, (const rs_quaternion*) buf2099); + rsQuaternionSlerp((rs_quaternion*) buf2100, (const rs_quaternion*) buf2101, (const rs_quaternion*) buf2102, *(float*)buf2103); + *(int*)buf2104 = rsRand(*(int*)buf2105); + *(int*)buf2106 = rsRand(*(int*)buf2107, *(int*)buf2108); + *(float*)buf2109 = rsRand(*(float*)buf2110); + *(float*)buf2111 = rsRand(*(float*)buf2112, *(float*)buf2113); + *(bool*)buf2114 = rsSendToClient(*(int*)buf2115); + *(bool*)buf2116 = rsSendToClient(*(int*)buf2117, (const void*) buf2118, *(uint*)buf2119); + rsSendToClientBlocking(*(int*)buf2120); + rsSendToClientBlocking(*(int*)buf2121, (const void*) buf2122, *(uint*)buf2123); + rsSetObject((rs_element*) buf2124, *(rs_element*)buf2125); + rsSetObject((rs_type*) buf2126, *(rs_type*)buf2127); + rsSetObject((rs_allocation*) buf2128, *(rs_allocation*)buf2129); + rsSetObject((rs_sampler*) buf2130, *(rs_sampler*)buf2131); + rsSetObject((rs_script*) buf2132, *(rs_script*)buf2133); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2134, *(rs_mesh*)buf2135); + rsSetObject((rs_program_fragment*) buf2136, *(rs_program_fragment*)buf2137); + rsSetObject((rs_program_vertex*) buf2138, *(rs_program_vertex*)buf2139); + rsSetObject((rs_program_raster*) buf2140, *(rs_program_raster*)buf2141); + rsSetObject((rs_program_store*) buf2142, *(rs_program_store*)buf2143); + rsSetObject((rs_font*) buf2144, *(rs_font*)buf2145); +#endif + *(rs_time_t*)buf2146 = rsTime((rs_time_t*) buf2147); + *(float4*)buf2148 = rsUnpackColor8888(*(uchar4*)buf2149); + *(int64_t*)buf2150 = rsUptimeMillis(); + *(int64_t*)buf2151 = rsUptimeNanos(); + *(float4*)buf2152 = rsYuvToRGBA_float4(*(uchar*)buf2153, *(uchar*)buf2154, *(uchar*)buf2155); + *(uchar4*)buf2156 = rsYuvToRGBA_uchar4(*(uchar*)buf2157, *(uchar*)buf2158, *(uchar*)buf2159); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2160); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2161, *(rs_allocation_usage_type*)buf2162); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf2163, *(uint*)buf2164); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2165, *(uint*)buf2166, *(rs_allocation*)buf2167); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2168, *(uint*)buf2169, *(rs_allocation*)buf2170); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf2171); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2172); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2173); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2174); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2175); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2176); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2177, *(uint*)buf2178, *(rs_sampler*)buf2179); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2180, *(uint*)buf2181, *(rs_allocation*)buf2182); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2183, *(float*)buf2184, *(float*)buf2185, *(float*)buf2186); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf2187); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2188); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2189); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2190, *(uint*)buf2191); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2192, *(uint*)buf2193, *(uint*)buf2194, *(uint*)buf2195); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2196, *(float*)buf2197, *(float*)buf2198, *(float*)buf2199, *(float*)buf2200, *(float*)buf2201, *(float*)buf2202, *(float*)buf2203, *(float*)buf2204, *(float*)buf2205, *(float*)buf2206, *(float*)buf2207); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2208, *(float*)buf2209, *(float*)buf2210, *(float*)buf2211, *(float*)buf2212, *(float*)buf2213, *(float*)buf2214, *(float*)buf2215, *(float*)buf2216, *(float*)buf2217, *(float*)buf2218, *(float*)buf2219, *(float*)buf2220, *(float*)buf2221, *(float*)buf2222, *(float*)buf2223, *(float*)buf2224, *(float*)buf2225, *(float*)buf2226, *(float*)buf2227); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2228, *(float*)buf2229, *(float*)buf2230, *(float*)buf2231, *(float*)buf2232); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2233, *(float*)buf2234, *(float*)buf2235, *(float*)buf2236, *(float*)buf2237); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2238, *(int*)buf2239, *(int*)buf2240); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2241, *(int*)buf2242, *(int*)buf2243); +#endif +#ifndef __LP64__ + *(uint*)buf2244 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2245, *(float*)buf2246, *(float*)buf2247, *(float*)buf2248); +#endif +#ifndef __LP64__ + *(uint*)buf2249 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2250 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2251, (int*) buf2252, (int*) buf2253, (int*) buf2254, (int*) buf2255); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2256, (int*) buf2257, (int*) buf2258, (int*) buf2259, (int*) buf2260); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2261, (float*) buf2262, (float*) buf2263, (float*) buf2264, (float*) buf2265, (float*) buf2266, (float*) buf2267); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2268, (float3*) buf2269, (float3*) buf2270); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf2271, *(float*)buf2272, *(float*)buf2273, *(float*)buf2274, *(float*)buf2275); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf2276); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf2277); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf2278); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf2279); +#endif + *(float*)buf2280 = rsqrt(*(float*)buf2281); + *(float2*)buf2282 = rsqrt(*(float2*)buf2283); + *(float3*)buf2284 = rsqrt(*(float3*)buf2285); + *(float4*)buf2286 = rsqrt(*(float4*)buf2287); + *(float*)buf2288 = sign(*(float*)buf2289); + *(float2*)buf2290 = sign(*(float2*)buf2291); + *(float3*)buf2292 = sign(*(float3*)buf2293); + *(float4*)buf2294 = sign(*(float4*)buf2295); + *(float*)buf2296 = sin(*(float*)buf2297); + *(float2*)buf2298 = sin(*(float2*)buf2299); + *(float3*)buf2300 = sin(*(float3*)buf2301); + *(float4*)buf2302 = sin(*(float4*)buf2303); + *(float*)buf2304 = sincos(*(float*)buf2305, (float*) buf2306); + *(float2*)buf2307 = sincos(*(float2*)buf2308, (float2*) buf2309); + *(float3*)buf2310 = sincos(*(float3*)buf2311, (float3*) buf2312); + *(float4*)buf2313 = sincos(*(float4*)buf2314, (float4*) buf2315); + *(float*)buf2316 = sinh(*(float*)buf2317); + *(float2*)buf2318 = sinh(*(float2*)buf2319); + *(float3*)buf2320 = sinh(*(float3*)buf2321); + *(float4*)buf2322 = sinh(*(float4*)buf2323); + *(float*)buf2324 = sinpi(*(float*)buf2325); + *(float2*)buf2326 = sinpi(*(float2*)buf2327); + *(float3*)buf2328 = sinpi(*(float3*)buf2329); + *(float4*)buf2330 = sinpi(*(float4*)buf2331); + *(float*)buf2332 = sqrt(*(float*)buf2333); + *(float2*)buf2334 = sqrt(*(float2*)buf2335); + *(float3*)buf2336 = sqrt(*(float3*)buf2337); + *(float4*)buf2338 = sqrt(*(float4*)buf2339); + *(float*)buf2340 = step(*(float*)buf2341, *(float*)buf2342); + *(float2*)buf2343 = step(*(float2*)buf2344, *(float2*)buf2345); + *(float3*)buf2346 = step(*(float3*)buf2347, *(float3*)buf2348); + *(float4*)buf2349 = step(*(float4*)buf2350, *(float4*)buf2351); + *(float2*)buf2352 = step(*(float2*)buf2353, *(float*)buf2354); + *(float3*)buf2355 = step(*(float3*)buf2356, *(float*)buf2357); + *(float4*)buf2358 = step(*(float4*)buf2359, *(float*)buf2360); + *(float*)buf2361 = tan(*(float*)buf2362); + *(float2*)buf2363 = tan(*(float2*)buf2364); + *(float3*)buf2365 = tan(*(float3*)buf2366); + *(float4*)buf2367 = tan(*(float4*)buf2368); + *(float*)buf2369 = tanh(*(float*)buf2370); + *(float2*)buf2371 = tanh(*(float2*)buf2372); + *(float3*)buf2373 = tanh(*(float3*)buf2374); + *(float4*)buf2375 = tanh(*(float4*)buf2376); + *(float*)buf2377 = tanpi(*(float*)buf2378); + *(float2*)buf2379 = tanpi(*(float2*)buf2380); + *(float3*)buf2381 = tanpi(*(float3*)buf2382); + *(float4*)buf2383 = tanpi(*(float4*)buf2384); + *(float*)buf2385 = tgamma(*(float*)buf2386); + *(float2*)buf2387 = tgamma(*(float2*)buf2388); + *(float3*)buf2389 = tgamma(*(float3*)buf2390); + *(float4*)buf2391 = tgamma(*(float4*)buf2392); + *(float*)buf2393 = trunc(*(float*)buf2394); + *(float2*)buf2395 = trunc(*(float2*)buf2396); + *(float3*)buf2397 = trunc(*(float3*)buf2398); + *(float4*)buf2399 = trunc(*(float4*)buf2400); +}
diff --git a/slang/tests/P_all_api_14/stderr.txt.expect b/slang/tests/P_all_api_14/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_14/stderr.txt.expect
diff --git a/slang/tests/P_all_api_14/stdout.txt.expect b/slang/tests/P_all_api_14/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_14/stdout.txt.expect
diff --git a/slang/tests/P_all_api_15/all15.rs b/slang/tests/P_all_api_15/all15.rs new file mode 100644 index 0000000..1ce2798 --- /dev/null +++ b/slang/tests/P_all_api_15/all15.rs
@@ -0,0 +1,3403 @@ +// -target-api 15 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; + +void root(const int* in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fdim(*(float*)buf637, *(float*)buf638); + *(float2*)buf639 = fdim(*(float2*)buf640, *(float2*)buf641); + *(float3*)buf642 = fdim(*(float3*)buf643, *(float3*)buf644); + *(float4*)buf645 = fdim(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = floor(*(float*)buf649); + *(float2*)buf650 = floor(*(float2*)buf651); + *(float3*)buf652 = floor(*(float3*)buf653); + *(float4*)buf654 = floor(*(float4*)buf655); + *(float*)buf656 = fma(*(float*)buf657, *(float*)buf658, *(float*)buf659); + *(float2*)buf660 = fma(*(float2*)buf661, *(float2*)buf662, *(float2*)buf663); + *(float3*)buf664 = fma(*(float3*)buf665, *(float3*)buf666, *(float3*)buf667); + *(float4*)buf668 = fma(*(float4*)buf669, *(float4*)buf670, *(float4*)buf671); + *(float*)buf672 = fmax(*(float*)buf673, *(float*)buf674); + *(float2*)buf675 = fmax(*(float2*)buf676, *(float2*)buf677); + *(float3*)buf678 = fmax(*(float3*)buf679, *(float3*)buf680); + *(float4*)buf681 = fmax(*(float4*)buf682, *(float4*)buf683); + *(float2*)buf684 = fmax(*(float2*)buf685, *(float*)buf686); + *(float3*)buf687 = fmax(*(float3*)buf688, *(float*)buf689); + *(float4*)buf690 = fmax(*(float4*)buf691, *(float*)buf692); + *(float*)buf693 = fmin(*(float*)buf694, *(float*)buf695); + *(float2*)buf696 = fmin(*(float2*)buf697, *(float2*)buf698); + *(float3*)buf699 = fmin(*(float3*)buf700, *(float3*)buf701); + *(float4*)buf702 = fmin(*(float4*)buf703, *(float4*)buf704); + *(float2*)buf705 = fmin(*(float2*)buf706, *(float*)buf707); + *(float3*)buf708 = fmin(*(float3*)buf709, *(float*)buf710); + *(float4*)buf711 = fmin(*(float4*)buf712, *(float*)buf713); + *(float*)buf714 = fmod(*(float*)buf715, *(float*)buf716); + *(float2*)buf717 = fmod(*(float2*)buf718, *(float2*)buf719); + *(float3*)buf720 = fmod(*(float3*)buf721, *(float3*)buf722); + *(float4*)buf723 = fmod(*(float4*)buf724, *(float4*)buf725); + *(float*)buf726 = fract(*(float*)buf727, (float*) buf728); + *(float2*)buf729 = fract(*(float2*)buf730, (float2*) buf731); + *(float3*)buf732 = fract(*(float3*)buf733, (float3*) buf734); + *(float4*)buf735 = fract(*(float4*)buf736, (float4*) buf737); + *(float*)buf738 = fract(*(float*)buf739); + *(float2*)buf740 = fract(*(float2*)buf741); + *(float3*)buf742 = fract(*(float3*)buf743); + *(float4*)buf744 = fract(*(float4*)buf745); + *(float*)buf746 = frexp(*(float*)buf747, (int*) buf748); + *(float2*)buf749 = frexp(*(float2*)buf750, (int2*) buf751); + *(float3*)buf752 = frexp(*(float3*)buf753, (int3*) buf754); + *(float4*)buf755 = frexp(*(float4*)buf756, (int4*) buf757); + *(float*)buf758 = hypot(*(float*)buf759, *(float*)buf760); + *(float2*)buf761 = hypot(*(float2*)buf762, *(float2*)buf763); + *(float3*)buf764 = hypot(*(float3*)buf765, *(float3*)buf766); + *(float4*)buf767 = hypot(*(float4*)buf768, *(float4*)buf769); + *(int*)buf770 = ilogb(*(float*)buf771); + *(int2*)buf772 = ilogb(*(float2*)buf773); + *(int3*)buf774 = ilogb(*(float3*)buf775); + *(int4*)buf776 = ilogb(*(float4*)buf777); + *(float*)buf778 = ldexp(*(float*)buf779, *(int*)buf780); + *(float2*)buf781 = ldexp(*(float2*)buf782, *(int2*)buf783); + *(float3*)buf784 = ldexp(*(float3*)buf785, *(int3*)buf786); + *(float4*)buf787 = ldexp(*(float4*)buf788, *(int4*)buf789); + *(float2*)buf790 = ldexp(*(float2*)buf791, *(int*)buf792); + *(float3*)buf793 = ldexp(*(float3*)buf794, *(int*)buf795); + *(float4*)buf796 = ldexp(*(float4*)buf797, *(int*)buf798); + *(float*)buf799 = length(*(float*)buf800); + *(float*)buf801 = length(*(float2*)buf802); + *(float*)buf803 = length(*(float3*)buf804); + *(float*)buf805 = length(*(float4*)buf806); + *(float*)buf807 = lgamma(*(float*)buf808); + *(float2*)buf809 = lgamma(*(float2*)buf810); + *(float3*)buf811 = lgamma(*(float3*)buf812); + *(float4*)buf813 = lgamma(*(float4*)buf814); + *(float*)buf815 = lgamma(*(float*)buf816, (int*) buf817); + *(float2*)buf818 = lgamma(*(float2*)buf819, (int2*) buf820); + *(float3*)buf821 = lgamma(*(float3*)buf822, (int3*) buf823); + *(float4*)buf824 = lgamma(*(float4*)buf825, (int4*) buf826); + *(float*)buf827 = log(*(float*)buf828); + *(float2*)buf829 = log(*(float2*)buf830); + *(float3*)buf831 = log(*(float3*)buf832); + *(float4*)buf833 = log(*(float4*)buf834); + *(float*)buf835 = log10(*(float*)buf836); + *(float2*)buf837 = log10(*(float2*)buf838); + *(float3*)buf839 = log10(*(float3*)buf840); + *(float4*)buf841 = log10(*(float4*)buf842); + *(float*)buf843 = log1p(*(float*)buf844); + *(float2*)buf845 = log1p(*(float2*)buf846); + *(float3*)buf847 = log1p(*(float3*)buf848); + *(float4*)buf849 = log1p(*(float4*)buf850); + *(float*)buf851 = log2(*(float*)buf852); + *(float2*)buf853 = log2(*(float2*)buf854); + *(float3*)buf855 = log2(*(float3*)buf856); + *(float4*)buf857 = log2(*(float4*)buf858); + *(float*)buf859 = logb(*(float*)buf860); + *(float2*)buf861 = logb(*(float2*)buf862); + *(float3*)buf863 = logb(*(float3*)buf864); + *(float4*)buf865 = logb(*(float4*)buf866); + *(float*)buf867 = mad(*(float*)buf868, *(float*)buf869, *(float*)buf870); + *(float2*)buf871 = mad(*(float2*)buf872, *(float2*)buf873, *(float2*)buf874); + *(float3*)buf875 = mad(*(float3*)buf876, *(float3*)buf877, *(float3*)buf878); + *(float4*)buf879 = mad(*(float4*)buf880, *(float4*)buf881, *(float4*)buf882); + *(float*)buf883 = max(*(float*)buf884, *(float*)buf885); + *(float2*)buf886 = max(*(float2*)buf887, *(float2*)buf888); + *(float3*)buf889 = max(*(float3*)buf890, *(float3*)buf891); + *(float4*)buf892 = max(*(float4*)buf893, *(float4*)buf894); + *(float2*)buf895 = max(*(float2*)buf896, *(float*)buf897); + *(float3*)buf898 = max(*(float3*)buf899, *(float*)buf900); + *(float4*)buf901 = max(*(float4*)buf902, *(float*)buf903); + *(char*)buf904 = max(*(char*)buf905, *(char*)buf906); + *(uchar*)buf907 = max(*(uchar*)buf908, *(uchar*)buf909); + *(short*)buf910 = max(*(short*)buf911, *(short*)buf912); + *(ushort*)buf913 = max(*(ushort*)buf914, *(ushort*)buf915); + *(int*)buf916 = max(*(int*)buf917, *(int*)buf918); + *(uint*)buf919 = max(*(uint*)buf920, *(uint*)buf921); + *(char2*)buf922 = max(*(char2*)buf923, *(char2*)buf924); + *(uchar2*)buf925 = max(*(uchar2*)buf926, *(uchar2*)buf927); + *(short2*)buf928 = max(*(short2*)buf929, *(short2*)buf930); + *(ushort2*)buf931 = max(*(ushort2*)buf932, *(ushort2*)buf933); + *(int2*)buf934 = max(*(int2*)buf935, *(int2*)buf936); + *(uint2*)buf937 = max(*(uint2*)buf938, *(uint2*)buf939); + *(char3*)buf940 = max(*(char3*)buf941, *(char3*)buf942); + *(uchar3*)buf943 = max(*(uchar3*)buf944, *(uchar3*)buf945); + *(short3*)buf946 = max(*(short3*)buf947, *(short3*)buf948); + *(ushort3*)buf949 = max(*(ushort3*)buf950, *(ushort3*)buf951); + *(int3*)buf952 = max(*(int3*)buf953, *(int3*)buf954); + *(uint3*)buf955 = max(*(uint3*)buf956, *(uint3*)buf957); + *(char4*)buf958 = max(*(char4*)buf959, *(char4*)buf960); + *(uchar4*)buf961 = max(*(uchar4*)buf962, *(uchar4*)buf963); + *(short4*)buf964 = max(*(short4*)buf965, *(short4*)buf966); + *(ushort4*)buf967 = max(*(ushort4*)buf968, *(ushort4*)buf969); + *(int4*)buf970 = max(*(int4*)buf971, *(int4*)buf972); + *(uint4*)buf973 = max(*(uint4*)buf974, *(uint4*)buf975); + *(float*)buf976 = min(*(float*)buf977, *(float*)buf978); + *(float2*)buf979 = min(*(float2*)buf980, *(float2*)buf981); + *(float3*)buf982 = min(*(float3*)buf983, *(float3*)buf984); + *(float4*)buf985 = min(*(float4*)buf986, *(float4*)buf987); + *(float2*)buf988 = min(*(float2*)buf989, *(float*)buf990); + *(float3*)buf991 = min(*(float3*)buf992, *(float*)buf993); + *(float4*)buf994 = min(*(float4*)buf995, *(float*)buf996); + *(char*)buf997 = min(*(char*)buf998, *(char*)buf999); + *(uchar*)buf1000 = min(*(uchar*)buf1001, *(uchar*)buf1002); + *(short*)buf1003 = min(*(short*)buf1004, *(short*)buf1005); + *(ushort*)buf1006 = min(*(ushort*)buf1007, *(ushort*)buf1008); + *(int*)buf1009 = min(*(int*)buf1010, *(int*)buf1011); + *(uint*)buf1012 = min(*(uint*)buf1013, *(uint*)buf1014); + *(char2*)buf1015 = min(*(char2*)buf1016, *(char2*)buf1017); + *(uchar2*)buf1018 = min(*(uchar2*)buf1019, *(uchar2*)buf1020); + *(short2*)buf1021 = min(*(short2*)buf1022, *(short2*)buf1023); + *(ushort2*)buf1024 = min(*(ushort2*)buf1025, *(ushort2*)buf1026); + *(int2*)buf1027 = min(*(int2*)buf1028, *(int2*)buf1029); + *(uint2*)buf1030 = min(*(uint2*)buf1031, *(uint2*)buf1032); + *(char3*)buf1033 = min(*(char3*)buf1034, *(char3*)buf1035); + *(uchar3*)buf1036 = min(*(uchar3*)buf1037, *(uchar3*)buf1038); + *(short3*)buf1039 = min(*(short3*)buf1040, *(short3*)buf1041); + *(ushort3*)buf1042 = min(*(ushort3*)buf1043, *(ushort3*)buf1044); + *(int3*)buf1045 = min(*(int3*)buf1046, *(int3*)buf1047); + *(uint3*)buf1048 = min(*(uint3*)buf1049, *(uint3*)buf1050); + *(char4*)buf1051 = min(*(char4*)buf1052, *(char4*)buf1053); + *(uchar4*)buf1054 = min(*(uchar4*)buf1055, *(uchar4*)buf1056); + *(short4*)buf1057 = min(*(short4*)buf1058, *(short4*)buf1059); + *(ushort4*)buf1060 = min(*(ushort4*)buf1061, *(ushort4*)buf1062); + *(int4*)buf1063 = min(*(int4*)buf1064, *(int4*)buf1065); + *(uint4*)buf1066 = min(*(uint4*)buf1067, *(uint4*)buf1068); + *(float*)buf1069 = mix(*(float*)buf1070, *(float*)buf1071, *(float*)buf1072); + *(float2*)buf1073 = mix(*(float2*)buf1074, *(float2*)buf1075, *(float2*)buf1076); + *(float3*)buf1077 = mix(*(float3*)buf1078, *(float3*)buf1079, *(float3*)buf1080); + *(float4*)buf1081 = mix(*(float4*)buf1082, *(float4*)buf1083, *(float4*)buf1084); + *(float2*)buf1085 = mix(*(float2*)buf1086, *(float2*)buf1087, *(float*)buf1088); + *(float3*)buf1089 = mix(*(float3*)buf1090, *(float3*)buf1091, *(float*)buf1092); + *(float4*)buf1093 = mix(*(float4*)buf1094, *(float4*)buf1095, *(float*)buf1096); + *(float*)buf1097 = modf(*(float*)buf1098, (float*) buf1099); + *(float2*)buf1100 = modf(*(float2*)buf1101, (float2*) buf1102); + *(float3*)buf1103 = modf(*(float3*)buf1104, (float3*) buf1105); + *(float4*)buf1106 = modf(*(float4*)buf1107, (float4*) buf1108); + *(float*)buf1109 = nan(*(uint*)buf1110); + *(float*)buf1111 = nextafter(*(float*)buf1112, *(float*)buf1113); + *(float2*)buf1114 = nextafter(*(float2*)buf1115, *(float2*)buf1116); + *(float3*)buf1117 = nextafter(*(float3*)buf1118, *(float3*)buf1119); + *(float4*)buf1120 = nextafter(*(float4*)buf1121, *(float4*)buf1122); + *(float*)buf1123 = normalize(*(float*)buf1124); + *(float2*)buf1125 = normalize(*(float2*)buf1126); + *(float3*)buf1127 = normalize(*(float3*)buf1128); + *(float4*)buf1129 = normalize(*(float4*)buf1130); + *(float*)buf1131 = pow(*(float*)buf1132, *(float*)buf1133); + *(float2*)buf1134 = pow(*(float2*)buf1135, *(float2*)buf1136); + *(float3*)buf1137 = pow(*(float3*)buf1138, *(float3*)buf1139); + *(float4*)buf1140 = pow(*(float4*)buf1141, *(float4*)buf1142); + *(float*)buf1143 = pown(*(float*)buf1144, *(int*)buf1145); + *(float2*)buf1146 = pown(*(float2*)buf1147, *(int2*)buf1148); + *(float3*)buf1149 = pown(*(float3*)buf1150, *(int3*)buf1151); + *(float4*)buf1152 = pown(*(float4*)buf1153, *(int4*)buf1154); + *(float*)buf1155 = powr(*(float*)buf1156, *(float*)buf1157); + *(float2*)buf1158 = powr(*(float2*)buf1159, *(float2*)buf1160); + *(float3*)buf1161 = powr(*(float3*)buf1162, *(float3*)buf1163); + *(float4*)buf1164 = powr(*(float4*)buf1165, *(float4*)buf1166); + *(float*)buf1167 = radians(*(float*)buf1168); + *(float2*)buf1169 = radians(*(float2*)buf1170); + *(float3*)buf1171 = radians(*(float3*)buf1172); + *(float4*)buf1173 = radians(*(float4*)buf1174); + *(float*)buf1175 = remainder(*(float*)buf1176, *(float*)buf1177); + *(float2*)buf1178 = remainder(*(float2*)buf1179, *(float2*)buf1180); + *(float3*)buf1181 = remainder(*(float3*)buf1182, *(float3*)buf1183); + *(float4*)buf1184 = remainder(*(float4*)buf1185, *(float4*)buf1186); + *(float*)buf1187 = remquo(*(float*)buf1188, *(float*)buf1189, (int*) buf1190); + *(float2*)buf1191 = remquo(*(float2*)buf1192, *(float2*)buf1193, (int2*) buf1194); + *(float3*)buf1195 = remquo(*(float3*)buf1196, *(float3*)buf1197, (int3*) buf1198); + *(float4*)buf1199 = remquo(*(float4*)buf1200, *(float4*)buf1201, (int4*) buf1202); + *(float*)buf1203 = rint(*(float*)buf1204); + *(float2*)buf1205 = rint(*(float2*)buf1206); + *(float3*)buf1207 = rint(*(float3*)buf1208); + *(float4*)buf1209 = rint(*(float4*)buf1210); + *(float*)buf1211 = rootn(*(float*)buf1212, *(int*)buf1213); + *(float2*)buf1214 = rootn(*(float2*)buf1215, *(int2*)buf1216); + *(float3*)buf1217 = rootn(*(float3*)buf1218, *(int3*)buf1219); + *(float4*)buf1220 = rootn(*(float4*)buf1221, *(int4*)buf1222); + *(float*)buf1223 = round(*(float*)buf1224); + *(float2*)buf1225 = round(*(float2*)buf1226); + *(float3*)buf1227 = round(*(float3*)buf1228); + *(float4*)buf1229 = round(*(float4*)buf1230); + rsAllocationCopy1DRange(*(rs_allocation*)buf1231, *(uint32_t*)buf1232, *(uint32_t*)buf1233, *(uint32_t*)buf1234, *(rs_allocation*)buf1235, *(uint32_t*)buf1236, *(uint32_t*)buf1237); + rsAllocationCopy2DRange(*(rs_allocation*)buf1238, *(uint32_t*)buf1239, *(uint32_t*)buf1240, *(uint32_t*)buf1241, *(rs_allocation_cubemap_face*)buf1242, *(uint32_t*)buf1243, *(uint32_t*)buf1244, *(rs_allocation*)buf1245, *(uint32_t*)buf1246, *(uint32_t*)buf1247, *(uint32_t*)buf1248, *(rs_allocation_cubemap_face*)buf1249); + *(uint32_t*)buf1250 = rsAllocationGetDimFaces(*(rs_allocation*)buf1251); + *(uint32_t*)buf1252 = rsAllocationGetDimLOD(*(rs_allocation*)buf1253); + *(uint32_t*)buf1254 = rsAllocationGetDimX(*(rs_allocation*)buf1255); + *(uint32_t*)buf1256 = rsAllocationGetDimY(*(rs_allocation*)buf1257); + *(uint32_t*)buf1258 = rsAllocationGetDimZ(*(rs_allocation*)buf1259); + *(rs_element*)buf1260 = rsAllocationGetElement(*(rs_allocation*)buf1261); + *(int32_t*)buf1262 = rsAtomicAdd((volatile int32_t*) buf1263, *(int32_t*)buf1264); + *(int32_t*)buf1265 = rsAtomicAnd((volatile int32_t*) buf1266, *(int32_t*)buf1267); + *(int32_t*)buf1268 = rsAtomicCas((volatile int32_t*) buf1269, *(int32_t*)buf1270, *(int32_t*)buf1271); + *(uint32_t*)buf1272 = rsAtomicCas((volatile uint32_t*) buf1273, *(uint32_t*)buf1274, *(uint32_t*)buf1275); + *(int32_t*)buf1276 = rsAtomicDec((volatile int32_t*) buf1277); + *(int32_t*)buf1278 = rsAtomicInc((volatile int32_t*) buf1279); + *(uint32_t*)buf1280 = rsAtomicMax((volatile uint32_t*) buf1281, *(uint32_t*)buf1282); + *(int32_t*)buf1283 = rsAtomicMax((volatile int32_t*) buf1284, *(int32_t*)buf1285); + *(uint32_t*)buf1286 = rsAtomicMin((volatile uint32_t*) buf1287, *(uint32_t*)buf1288); + *(int32_t*)buf1289 = rsAtomicMin((volatile int32_t*) buf1290, *(int32_t*)buf1291); + *(int32_t*)buf1292 = rsAtomicOr((volatile int32_t*) buf1293, *(int32_t*)buf1294); + *(int32_t*)buf1295 = rsAtomicSub((volatile int32_t*) buf1296, *(int32_t*)buf1297); + *(int32_t*)buf1298 = rsAtomicXor((volatile int32_t*) buf1299, *(int32_t*)buf1300); + *(char*)buf1301 = rsClamp(*(char*)buf1302, *(char*)buf1303, *(char*)buf1304); + *(uchar*)buf1305 = rsClamp(*(uchar*)buf1306, *(uchar*)buf1307, *(uchar*)buf1308); + *(short*)buf1309 = rsClamp(*(short*)buf1310, *(short*)buf1311, *(short*)buf1312); + *(ushort*)buf1313 = rsClamp(*(ushort*)buf1314, *(ushort*)buf1315, *(ushort*)buf1316); + *(int*)buf1317 = rsClamp(*(int*)buf1318, *(int*)buf1319, *(int*)buf1320); + *(uint*)buf1321 = rsClamp(*(uint*)buf1322, *(uint*)buf1323, *(uint*)buf1324); + rsClearObject((rs_element*) buf1325); + rsClearObject((rs_type*) buf1326); + rsClearObject((rs_allocation*) buf1327); + rsClearObject((rs_sampler*) buf1328); + rsClearObject((rs_script*) buf1329); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1330); + rsClearObject((rs_program_fragment*) buf1331); + rsClearObject((rs_program_vertex*) buf1332); + rsClearObject((rs_program_raster*) buf1333); + rsClearObject((rs_program_store*) buf1334); + rsClearObject((rs_font*) buf1335); +#endif + rsDebug((const char*) buf1336, *(double*)buf1337); + rsDebug((const char*) buf1338, *(int*)buf1339); + rsDebug((const char*) buf1340, *(uint*)buf1341); + rsDebug((const char*) buf1342, *(long*)buf1343); + rsDebug((const char*) buf1344, *(ulong*)buf1345); + rsDebug((const char*) buf1346, *(float*)buf1347); + rsDebug((const char*) buf1348, *(float2*)buf1349); + rsDebug((const char*) buf1350, *(float3*)buf1351); + rsDebug((const char*) buf1352, *(float4*)buf1353); + rsDebug((const char*) buf1354, *(float*)buf1355, *(float*)buf1356); + rsDebug((const char*) buf1357, *(float*)buf1358, *(float*)buf1359, *(float*)buf1360); + rsDebug((const char*) buf1361, *(float*)buf1362, *(float*)buf1363, *(float*)buf1364, *(float*)buf1365); + rsDebug((const char*) buf1366, *(long long*)buf1367); + rsDebug((const char*) buf1368, *(unsigned long long*)buf1369); + rsDebug((const char*) buf1370, (const void*) buf1371); + rsDebug((const char*) buf1372, (const rs_matrix4x4*) buf1373); + rsDebug((const char*) buf1374, (const rs_matrix3x3*) buf1375); + rsDebug((const char*) buf1376, (const rs_matrix2x2*) buf1377); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1378, (float4*) buf1379, (float4*) buf1380, (float4*) buf1381, (float4*) buf1382, (float4*) buf1383, (float4*) buf1384); + rsForEach(*(rs_script*)buf1385, *(rs_allocation*)buf1386, *(rs_allocation*)buf1387, (const void*) buf1388, *(size_t*)buf1389, (const rs_script_call_t*) buf1390); + rsForEach(*(rs_script*)buf1391, *(rs_allocation*)buf1392, *(rs_allocation*)buf1393, (const void*) buf1394, *(size_t*)buf1395); + rsForEach(*(rs_script*)buf1396, *(rs_allocation*)buf1397, *(rs_allocation*)buf1398); + *(float*)buf1399 = rsFrac(*(float*)buf1400); + *(rs_allocation*)buf1401 = rsGetAllocation((const void*) buf1402); + *(float*)buf1403 = rsGetDt(); + *(const void**)buf1404 = rsGetElementAt(*(rs_allocation*)buf1405, *(uint32_t*)buf1406); + *(const void**)buf1407 = rsGetElementAt(*(rs_allocation*)buf1408, *(uint32_t*)buf1409, *(uint32_t*)buf1410); + *(const void**)buf1411 = rsGetElementAt(*(rs_allocation*)buf1412, *(uint32_t*)buf1413, *(uint32_t*)buf1414, *(uint32_t*)buf1415); + *(float*)buf1416 = rsGetElementAt_float(*(rs_allocation*)buf1417, *(uint32_t*)buf1418); + *(float2*)buf1419 = rsGetElementAt_float2(*(rs_allocation*)buf1420, *(uint32_t*)buf1421); + *(float3*)buf1422 = rsGetElementAt_float3(*(rs_allocation*)buf1423, *(uint32_t*)buf1424); + *(float4*)buf1425 = rsGetElementAt_float4(*(rs_allocation*)buf1426, *(uint32_t*)buf1427); + *(double*)buf1428 = rsGetElementAt_double(*(rs_allocation*)buf1429, *(uint32_t*)buf1430); + *(double2*)buf1431 = rsGetElementAt_double2(*(rs_allocation*)buf1432, *(uint32_t*)buf1433); + *(double3*)buf1434 = rsGetElementAt_double3(*(rs_allocation*)buf1435, *(uint32_t*)buf1436); + *(double4*)buf1437 = rsGetElementAt_double4(*(rs_allocation*)buf1438, *(uint32_t*)buf1439); + *(char*)buf1440 = rsGetElementAt_char(*(rs_allocation*)buf1441, *(uint32_t*)buf1442); + *(char2*)buf1443 = rsGetElementAt_char2(*(rs_allocation*)buf1444, *(uint32_t*)buf1445); + *(char3*)buf1446 = rsGetElementAt_char3(*(rs_allocation*)buf1447, *(uint32_t*)buf1448); + *(char4*)buf1449 = rsGetElementAt_char4(*(rs_allocation*)buf1450, *(uint32_t*)buf1451); + *(uchar*)buf1452 = rsGetElementAt_uchar(*(rs_allocation*)buf1453, *(uint32_t*)buf1454); + *(uchar2*)buf1455 = rsGetElementAt_uchar2(*(rs_allocation*)buf1456, *(uint32_t*)buf1457); + *(uchar3*)buf1458 = rsGetElementAt_uchar3(*(rs_allocation*)buf1459, *(uint32_t*)buf1460); + *(uchar4*)buf1461 = rsGetElementAt_uchar4(*(rs_allocation*)buf1462, *(uint32_t*)buf1463); + *(short*)buf1464 = rsGetElementAt_short(*(rs_allocation*)buf1465, *(uint32_t*)buf1466); + *(short2*)buf1467 = rsGetElementAt_short2(*(rs_allocation*)buf1468, *(uint32_t*)buf1469); + *(short3*)buf1470 = rsGetElementAt_short3(*(rs_allocation*)buf1471, *(uint32_t*)buf1472); + *(short4*)buf1473 = rsGetElementAt_short4(*(rs_allocation*)buf1474, *(uint32_t*)buf1475); + *(ushort*)buf1476 = rsGetElementAt_ushort(*(rs_allocation*)buf1477, *(uint32_t*)buf1478); + *(ushort2*)buf1479 = rsGetElementAt_ushort2(*(rs_allocation*)buf1480, *(uint32_t*)buf1481); + *(ushort3*)buf1482 = rsGetElementAt_ushort3(*(rs_allocation*)buf1483, *(uint32_t*)buf1484); + *(ushort4*)buf1485 = rsGetElementAt_ushort4(*(rs_allocation*)buf1486, *(uint32_t*)buf1487); + *(int*)buf1488 = rsGetElementAt_int(*(rs_allocation*)buf1489, *(uint32_t*)buf1490); + *(int2*)buf1491 = rsGetElementAt_int2(*(rs_allocation*)buf1492, *(uint32_t*)buf1493); + *(int3*)buf1494 = rsGetElementAt_int3(*(rs_allocation*)buf1495, *(uint32_t*)buf1496); + *(int4*)buf1497 = rsGetElementAt_int4(*(rs_allocation*)buf1498, *(uint32_t*)buf1499); + *(uint*)buf1500 = rsGetElementAt_uint(*(rs_allocation*)buf1501, *(uint32_t*)buf1502); + *(uint2*)buf1503 = rsGetElementAt_uint2(*(rs_allocation*)buf1504, *(uint32_t*)buf1505); + *(uint3*)buf1506 = rsGetElementAt_uint3(*(rs_allocation*)buf1507, *(uint32_t*)buf1508); + *(uint4*)buf1509 = rsGetElementAt_uint4(*(rs_allocation*)buf1510, *(uint32_t*)buf1511); + *(long*)buf1512 = rsGetElementAt_long(*(rs_allocation*)buf1513, *(uint32_t*)buf1514); + *(long2*)buf1515 = rsGetElementAt_long2(*(rs_allocation*)buf1516, *(uint32_t*)buf1517); + *(long3*)buf1518 = rsGetElementAt_long3(*(rs_allocation*)buf1519, *(uint32_t*)buf1520); + *(long4*)buf1521 = rsGetElementAt_long4(*(rs_allocation*)buf1522, *(uint32_t*)buf1523); + *(ulong*)buf1524 = rsGetElementAt_ulong(*(rs_allocation*)buf1525, *(uint32_t*)buf1526); + *(ulong2*)buf1527 = rsGetElementAt_ulong2(*(rs_allocation*)buf1528, *(uint32_t*)buf1529); + *(ulong3*)buf1530 = rsGetElementAt_ulong3(*(rs_allocation*)buf1531, *(uint32_t*)buf1532); + *(ulong4*)buf1533 = rsGetElementAt_ulong4(*(rs_allocation*)buf1534, *(uint32_t*)buf1535); + *(float*)buf1536 = rsGetElementAt_float(*(rs_allocation*)buf1537, *(uint32_t*)buf1538, *(uint32_t*)buf1539); + *(float2*)buf1540 = rsGetElementAt_float2(*(rs_allocation*)buf1541, *(uint32_t*)buf1542, *(uint32_t*)buf1543); + *(float3*)buf1544 = rsGetElementAt_float3(*(rs_allocation*)buf1545, *(uint32_t*)buf1546, *(uint32_t*)buf1547); + *(float4*)buf1548 = rsGetElementAt_float4(*(rs_allocation*)buf1549, *(uint32_t*)buf1550, *(uint32_t*)buf1551); + *(double*)buf1552 = rsGetElementAt_double(*(rs_allocation*)buf1553, *(uint32_t*)buf1554, *(uint32_t*)buf1555); + *(double2*)buf1556 = rsGetElementAt_double2(*(rs_allocation*)buf1557, *(uint32_t*)buf1558, *(uint32_t*)buf1559); + *(double3*)buf1560 = rsGetElementAt_double3(*(rs_allocation*)buf1561, *(uint32_t*)buf1562, *(uint32_t*)buf1563); + *(double4*)buf1564 = rsGetElementAt_double4(*(rs_allocation*)buf1565, *(uint32_t*)buf1566, *(uint32_t*)buf1567); + *(char*)buf1568 = rsGetElementAt_char(*(rs_allocation*)buf1569, *(uint32_t*)buf1570, *(uint32_t*)buf1571); + *(char2*)buf1572 = rsGetElementAt_char2(*(rs_allocation*)buf1573, *(uint32_t*)buf1574, *(uint32_t*)buf1575); + *(char3*)buf1576 = rsGetElementAt_char3(*(rs_allocation*)buf1577, *(uint32_t*)buf1578, *(uint32_t*)buf1579); + *(char4*)buf1580 = rsGetElementAt_char4(*(rs_allocation*)buf1581, *(uint32_t*)buf1582, *(uint32_t*)buf1583); + *(uchar*)buf1584 = rsGetElementAt_uchar(*(rs_allocation*)buf1585, *(uint32_t*)buf1586, *(uint32_t*)buf1587); + *(uchar2*)buf1588 = rsGetElementAt_uchar2(*(rs_allocation*)buf1589, *(uint32_t*)buf1590, *(uint32_t*)buf1591); + *(uchar3*)buf1592 = rsGetElementAt_uchar3(*(rs_allocation*)buf1593, *(uint32_t*)buf1594, *(uint32_t*)buf1595); + *(uchar4*)buf1596 = rsGetElementAt_uchar4(*(rs_allocation*)buf1597, *(uint32_t*)buf1598, *(uint32_t*)buf1599); + *(short*)buf1600 = rsGetElementAt_short(*(rs_allocation*)buf1601, *(uint32_t*)buf1602, *(uint32_t*)buf1603); + *(short2*)buf1604 = rsGetElementAt_short2(*(rs_allocation*)buf1605, *(uint32_t*)buf1606, *(uint32_t*)buf1607); + *(short3*)buf1608 = rsGetElementAt_short3(*(rs_allocation*)buf1609, *(uint32_t*)buf1610, *(uint32_t*)buf1611); + *(short4*)buf1612 = rsGetElementAt_short4(*(rs_allocation*)buf1613, *(uint32_t*)buf1614, *(uint32_t*)buf1615); + *(ushort*)buf1616 = rsGetElementAt_ushort(*(rs_allocation*)buf1617, *(uint32_t*)buf1618, *(uint32_t*)buf1619); + *(ushort2*)buf1620 = rsGetElementAt_ushort2(*(rs_allocation*)buf1621, *(uint32_t*)buf1622, *(uint32_t*)buf1623); + *(ushort3*)buf1624 = rsGetElementAt_ushort3(*(rs_allocation*)buf1625, *(uint32_t*)buf1626, *(uint32_t*)buf1627); + *(ushort4*)buf1628 = rsGetElementAt_ushort4(*(rs_allocation*)buf1629, *(uint32_t*)buf1630, *(uint32_t*)buf1631); + *(int*)buf1632 = rsGetElementAt_int(*(rs_allocation*)buf1633, *(uint32_t*)buf1634, *(uint32_t*)buf1635); + *(int2*)buf1636 = rsGetElementAt_int2(*(rs_allocation*)buf1637, *(uint32_t*)buf1638, *(uint32_t*)buf1639); + *(int3*)buf1640 = rsGetElementAt_int3(*(rs_allocation*)buf1641, *(uint32_t*)buf1642, *(uint32_t*)buf1643); + *(int4*)buf1644 = rsGetElementAt_int4(*(rs_allocation*)buf1645, *(uint32_t*)buf1646, *(uint32_t*)buf1647); + *(uint*)buf1648 = rsGetElementAt_uint(*(rs_allocation*)buf1649, *(uint32_t*)buf1650, *(uint32_t*)buf1651); + *(uint2*)buf1652 = rsGetElementAt_uint2(*(rs_allocation*)buf1653, *(uint32_t*)buf1654, *(uint32_t*)buf1655); + *(uint3*)buf1656 = rsGetElementAt_uint3(*(rs_allocation*)buf1657, *(uint32_t*)buf1658, *(uint32_t*)buf1659); + *(uint4*)buf1660 = rsGetElementAt_uint4(*(rs_allocation*)buf1661, *(uint32_t*)buf1662, *(uint32_t*)buf1663); + *(long*)buf1664 = rsGetElementAt_long(*(rs_allocation*)buf1665, *(uint32_t*)buf1666, *(uint32_t*)buf1667); + *(long2*)buf1668 = rsGetElementAt_long2(*(rs_allocation*)buf1669, *(uint32_t*)buf1670, *(uint32_t*)buf1671); + *(long3*)buf1672 = rsGetElementAt_long3(*(rs_allocation*)buf1673, *(uint32_t*)buf1674, *(uint32_t*)buf1675); + *(long4*)buf1676 = rsGetElementAt_long4(*(rs_allocation*)buf1677, *(uint32_t*)buf1678, *(uint32_t*)buf1679); + *(ulong*)buf1680 = rsGetElementAt_ulong(*(rs_allocation*)buf1681, *(uint32_t*)buf1682, *(uint32_t*)buf1683); + *(ulong2*)buf1684 = rsGetElementAt_ulong2(*(rs_allocation*)buf1685, *(uint32_t*)buf1686, *(uint32_t*)buf1687); + *(ulong3*)buf1688 = rsGetElementAt_ulong3(*(rs_allocation*)buf1689, *(uint32_t*)buf1690, *(uint32_t*)buf1691); + *(ulong4*)buf1692 = rsGetElementAt_ulong4(*(rs_allocation*)buf1693, *(uint32_t*)buf1694, *(uint32_t*)buf1695); + *(float*)buf1696 = rsGetElementAt_float(*(rs_allocation*)buf1697, *(uint32_t*)buf1698, *(uint32_t*)buf1699, *(uint32_t*)buf1700); + *(float2*)buf1701 = rsGetElementAt_float2(*(rs_allocation*)buf1702, *(uint32_t*)buf1703, *(uint32_t*)buf1704, *(uint32_t*)buf1705); + *(float3*)buf1706 = rsGetElementAt_float3(*(rs_allocation*)buf1707, *(uint32_t*)buf1708, *(uint32_t*)buf1709, *(uint32_t*)buf1710); + *(float4*)buf1711 = rsGetElementAt_float4(*(rs_allocation*)buf1712, *(uint32_t*)buf1713, *(uint32_t*)buf1714, *(uint32_t*)buf1715); + *(double*)buf1716 = rsGetElementAt_double(*(rs_allocation*)buf1717, *(uint32_t*)buf1718, *(uint32_t*)buf1719, *(uint32_t*)buf1720); + *(double2*)buf1721 = rsGetElementAt_double2(*(rs_allocation*)buf1722, *(uint32_t*)buf1723, *(uint32_t*)buf1724, *(uint32_t*)buf1725); + *(double3*)buf1726 = rsGetElementAt_double3(*(rs_allocation*)buf1727, *(uint32_t*)buf1728, *(uint32_t*)buf1729, *(uint32_t*)buf1730); + *(double4*)buf1731 = rsGetElementAt_double4(*(rs_allocation*)buf1732, *(uint32_t*)buf1733, *(uint32_t*)buf1734, *(uint32_t*)buf1735); + *(char*)buf1736 = rsGetElementAt_char(*(rs_allocation*)buf1737, *(uint32_t*)buf1738, *(uint32_t*)buf1739, *(uint32_t*)buf1740); + *(char2*)buf1741 = rsGetElementAt_char2(*(rs_allocation*)buf1742, *(uint32_t*)buf1743, *(uint32_t*)buf1744, *(uint32_t*)buf1745); + *(char3*)buf1746 = rsGetElementAt_char3(*(rs_allocation*)buf1747, *(uint32_t*)buf1748, *(uint32_t*)buf1749, *(uint32_t*)buf1750); + *(char4*)buf1751 = rsGetElementAt_char4(*(rs_allocation*)buf1752, *(uint32_t*)buf1753, *(uint32_t*)buf1754, *(uint32_t*)buf1755); + *(uchar*)buf1756 = rsGetElementAt_uchar(*(rs_allocation*)buf1757, *(uint32_t*)buf1758, *(uint32_t*)buf1759, *(uint32_t*)buf1760); + *(uchar2*)buf1761 = rsGetElementAt_uchar2(*(rs_allocation*)buf1762, *(uint32_t*)buf1763, *(uint32_t*)buf1764, *(uint32_t*)buf1765); + *(uchar3*)buf1766 = rsGetElementAt_uchar3(*(rs_allocation*)buf1767, *(uint32_t*)buf1768, *(uint32_t*)buf1769, *(uint32_t*)buf1770); + *(uchar4*)buf1771 = rsGetElementAt_uchar4(*(rs_allocation*)buf1772, *(uint32_t*)buf1773, *(uint32_t*)buf1774, *(uint32_t*)buf1775); + *(short*)buf1776 = rsGetElementAt_short(*(rs_allocation*)buf1777, *(uint32_t*)buf1778, *(uint32_t*)buf1779, *(uint32_t*)buf1780); + *(short2*)buf1781 = rsGetElementAt_short2(*(rs_allocation*)buf1782, *(uint32_t*)buf1783, *(uint32_t*)buf1784, *(uint32_t*)buf1785); + *(short3*)buf1786 = rsGetElementAt_short3(*(rs_allocation*)buf1787, *(uint32_t*)buf1788, *(uint32_t*)buf1789, *(uint32_t*)buf1790); + *(short4*)buf1791 = rsGetElementAt_short4(*(rs_allocation*)buf1792, *(uint32_t*)buf1793, *(uint32_t*)buf1794, *(uint32_t*)buf1795); + *(ushort*)buf1796 = rsGetElementAt_ushort(*(rs_allocation*)buf1797, *(uint32_t*)buf1798, *(uint32_t*)buf1799, *(uint32_t*)buf1800); + *(ushort2*)buf1801 = rsGetElementAt_ushort2(*(rs_allocation*)buf1802, *(uint32_t*)buf1803, *(uint32_t*)buf1804, *(uint32_t*)buf1805); + *(ushort3*)buf1806 = rsGetElementAt_ushort3(*(rs_allocation*)buf1807, *(uint32_t*)buf1808, *(uint32_t*)buf1809, *(uint32_t*)buf1810); + *(ushort4*)buf1811 = rsGetElementAt_ushort4(*(rs_allocation*)buf1812, *(uint32_t*)buf1813, *(uint32_t*)buf1814, *(uint32_t*)buf1815); + *(int*)buf1816 = rsGetElementAt_int(*(rs_allocation*)buf1817, *(uint32_t*)buf1818, *(uint32_t*)buf1819, *(uint32_t*)buf1820); + *(int2*)buf1821 = rsGetElementAt_int2(*(rs_allocation*)buf1822, *(uint32_t*)buf1823, *(uint32_t*)buf1824, *(uint32_t*)buf1825); + *(int3*)buf1826 = rsGetElementAt_int3(*(rs_allocation*)buf1827, *(uint32_t*)buf1828, *(uint32_t*)buf1829, *(uint32_t*)buf1830); + *(int4*)buf1831 = rsGetElementAt_int4(*(rs_allocation*)buf1832, *(uint32_t*)buf1833, *(uint32_t*)buf1834, *(uint32_t*)buf1835); + *(uint*)buf1836 = rsGetElementAt_uint(*(rs_allocation*)buf1837, *(uint32_t*)buf1838, *(uint32_t*)buf1839, *(uint32_t*)buf1840); + *(uint2*)buf1841 = rsGetElementAt_uint2(*(rs_allocation*)buf1842, *(uint32_t*)buf1843, *(uint32_t*)buf1844, *(uint32_t*)buf1845); + *(uint3*)buf1846 = rsGetElementAt_uint3(*(rs_allocation*)buf1847, *(uint32_t*)buf1848, *(uint32_t*)buf1849, *(uint32_t*)buf1850); + *(uint4*)buf1851 = rsGetElementAt_uint4(*(rs_allocation*)buf1852, *(uint32_t*)buf1853, *(uint32_t*)buf1854, *(uint32_t*)buf1855); + *(long*)buf1856 = rsGetElementAt_long(*(rs_allocation*)buf1857, *(uint32_t*)buf1858, *(uint32_t*)buf1859, *(uint32_t*)buf1860); + *(long2*)buf1861 = rsGetElementAt_long2(*(rs_allocation*)buf1862, *(uint32_t*)buf1863, *(uint32_t*)buf1864, *(uint32_t*)buf1865); + *(long3*)buf1866 = rsGetElementAt_long3(*(rs_allocation*)buf1867, *(uint32_t*)buf1868, *(uint32_t*)buf1869, *(uint32_t*)buf1870); + *(long4*)buf1871 = rsGetElementAt_long4(*(rs_allocation*)buf1872, *(uint32_t*)buf1873, *(uint32_t*)buf1874, *(uint32_t*)buf1875); + *(ulong*)buf1876 = rsGetElementAt_ulong(*(rs_allocation*)buf1877, *(uint32_t*)buf1878, *(uint32_t*)buf1879, *(uint32_t*)buf1880); + *(ulong2*)buf1881 = rsGetElementAt_ulong2(*(rs_allocation*)buf1882, *(uint32_t*)buf1883, *(uint32_t*)buf1884, *(uint32_t*)buf1885); + *(ulong3*)buf1886 = rsGetElementAt_ulong3(*(rs_allocation*)buf1887, *(uint32_t*)buf1888, *(uint32_t*)buf1889, *(uint32_t*)buf1890); + *(ulong4*)buf1891 = rsGetElementAt_ulong4(*(rs_allocation*)buf1892, *(uint32_t*)buf1893, *(uint32_t*)buf1894, *(uint32_t*)buf1895); + *(bool*)buf1896 = rsIsObject(*(rs_element*)buf1897); + *(bool*)buf1898 = rsIsObject(*(rs_type*)buf1899); + *(bool*)buf1900 = rsIsObject(*(rs_allocation*)buf1901); + *(bool*)buf1902 = rsIsObject(*(rs_sampler*)buf1903); + *(bool*)buf1904 = rsIsObject(*(rs_script*)buf1905); +#ifndef __LP64__ + *(bool*)buf1906 = rsIsObject(*(rs_mesh*)buf1907); + *(bool*)buf1908 = rsIsObject(*(rs_program_fragment*)buf1909); + *(bool*)buf1910 = rsIsObject(*(rs_program_vertex*)buf1911); + *(bool*)buf1912 = rsIsObject(*(rs_program_raster*)buf1913); + *(bool*)buf1914 = rsIsObject(*(rs_program_store*)buf1915); + *(bool*)buf1916 = rsIsObject(*(rs_font*)buf1917); +#endif + *(bool*)buf1918 = rsIsSphereInFrustum((float4*) buf1919, (float4*) buf1920, (float4*) buf1921, (float4*) buf1922, (float4*) buf1923, (float4*) buf1924, (float4*) buf1925); + *(rs_tm**)buf1926 = rsLocaltime((rs_tm*) buf1927, (const rs_time_t*) buf1928); + *(float*)buf1929 = rsMatrixGet((const rs_matrix4x4*) buf1930, *(uint32_t*)buf1931, *(uint32_t*)buf1932); + *(float*)buf1933 = rsMatrixGet((const rs_matrix3x3*) buf1934, *(uint32_t*)buf1935, *(uint32_t*)buf1936); + *(float*)buf1937 = rsMatrixGet((const rs_matrix2x2*) buf1938, *(uint32_t*)buf1939, *(uint32_t*)buf1940); + *(bool*)buf1941 = rsMatrixInverse((rs_matrix4x4*) buf1942); + *(bool*)buf1943 = rsMatrixInverseTranspose((rs_matrix4x4*) buf1944); + rsMatrixLoad((rs_matrix4x4*) buf1945, (const float*) buf1946); + rsMatrixLoad((rs_matrix3x3*) buf1947, (const float*) buf1948); + rsMatrixLoad((rs_matrix2x2*) buf1949, (const float*) buf1950); + rsMatrixLoad((rs_matrix4x4*) buf1951, (const rs_matrix4x4*) buf1952); + rsMatrixLoad((rs_matrix3x3*) buf1953, (const rs_matrix3x3*) buf1954); + rsMatrixLoad((rs_matrix2x2*) buf1955, (const rs_matrix2x2*) buf1956); + rsMatrixLoad((rs_matrix4x4*) buf1957, (const rs_matrix3x3*) buf1958); + rsMatrixLoad((rs_matrix4x4*) buf1959, (const rs_matrix2x2*) buf1960); + rsMatrixLoadFrustum((rs_matrix4x4*) buf1961, *(float*)buf1962, *(float*)buf1963, *(float*)buf1964, *(float*)buf1965, *(float*)buf1966, *(float*)buf1967); + rsMatrixLoadIdentity((rs_matrix4x4*) buf1968); + rsMatrixLoadIdentity((rs_matrix3x3*) buf1969); + rsMatrixLoadIdentity((rs_matrix2x2*) buf1970); + rsMatrixLoadMultiply((rs_matrix4x4*) buf1971, (const rs_matrix4x4*) buf1972, (const rs_matrix4x4*) buf1973); + rsMatrixLoadMultiply((rs_matrix3x3*) buf1974, (const rs_matrix3x3*) buf1975, (const rs_matrix3x3*) buf1976); + rsMatrixLoadMultiply((rs_matrix2x2*) buf1977, (const rs_matrix2x2*) buf1978, (const rs_matrix2x2*) buf1979); + rsMatrixLoadOrtho((rs_matrix4x4*) buf1980, *(float*)buf1981, *(float*)buf1982, *(float*)buf1983, *(float*)buf1984, *(float*)buf1985, *(float*)buf1986); + rsMatrixLoadPerspective((rs_matrix4x4*) buf1987, *(float*)buf1988, *(float*)buf1989, *(float*)buf1990, *(float*)buf1991); + rsMatrixLoadRotate((rs_matrix4x4*) buf1992, *(float*)buf1993, *(float*)buf1994, *(float*)buf1995, *(float*)buf1996); + rsMatrixLoadScale((rs_matrix4x4*) buf1997, *(float*)buf1998, *(float*)buf1999, *(float*)buf2000); + rsMatrixLoadTranslate((rs_matrix4x4*) buf2001, *(float*)buf2002, *(float*)buf2003, *(float*)buf2004); + rsMatrixMultiply((rs_matrix4x4*) buf2005, (const rs_matrix4x4*) buf2006); + rsMatrixMultiply((rs_matrix3x3*) buf2007, (const rs_matrix3x3*) buf2008); + rsMatrixMultiply((rs_matrix2x2*) buf2009, (const rs_matrix2x2*) buf2010); + *(float4*)buf2011 = rsMatrixMultiply((const rs_matrix4x4*) buf2012, *(float4*)buf2013); + *(float4*)buf2014 = rsMatrixMultiply((const rs_matrix4x4*) buf2015, *(float3*)buf2016); + *(float4*)buf2017 = rsMatrixMultiply((const rs_matrix4x4*) buf2018, *(float2*)buf2019); + *(float3*)buf2020 = rsMatrixMultiply((const rs_matrix3x3*) buf2021, *(float3*)buf2022); + *(float3*)buf2023 = rsMatrixMultiply((const rs_matrix3x3*) buf2024, *(float2*)buf2025); + *(float2*)buf2026 = rsMatrixMultiply((const rs_matrix2x2*) buf2027, *(float2*)buf2028); + rsMatrixRotate((rs_matrix4x4*) buf2029, *(float*)buf2030, *(float*)buf2031, *(float*)buf2032, *(float*)buf2033); + rsMatrixScale((rs_matrix4x4*) buf2034, *(float*)buf2035, *(float*)buf2036, *(float*)buf2037); + rsMatrixSet((rs_matrix4x4*) buf2038, *(uint32_t*)buf2039, *(uint32_t*)buf2040, *(float*)buf2041); + rsMatrixSet((rs_matrix3x3*) buf2042, *(uint32_t*)buf2043, *(uint32_t*)buf2044, *(float*)buf2045); + rsMatrixSet((rs_matrix2x2*) buf2046, *(uint32_t*)buf2047, *(uint32_t*)buf2048, *(float*)buf2049); + rsMatrixTranslate((rs_matrix4x4*) buf2050, *(float*)buf2051, *(float*)buf2052, *(float*)buf2053); + rsMatrixTranspose((rs_matrix4x4*) buf2054); + rsMatrixTranspose((rs_matrix3x3*) buf2055); + rsMatrixTranspose((rs_matrix2x2*) buf2056); + *(uchar4*)buf2057 = rsPackColorTo8888(*(float*)buf2058, *(float*)buf2059, *(float*)buf2060); + *(uchar4*)buf2061 = rsPackColorTo8888(*(float*)buf2062, *(float*)buf2063, *(float*)buf2064, *(float*)buf2065); + *(uchar4*)buf2066 = rsPackColorTo8888(*(float3*)buf2067); + *(uchar4*)buf2068 = rsPackColorTo8888(*(float4*)buf2069); + rsQuaternionAdd((rs_quaternion*) buf2070, (const rs_quaternion*) buf2071); + rsQuaternionConjugate((rs_quaternion*) buf2072); + *(float*)buf2073 = rsQuaternionDot((const rs_quaternion*) buf2074, (const rs_quaternion*) buf2075); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2076, (const rs_quaternion*) buf2077); + rsQuaternionLoadRotate((rs_quaternion*) buf2078, *(float*)buf2079, *(float*)buf2080, *(float*)buf2081, *(float*)buf2082); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2083, *(float*)buf2084, *(float*)buf2085, *(float*)buf2086, *(float*)buf2087); + rsQuaternionMultiply((rs_quaternion*) buf2088, *(float*)buf2089); + rsQuaternionMultiply((rs_quaternion*) buf2090, (const rs_quaternion*) buf2091); + rsQuaternionNormalize((rs_quaternion*) buf2092); + rsQuaternionSet((rs_quaternion*) buf2093, *(float*)buf2094, *(float*)buf2095, *(float*)buf2096, *(float*)buf2097); + rsQuaternionSet((rs_quaternion*) buf2098, (const rs_quaternion*) buf2099); + rsQuaternionSlerp((rs_quaternion*) buf2100, (const rs_quaternion*) buf2101, (const rs_quaternion*) buf2102, *(float*)buf2103); + *(int*)buf2104 = rsRand(*(int*)buf2105); + *(int*)buf2106 = rsRand(*(int*)buf2107, *(int*)buf2108); + *(float*)buf2109 = rsRand(*(float*)buf2110); + *(float*)buf2111 = rsRand(*(float*)buf2112, *(float*)buf2113); + *(bool*)buf2114 = rsSendToClient(*(int*)buf2115); + *(bool*)buf2116 = rsSendToClient(*(int*)buf2117, (const void*) buf2118, *(uint*)buf2119); + rsSendToClientBlocking(*(int*)buf2120); + rsSendToClientBlocking(*(int*)buf2121, (const void*) buf2122, *(uint*)buf2123); + rsSetObject((rs_element*) buf2124, *(rs_element*)buf2125); + rsSetObject((rs_type*) buf2126, *(rs_type*)buf2127); + rsSetObject((rs_allocation*) buf2128, *(rs_allocation*)buf2129); + rsSetObject((rs_sampler*) buf2130, *(rs_sampler*)buf2131); + rsSetObject((rs_script*) buf2132, *(rs_script*)buf2133); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2134, *(rs_mesh*)buf2135); + rsSetObject((rs_program_fragment*) buf2136, *(rs_program_fragment*)buf2137); + rsSetObject((rs_program_vertex*) buf2138, *(rs_program_vertex*)buf2139); + rsSetObject((rs_program_raster*) buf2140, *(rs_program_raster*)buf2141); + rsSetObject((rs_program_store*) buf2142, *(rs_program_store*)buf2143); + rsSetObject((rs_font*) buf2144, *(rs_font*)buf2145); +#endif + *(rs_time_t*)buf2146 = rsTime((rs_time_t*) buf2147); + *(float4*)buf2148 = rsUnpackColor8888(*(uchar4*)buf2149); + *(int64_t*)buf2150 = rsUptimeMillis(); + *(int64_t*)buf2151 = rsUptimeNanos(); + *(float4*)buf2152 = rsYuvToRGBA_float4(*(uchar*)buf2153, *(uchar*)buf2154, *(uchar*)buf2155); + *(uchar4*)buf2156 = rsYuvToRGBA_uchar4(*(uchar*)buf2157, *(uchar*)buf2158, *(uchar*)buf2159); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2160); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2161, *(rs_allocation_usage_type*)buf2162); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf2163, *(uint*)buf2164); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2165, *(uint*)buf2166, *(rs_allocation*)buf2167); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2168, *(uint*)buf2169, *(rs_allocation*)buf2170); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf2171); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2172); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2173); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2174); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2175); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2176); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2177, *(uint*)buf2178, *(rs_sampler*)buf2179); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2180, *(uint*)buf2181, *(rs_allocation*)buf2182); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2183, *(float*)buf2184, *(float*)buf2185, *(float*)buf2186); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf2187); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2188); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2189); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2190, *(uint*)buf2191); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2192, *(uint*)buf2193, *(uint*)buf2194, *(uint*)buf2195); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2196, *(float*)buf2197, *(float*)buf2198, *(float*)buf2199, *(float*)buf2200, *(float*)buf2201, *(float*)buf2202, *(float*)buf2203, *(float*)buf2204, *(float*)buf2205, *(float*)buf2206, *(float*)buf2207); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2208, *(float*)buf2209, *(float*)buf2210, *(float*)buf2211, *(float*)buf2212, *(float*)buf2213, *(float*)buf2214, *(float*)buf2215, *(float*)buf2216, *(float*)buf2217, *(float*)buf2218, *(float*)buf2219, *(float*)buf2220, *(float*)buf2221, *(float*)buf2222, *(float*)buf2223, *(float*)buf2224, *(float*)buf2225, *(float*)buf2226, *(float*)buf2227); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2228, *(float*)buf2229, *(float*)buf2230, *(float*)buf2231, *(float*)buf2232); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2233, *(float*)buf2234, *(float*)buf2235, *(float*)buf2236, *(float*)buf2237); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2238, *(int*)buf2239, *(int*)buf2240); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2241, *(int*)buf2242, *(int*)buf2243); +#endif +#ifndef __LP64__ + *(uint*)buf2244 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2245, *(float*)buf2246, *(float*)buf2247, *(float*)buf2248); +#endif +#ifndef __LP64__ + *(uint*)buf2249 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2250 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2251, (int*) buf2252, (int*) buf2253, (int*) buf2254, (int*) buf2255); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2256, (int*) buf2257, (int*) buf2258, (int*) buf2259, (int*) buf2260); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2261, (float*) buf2262, (float*) buf2263, (float*) buf2264, (float*) buf2265, (float*) buf2266, (float*) buf2267); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2268, (float3*) buf2269, (float3*) buf2270); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf2271, *(float*)buf2272, *(float*)buf2273, *(float*)buf2274, *(float*)buf2275); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf2276); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf2277); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf2278); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf2279); +#endif + *(float*)buf2280 = rsqrt(*(float*)buf2281); + *(float2*)buf2282 = rsqrt(*(float2*)buf2283); + *(float3*)buf2284 = rsqrt(*(float3*)buf2285); + *(float4*)buf2286 = rsqrt(*(float4*)buf2287); + *(float*)buf2288 = sign(*(float*)buf2289); + *(float2*)buf2290 = sign(*(float2*)buf2291); + *(float3*)buf2292 = sign(*(float3*)buf2293); + *(float4*)buf2294 = sign(*(float4*)buf2295); + *(float*)buf2296 = sin(*(float*)buf2297); + *(float2*)buf2298 = sin(*(float2*)buf2299); + *(float3*)buf2300 = sin(*(float3*)buf2301); + *(float4*)buf2302 = sin(*(float4*)buf2303); + *(float*)buf2304 = sincos(*(float*)buf2305, (float*) buf2306); + *(float2*)buf2307 = sincos(*(float2*)buf2308, (float2*) buf2309); + *(float3*)buf2310 = sincos(*(float3*)buf2311, (float3*) buf2312); + *(float4*)buf2313 = sincos(*(float4*)buf2314, (float4*) buf2315); + *(float*)buf2316 = sinh(*(float*)buf2317); + *(float2*)buf2318 = sinh(*(float2*)buf2319); + *(float3*)buf2320 = sinh(*(float3*)buf2321); + *(float4*)buf2322 = sinh(*(float4*)buf2323); + *(float*)buf2324 = sinpi(*(float*)buf2325); + *(float2*)buf2326 = sinpi(*(float2*)buf2327); + *(float3*)buf2328 = sinpi(*(float3*)buf2329); + *(float4*)buf2330 = sinpi(*(float4*)buf2331); + *(float*)buf2332 = sqrt(*(float*)buf2333); + *(float2*)buf2334 = sqrt(*(float2*)buf2335); + *(float3*)buf2336 = sqrt(*(float3*)buf2337); + *(float4*)buf2338 = sqrt(*(float4*)buf2339); + *(float*)buf2340 = step(*(float*)buf2341, *(float*)buf2342); + *(float2*)buf2343 = step(*(float2*)buf2344, *(float2*)buf2345); + *(float3*)buf2346 = step(*(float3*)buf2347, *(float3*)buf2348); + *(float4*)buf2349 = step(*(float4*)buf2350, *(float4*)buf2351); + *(float2*)buf2352 = step(*(float2*)buf2353, *(float*)buf2354); + *(float3*)buf2355 = step(*(float3*)buf2356, *(float*)buf2357); + *(float4*)buf2358 = step(*(float4*)buf2359, *(float*)buf2360); + *(float*)buf2361 = tan(*(float*)buf2362); + *(float2*)buf2363 = tan(*(float2*)buf2364); + *(float3*)buf2365 = tan(*(float3*)buf2366); + *(float4*)buf2367 = tan(*(float4*)buf2368); + *(float*)buf2369 = tanh(*(float*)buf2370); + *(float2*)buf2371 = tanh(*(float2*)buf2372); + *(float3*)buf2373 = tanh(*(float3*)buf2374); + *(float4*)buf2375 = tanh(*(float4*)buf2376); + *(float*)buf2377 = tanpi(*(float*)buf2378); + *(float2*)buf2379 = tanpi(*(float2*)buf2380); + *(float3*)buf2381 = tanpi(*(float3*)buf2382); + *(float4*)buf2383 = tanpi(*(float4*)buf2384); + *(float*)buf2385 = tgamma(*(float*)buf2386); + *(float2*)buf2387 = tgamma(*(float2*)buf2388); + *(float3*)buf2389 = tgamma(*(float3*)buf2390); + *(float4*)buf2391 = tgamma(*(float4*)buf2392); + *(float*)buf2393 = trunc(*(float*)buf2394); + *(float2*)buf2395 = trunc(*(float2*)buf2396); + *(float3*)buf2397 = trunc(*(float3*)buf2398); + *(float4*)buf2399 = trunc(*(float4*)buf2400); +}
diff --git a/slang/tests/P_all_api_15/stderr.txt.expect b/slang/tests/P_all_api_15/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_15/stderr.txt.expect
diff --git a/slang/tests/P_all_api_15/stdout.txt.expect b/slang/tests/P_all_api_15/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_15/stdout.txt.expect
diff --git a/slang/tests/P_all_api_16/all16.rs b/slang/tests/P_all_api_16/all16.rs new file mode 100644 index 0000000..b6b7954 --- /dev/null +++ b/slang/tests/P_all_api_16/all16.rs
@@ -0,0 +1,3564 @@ +// -target-api 16 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; + +void root(const int* in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fdim(*(float*)buf637, *(float*)buf638); + *(float2*)buf639 = fdim(*(float2*)buf640, *(float2*)buf641); + *(float3*)buf642 = fdim(*(float3*)buf643, *(float3*)buf644); + *(float4*)buf645 = fdim(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = floor(*(float*)buf649); + *(float2*)buf650 = floor(*(float2*)buf651); + *(float3*)buf652 = floor(*(float3*)buf653); + *(float4*)buf654 = floor(*(float4*)buf655); + *(float*)buf656 = fma(*(float*)buf657, *(float*)buf658, *(float*)buf659); + *(float2*)buf660 = fma(*(float2*)buf661, *(float2*)buf662, *(float2*)buf663); + *(float3*)buf664 = fma(*(float3*)buf665, *(float3*)buf666, *(float3*)buf667); + *(float4*)buf668 = fma(*(float4*)buf669, *(float4*)buf670, *(float4*)buf671); + *(float*)buf672 = fmax(*(float*)buf673, *(float*)buf674); + *(float2*)buf675 = fmax(*(float2*)buf676, *(float2*)buf677); + *(float3*)buf678 = fmax(*(float3*)buf679, *(float3*)buf680); + *(float4*)buf681 = fmax(*(float4*)buf682, *(float4*)buf683); + *(float2*)buf684 = fmax(*(float2*)buf685, *(float*)buf686); + *(float3*)buf687 = fmax(*(float3*)buf688, *(float*)buf689); + *(float4*)buf690 = fmax(*(float4*)buf691, *(float*)buf692); + *(float*)buf693 = fmin(*(float*)buf694, *(float*)buf695); + *(float2*)buf696 = fmin(*(float2*)buf697, *(float2*)buf698); + *(float3*)buf699 = fmin(*(float3*)buf700, *(float3*)buf701); + *(float4*)buf702 = fmin(*(float4*)buf703, *(float4*)buf704); + *(float2*)buf705 = fmin(*(float2*)buf706, *(float*)buf707); + *(float3*)buf708 = fmin(*(float3*)buf709, *(float*)buf710); + *(float4*)buf711 = fmin(*(float4*)buf712, *(float*)buf713); + *(float*)buf714 = fmod(*(float*)buf715, *(float*)buf716); + *(float2*)buf717 = fmod(*(float2*)buf718, *(float2*)buf719); + *(float3*)buf720 = fmod(*(float3*)buf721, *(float3*)buf722); + *(float4*)buf723 = fmod(*(float4*)buf724, *(float4*)buf725); + *(float*)buf726 = fract(*(float*)buf727, (float*) buf728); + *(float2*)buf729 = fract(*(float2*)buf730, (float2*) buf731); + *(float3*)buf732 = fract(*(float3*)buf733, (float3*) buf734); + *(float4*)buf735 = fract(*(float4*)buf736, (float4*) buf737); + *(float*)buf738 = fract(*(float*)buf739); + *(float2*)buf740 = fract(*(float2*)buf741); + *(float3*)buf742 = fract(*(float3*)buf743); + *(float4*)buf744 = fract(*(float4*)buf745); + *(float*)buf746 = frexp(*(float*)buf747, (int*) buf748); + *(float2*)buf749 = frexp(*(float2*)buf750, (int2*) buf751); + *(float3*)buf752 = frexp(*(float3*)buf753, (int3*) buf754); + *(float4*)buf755 = frexp(*(float4*)buf756, (int4*) buf757); + *(float*)buf758 = hypot(*(float*)buf759, *(float*)buf760); + *(float2*)buf761 = hypot(*(float2*)buf762, *(float2*)buf763); + *(float3*)buf764 = hypot(*(float3*)buf765, *(float3*)buf766); + *(float4*)buf767 = hypot(*(float4*)buf768, *(float4*)buf769); + *(int*)buf770 = ilogb(*(float*)buf771); + *(int2*)buf772 = ilogb(*(float2*)buf773); + *(int3*)buf774 = ilogb(*(float3*)buf775); + *(int4*)buf776 = ilogb(*(float4*)buf777); + *(float*)buf778 = ldexp(*(float*)buf779, *(int*)buf780); + *(float2*)buf781 = ldexp(*(float2*)buf782, *(int2*)buf783); + *(float3*)buf784 = ldexp(*(float3*)buf785, *(int3*)buf786); + *(float4*)buf787 = ldexp(*(float4*)buf788, *(int4*)buf789); + *(float2*)buf790 = ldexp(*(float2*)buf791, *(int*)buf792); + *(float3*)buf793 = ldexp(*(float3*)buf794, *(int*)buf795); + *(float4*)buf796 = ldexp(*(float4*)buf797, *(int*)buf798); + *(float*)buf799 = length(*(float*)buf800); + *(float*)buf801 = length(*(float2*)buf802); + *(float*)buf803 = length(*(float3*)buf804); + *(float*)buf805 = length(*(float4*)buf806); + *(float*)buf807 = lgamma(*(float*)buf808); + *(float2*)buf809 = lgamma(*(float2*)buf810); + *(float3*)buf811 = lgamma(*(float3*)buf812); + *(float4*)buf813 = lgamma(*(float4*)buf814); + *(float*)buf815 = lgamma(*(float*)buf816, (int*) buf817); + *(float2*)buf818 = lgamma(*(float2*)buf819, (int2*) buf820); + *(float3*)buf821 = lgamma(*(float3*)buf822, (int3*) buf823); + *(float4*)buf824 = lgamma(*(float4*)buf825, (int4*) buf826); + *(float*)buf827 = log(*(float*)buf828); + *(float2*)buf829 = log(*(float2*)buf830); + *(float3*)buf831 = log(*(float3*)buf832); + *(float4*)buf833 = log(*(float4*)buf834); + *(float*)buf835 = log10(*(float*)buf836); + *(float2*)buf837 = log10(*(float2*)buf838); + *(float3*)buf839 = log10(*(float3*)buf840); + *(float4*)buf841 = log10(*(float4*)buf842); + *(float*)buf843 = log1p(*(float*)buf844); + *(float2*)buf845 = log1p(*(float2*)buf846); + *(float3*)buf847 = log1p(*(float3*)buf848); + *(float4*)buf849 = log1p(*(float4*)buf850); + *(float*)buf851 = log2(*(float*)buf852); + *(float2*)buf853 = log2(*(float2*)buf854); + *(float3*)buf855 = log2(*(float3*)buf856); + *(float4*)buf857 = log2(*(float4*)buf858); + *(float*)buf859 = logb(*(float*)buf860); + *(float2*)buf861 = logb(*(float2*)buf862); + *(float3*)buf863 = logb(*(float3*)buf864); + *(float4*)buf865 = logb(*(float4*)buf866); + *(float*)buf867 = mad(*(float*)buf868, *(float*)buf869, *(float*)buf870); + *(float2*)buf871 = mad(*(float2*)buf872, *(float2*)buf873, *(float2*)buf874); + *(float3*)buf875 = mad(*(float3*)buf876, *(float3*)buf877, *(float3*)buf878); + *(float4*)buf879 = mad(*(float4*)buf880, *(float4*)buf881, *(float4*)buf882); + *(float*)buf883 = max(*(float*)buf884, *(float*)buf885); + *(float2*)buf886 = max(*(float2*)buf887, *(float2*)buf888); + *(float3*)buf889 = max(*(float3*)buf890, *(float3*)buf891); + *(float4*)buf892 = max(*(float4*)buf893, *(float4*)buf894); + *(float2*)buf895 = max(*(float2*)buf896, *(float*)buf897); + *(float3*)buf898 = max(*(float3*)buf899, *(float*)buf900); + *(float4*)buf901 = max(*(float4*)buf902, *(float*)buf903); + *(char*)buf904 = max(*(char*)buf905, *(char*)buf906); + *(uchar*)buf907 = max(*(uchar*)buf908, *(uchar*)buf909); + *(short*)buf910 = max(*(short*)buf911, *(short*)buf912); + *(ushort*)buf913 = max(*(ushort*)buf914, *(ushort*)buf915); + *(int*)buf916 = max(*(int*)buf917, *(int*)buf918); + *(uint*)buf919 = max(*(uint*)buf920, *(uint*)buf921); + *(char2*)buf922 = max(*(char2*)buf923, *(char2*)buf924); + *(uchar2*)buf925 = max(*(uchar2*)buf926, *(uchar2*)buf927); + *(short2*)buf928 = max(*(short2*)buf929, *(short2*)buf930); + *(ushort2*)buf931 = max(*(ushort2*)buf932, *(ushort2*)buf933); + *(int2*)buf934 = max(*(int2*)buf935, *(int2*)buf936); + *(uint2*)buf937 = max(*(uint2*)buf938, *(uint2*)buf939); + *(char3*)buf940 = max(*(char3*)buf941, *(char3*)buf942); + *(uchar3*)buf943 = max(*(uchar3*)buf944, *(uchar3*)buf945); + *(short3*)buf946 = max(*(short3*)buf947, *(short3*)buf948); + *(ushort3*)buf949 = max(*(ushort3*)buf950, *(ushort3*)buf951); + *(int3*)buf952 = max(*(int3*)buf953, *(int3*)buf954); + *(uint3*)buf955 = max(*(uint3*)buf956, *(uint3*)buf957); + *(char4*)buf958 = max(*(char4*)buf959, *(char4*)buf960); + *(uchar4*)buf961 = max(*(uchar4*)buf962, *(uchar4*)buf963); + *(short4*)buf964 = max(*(short4*)buf965, *(short4*)buf966); + *(ushort4*)buf967 = max(*(ushort4*)buf968, *(ushort4*)buf969); + *(int4*)buf970 = max(*(int4*)buf971, *(int4*)buf972); + *(uint4*)buf973 = max(*(uint4*)buf974, *(uint4*)buf975); + *(float*)buf976 = min(*(float*)buf977, *(float*)buf978); + *(float2*)buf979 = min(*(float2*)buf980, *(float2*)buf981); + *(float3*)buf982 = min(*(float3*)buf983, *(float3*)buf984); + *(float4*)buf985 = min(*(float4*)buf986, *(float4*)buf987); + *(float2*)buf988 = min(*(float2*)buf989, *(float*)buf990); + *(float3*)buf991 = min(*(float3*)buf992, *(float*)buf993); + *(float4*)buf994 = min(*(float4*)buf995, *(float*)buf996); + *(char*)buf997 = min(*(char*)buf998, *(char*)buf999); + *(uchar*)buf1000 = min(*(uchar*)buf1001, *(uchar*)buf1002); + *(short*)buf1003 = min(*(short*)buf1004, *(short*)buf1005); + *(ushort*)buf1006 = min(*(ushort*)buf1007, *(ushort*)buf1008); + *(int*)buf1009 = min(*(int*)buf1010, *(int*)buf1011); + *(uint*)buf1012 = min(*(uint*)buf1013, *(uint*)buf1014); + *(char2*)buf1015 = min(*(char2*)buf1016, *(char2*)buf1017); + *(uchar2*)buf1018 = min(*(uchar2*)buf1019, *(uchar2*)buf1020); + *(short2*)buf1021 = min(*(short2*)buf1022, *(short2*)buf1023); + *(ushort2*)buf1024 = min(*(ushort2*)buf1025, *(ushort2*)buf1026); + *(int2*)buf1027 = min(*(int2*)buf1028, *(int2*)buf1029); + *(uint2*)buf1030 = min(*(uint2*)buf1031, *(uint2*)buf1032); + *(char3*)buf1033 = min(*(char3*)buf1034, *(char3*)buf1035); + *(uchar3*)buf1036 = min(*(uchar3*)buf1037, *(uchar3*)buf1038); + *(short3*)buf1039 = min(*(short3*)buf1040, *(short3*)buf1041); + *(ushort3*)buf1042 = min(*(ushort3*)buf1043, *(ushort3*)buf1044); + *(int3*)buf1045 = min(*(int3*)buf1046, *(int3*)buf1047); + *(uint3*)buf1048 = min(*(uint3*)buf1049, *(uint3*)buf1050); + *(char4*)buf1051 = min(*(char4*)buf1052, *(char4*)buf1053); + *(uchar4*)buf1054 = min(*(uchar4*)buf1055, *(uchar4*)buf1056); + *(short4*)buf1057 = min(*(short4*)buf1058, *(short4*)buf1059); + *(ushort4*)buf1060 = min(*(ushort4*)buf1061, *(ushort4*)buf1062); + *(int4*)buf1063 = min(*(int4*)buf1064, *(int4*)buf1065); + *(uint4*)buf1066 = min(*(uint4*)buf1067, *(uint4*)buf1068); + *(float*)buf1069 = mix(*(float*)buf1070, *(float*)buf1071, *(float*)buf1072); + *(float2*)buf1073 = mix(*(float2*)buf1074, *(float2*)buf1075, *(float2*)buf1076); + *(float3*)buf1077 = mix(*(float3*)buf1078, *(float3*)buf1079, *(float3*)buf1080); + *(float4*)buf1081 = mix(*(float4*)buf1082, *(float4*)buf1083, *(float4*)buf1084); + *(float2*)buf1085 = mix(*(float2*)buf1086, *(float2*)buf1087, *(float*)buf1088); + *(float3*)buf1089 = mix(*(float3*)buf1090, *(float3*)buf1091, *(float*)buf1092); + *(float4*)buf1093 = mix(*(float4*)buf1094, *(float4*)buf1095, *(float*)buf1096); + *(float*)buf1097 = modf(*(float*)buf1098, (float*) buf1099); + *(float2*)buf1100 = modf(*(float2*)buf1101, (float2*) buf1102); + *(float3*)buf1103 = modf(*(float3*)buf1104, (float3*) buf1105); + *(float4*)buf1106 = modf(*(float4*)buf1107, (float4*) buf1108); + *(float*)buf1109 = nan(*(uint*)buf1110); + *(float*)buf1111 = nextafter(*(float*)buf1112, *(float*)buf1113); + *(float2*)buf1114 = nextafter(*(float2*)buf1115, *(float2*)buf1116); + *(float3*)buf1117 = nextafter(*(float3*)buf1118, *(float3*)buf1119); + *(float4*)buf1120 = nextafter(*(float4*)buf1121, *(float4*)buf1122); + *(float*)buf1123 = normalize(*(float*)buf1124); + *(float2*)buf1125 = normalize(*(float2*)buf1126); + *(float3*)buf1127 = normalize(*(float3*)buf1128); + *(float4*)buf1129 = normalize(*(float4*)buf1130); + *(float*)buf1131 = pow(*(float*)buf1132, *(float*)buf1133); + *(float2*)buf1134 = pow(*(float2*)buf1135, *(float2*)buf1136); + *(float3*)buf1137 = pow(*(float3*)buf1138, *(float3*)buf1139); + *(float4*)buf1140 = pow(*(float4*)buf1141, *(float4*)buf1142); + *(float*)buf1143 = pown(*(float*)buf1144, *(int*)buf1145); + *(float2*)buf1146 = pown(*(float2*)buf1147, *(int2*)buf1148); + *(float3*)buf1149 = pown(*(float3*)buf1150, *(int3*)buf1151); + *(float4*)buf1152 = pown(*(float4*)buf1153, *(int4*)buf1154); + *(float*)buf1155 = powr(*(float*)buf1156, *(float*)buf1157); + *(float2*)buf1158 = powr(*(float2*)buf1159, *(float2*)buf1160); + *(float3*)buf1161 = powr(*(float3*)buf1162, *(float3*)buf1163); + *(float4*)buf1164 = powr(*(float4*)buf1165, *(float4*)buf1166); + *(float*)buf1167 = radians(*(float*)buf1168); + *(float2*)buf1169 = radians(*(float2*)buf1170); + *(float3*)buf1171 = radians(*(float3*)buf1172); + *(float4*)buf1173 = radians(*(float4*)buf1174); + *(float*)buf1175 = remainder(*(float*)buf1176, *(float*)buf1177); + *(float2*)buf1178 = remainder(*(float2*)buf1179, *(float2*)buf1180); + *(float3*)buf1181 = remainder(*(float3*)buf1182, *(float3*)buf1183); + *(float4*)buf1184 = remainder(*(float4*)buf1185, *(float4*)buf1186); + *(float*)buf1187 = remquo(*(float*)buf1188, *(float*)buf1189, (int*) buf1190); + *(float2*)buf1191 = remquo(*(float2*)buf1192, *(float2*)buf1193, (int2*) buf1194); + *(float3*)buf1195 = remquo(*(float3*)buf1196, *(float3*)buf1197, (int3*) buf1198); + *(float4*)buf1199 = remquo(*(float4*)buf1200, *(float4*)buf1201, (int4*) buf1202); + *(float*)buf1203 = rint(*(float*)buf1204); + *(float2*)buf1205 = rint(*(float2*)buf1206); + *(float3*)buf1207 = rint(*(float3*)buf1208); + *(float4*)buf1209 = rint(*(float4*)buf1210); + *(float*)buf1211 = rootn(*(float*)buf1212, *(int*)buf1213); + *(float2*)buf1214 = rootn(*(float2*)buf1215, *(int2*)buf1216); + *(float3*)buf1217 = rootn(*(float3*)buf1218, *(int3*)buf1219); + *(float4*)buf1220 = rootn(*(float4*)buf1221, *(int4*)buf1222); + *(float*)buf1223 = round(*(float*)buf1224); + *(float2*)buf1225 = round(*(float2*)buf1226); + *(float3*)buf1227 = round(*(float3*)buf1228); + *(float4*)buf1229 = round(*(float4*)buf1230); + rsAllocationCopy1DRange(*(rs_allocation*)buf1231, *(uint32_t*)buf1232, *(uint32_t*)buf1233, *(uint32_t*)buf1234, *(rs_allocation*)buf1235, *(uint32_t*)buf1236, *(uint32_t*)buf1237); + rsAllocationCopy2DRange(*(rs_allocation*)buf1238, *(uint32_t*)buf1239, *(uint32_t*)buf1240, *(uint32_t*)buf1241, *(rs_allocation_cubemap_face*)buf1242, *(uint32_t*)buf1243, *(uint32_t*)buf1244, *(rs_allocation*)buf1245, *(uint32_t*)buf1246, *(uint32_t*)buf1247, *(uint32_t*)buf1248, *(rs_allocation_cubemap_face*)buf1249); + *(uint32_t*)buf1250 = rsAllocationGetDimFaces(*(rs_allocation*)buf1251); + *(uint32_t*)buf1252 = rsAllocationGetDimLOD(*(rs_allocation*)buf1253); + *(uint32_t*)buf1254 = rsAllocationGetDimX(*(rs_allocation*)buf1255); + *(uint32_t*)buf1256 = rsAllocationGetDimY(*(rs_allocation*)buf1257); + *(uint32_t*)buf1258 = rsAllocationGetDimZ(*(rs_allocation*)buf1259); + *(rs_element*)buf1260 = rsAllocationGetElement(*(rs_allocation*)buf1261); + rsAllocationIoReceive(*(rs_allocation*)buf1262); + rsAllocationIoSend(*(rs_allocation*)buf1263); + *(int32_t*)buf1264 = rsAtomicAdd((volatile int32_t*) buf1265, *(int32_t*)buf1266); + *(int32_t*)buf1267 = rsAtomicAnd((volatile int32_t*) buf1268, *(int32_t*)buf1269); + *(int32_t*)buf1270 = rsAtomicCas((volatile int32_t*) buf1271, *(int32_t*)buf1272, *(int32_t*)buf1273); + *(uint32_t*)buf1274 = rsAtomicCas((volatile uint32_t*) buf1275, *(uint32_t*)buf1276, *(uint32_t*)buf1277); + *(int32_t*)buf1278 = rsAtomicDec((volatile int32_t*) buf1279); + *(int32_t*)buf1280 = rsAtomicInc((volatile int32_t*) buf1281); + *(uint32_t*)buf1282 = rsAtomicMax((volatile uint32_t*) buf1283, *(uint32_t*)buf1284); + *(int32_t*)buf1285 = rsAtomicMax((volatile int32_t*) buf1286, *(int32_t*)buf1287); + *(uint32_t*)buf1288 = rsAtomicMin((volatile uint32_t*) buf1289, *(uint32_t*)buf1290); + *(int32_t*)buf1291 = rsAtomicMin((volatile int32_t*) buf1292, *(int32_t*)buf1293); + *(int32_t*)buf1294 = rsAtomicOr((volatile int32_t*) buf1295, *(int32_t*)buf1296); + *(int32_t*)buf1297 = rsAtomicSub((volatile int32_t*) buf1298, *(int32_t*)buf1299); + *(int32_t*)buf1300 = rsAtomicXor((volatile int32_t*) buf1301, *(int32_t*)buf1302); + *(char*)buf1303 = rsClamp(*(char*)buf1304, *(char*)buf1305, *(char*)buf1306); + *(uchar*)buf1307 = rsClamp(*(uchar*)buf1308, *(uchar*)buf1309, *(uchar*)buf1310); + *(short*)buf1311 = rsClamp(*(short*)buf1312, *(short*)buf1313, *(short*)buf1314); + *(ushort*)buf1315 = rsClamp(*(ushort*)buf1316, *(ushort*)buf1317, *(ushort*)buf1318); + *(int*)buf1319 = rsClamp(*(int*)buf1320, *(int*)buf1321, *(int*)buf1322); + *(uint*)buf1323 = rsClamp(*(uint*)buf1324, *(uint*)buf1325, *(uint*)buf1326); + rsClearObject((rs_element*) buf1327); + rsClearObject((rs_type*) buf1328); + rsClearObject((rs_allocation*) buf1329); + rsClearObject((rs_sampler*) buf1330); + rsClearObject((rs_script*) buf1331); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1332); + rsClearObject((rs_program_fragment*) buf1333); + rsClearObject((rs_program_vertex*) buf1334); + rsClearObject((rs_program_raster*) buf1335); + rsClearObject((rs_program_store*) buf1336); + rsClearObject((rs_font*) buf1337); +#endif + rsDebug((const char*) buf1338, *(double*)buf1339); + rsDebug((const char*) buf1340, *(int*)buf1341); + rsDebug((const char*) buf1342, *(uint*)buf1343); + rsDebug((const char*) buf1344, *(long*)buf1345); + rsDebug((const char*) buf1346, *(ulong*)buf1347); + rsDebug((const char*) buf1348, *(float*)buf1349); + rsDebug((const char*) buf1350, *(float2*)buf1351); + rsDebug((const char*) buf1352, *(float3*)buf1353); + rsDebug((const char*) buf1354, *(float4*)buf1355); + rsDebug((const char*) buf1356, *(float*)buf1357, *(float*)buf1358); + rsDebug((const char*) buf1359, *(float*)buf1360, *(float*)buf1361, *(float*)buf1362); + rsDebug((const char*) buf1363, *(float*)buf1364, *(float*)buf1365, *(float*)buf1366, *(float*)buf1367); + rsDebug((const char*) buf1368, *(long long*)buf1369); + rsDebug((const char*) buf1370, *(unsigned long long*)buf1371); + rsDebug((const char*) buf1372, (const void*) buf1373); + rsDebug((const char*) buf1374, (const rs_matrix4x4*) buf1375); + rsDebug((const char*) buf1376, (const rs_matrix3x3*) buf1377); + rsDebug((const char*) buf1378, (const rs_matrix2x2*) buf1379); + *(uint32_t*)buf1380 = rsElementGetBytesSize(*(rs_element*)buf1381); + *(rs_data_kind*)buf1382 = rsElementGetDataKind(*(rs_element*)buf1383); + *(rs_data_type*)buf1384 = rsElementGetDataType(*(rs_element*)buf1385); + *(rs_element*)buf1386 = rsElementGetSubElement(*(rs_element*)buf1387, *(uint32_t*)buf1388); + *(uint32_t*)buf1389 = rsElementGetSubElementArraySize(*(rs_element*)buf1390, *(uint32_t*)buf1391); + *(uint32_t*)buf1392 = rsElementGetSubElementCount(*(rs_element*)buf1393); + *(uint32_t*)buf1394 = rsElementGetSubElementName(*(rs_element*)buf1395, *(uint32_t*)buf1396, (char*) buf1397, *(uint32_t*)buf1398); + *(uint32_t*)buf1399 = rsElementGetSubElementNameLength(*(rs_element*)buf1400, *(uint32_t*)buf1401); + *(uint32_t*)buf1402 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf1403, *(uint32_t*)buf1404); + *(uint32_t*)buf1405 = rsElementGetVectorSize(*(rs_element*)buf1406); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1407, (float4*) buf1408, (float4*) buf1409, (float4*) buf1410, (float4*) buf1411, (float4*) buf1412, (float4*) buf1413); + rsForEach(*(rs_script*)buf1414, *(rs_allocation*)buf1415, *(rs_allocation*)buf1416, (const void*) buf1417, *(size_t*)buf1418, (const rs_script_call_t*) buf1419); + rsForEach(*(rs_script*)buf1420, *(rs_allocation*)buf1421, *(rs_allocation*)buf1422, (const void*) buf1423, *(size_t*)buf1424); + rsForEach(*(rs_script*)buf1425, *(rs_allocation*)buf1426, *(rs_allocation*)buf1427); + *(float*)buf1428 = rsFrac(*(float*)buf1429); + *(rs_allocation*)buf1430 = rsGetAllocation((const void*) buf1431); + *(float*)buf1432 = rsGetDt(); + *(const void**)buf1433 = rsGetElementAt(*(rs_allocation*)buf1434, *(uint32_t*)buf1435); + *(const void**)buf1436 = rsGetElementAt(*(rs_allocation*)buf1437, *(uint32_t*)buf1438, *(uint32_t*)buf1439); + *(const void**)buf1440 = rsGetElementAt(*(rs_allocation*)buf1441, *(uint32_t*)buf1442, *(uint32_t*)buf1443, *(uint32_t*)buf1444); + *(float*)buf1445 = rsGetElementAt_float(*(rs_allocation*)buf1446, *(uint32_t*)buf1447); + *(float2*)buf1448 = rsGetElementAt_float2(*(rs_allocation*)buf1449, *(uint32_t*)buf1450); + *(float3*)buf1451 = rsGetElementAt_float3(*(rs_allocation*)buf1452, *(uint32_t*)buf1453); + *(float4*)buf1454 = rsGetElementAt_float4(*(rs_allocation*)buf1455, *(uint32_t*)buf1456); + *(double*)buf1457 = rsGetElementAt_double(*(rs_allocation*)buf1458, *(uint32_t*)buf1459); + *(double2*)buf1460 = rsGetElementAt_double2(*(rs_allocation*)buf1461, *(uint32_t*)buf1462); + *(double3*)buf1463 = rsGetElementAt_double3(*(rs_allocation*)buf1464, *(uint32_t*)buf1465); + *(double4*)buf1466 = rsGetElementAt_double4(*(rs_allocation*)buf1467, *(uint32_t*)buf1468); + *(char*)buf1469 = rsGetElementAt_char(*(rs_allocation*)buf1470, *(uint32_t*)buf1471); + *(char2*)buf1472 = rsGetElementAt_char2(*(rs_allocation*)buf1473, *(uint32_t*)buf1474); + *(char3*)buf1475 = rsGetElementAt_char3(*(rs_allocation*)buf1476, *(uint32_t*)buf1477); + *(char4*)buf1478 = rsGetElementAt_char4(*(rs_allocation*)buf1479, *(uint32_t*)buf1480); + *(uchar*)buf1481 = rsGetElementAt_uchar(*(rs_allocation*)buf1482, *(uint32_t*)buf1483); + *(uchar2*)buf1484 = rsGetElementAt_uchar2(*(rs_allocation*)buf1485, *(uint32_t*)buf1486); + *(uchar3*)buf1487 = rsGetElementAt_uchar3(*(rs_allocation*)buf1488, *(uint32_t*)buf1489); + *(uchar4*)buf1490 = rsGetElementAt_uchar4(*(rs_allocation*)buf1491, *(uint32_t*)buf1492); + *(short*)buf1493 = rsGetElementAt_short(*(rs_allocation*)buf1494, *(uint32_t*)buf1495); + *(short2*)buf1496 = rsGetElementAt_short2(*(rs_allocation*)buf1497, *(uint32_t*)buf1498); + *(short3*)buf1499 = rsGetElementAt_short3(*(rs_allocation*)buf1500, *(uint32_t*)buf1501); + *(short4*)buf1502 = rsGetElementAt_short4(*(rs_allocation*)buf1503, *(uint32_t*)buf1504); + *(ushort*)buf1505 = rsGetElementAt_ushort(*(rs_allocation*)buf1506, *(uint32_t*)buf1507); + *(ushort2*)buf1508 = rsGetElementAt_ushort2(*(rs_allocation*)buf1509, *(uint32_t*)buf1510); + *(ushort3*)buf1511 = rsGetElementAt_ushort3(*(rs_allocation*)buf1512, *(uint32_t*)buf1513); + *(ushort4*)buf1514 = rsGetElementAt_ushort4(*(rs_allocation*)buf1515, *(uint32_t*)buf1516); + *(int*)buf1517 = rsGetElementAt_int(*(rs_allocation*)buf1518, *(uint32_t*)buf1519); + *(int2*)buf1520 = rsGetElementAt_int2(*(rs_allocation*)buf1521, *(uint32_t*)buf1522); + *(int3*)buf1523 = rsGetElementAt_int3(*(rs_allocation*)buf1524, *(uint32_t*)buf1525); + *(int4*)buf1526 = rsGetElementAt_int4(*(rs_allocation*)buf1527, *(uint32_t*)buf1528); + *(uint*)buf1529 = rsGetElementAt_uint(*(rs_allocation*)buf1530, *(uint32_t*)buf1531); + *(uint2*)buf1532 = rsGetElementAt_uint2(*(rs_allocation*)buf1533, *(uint32_t*)buf1534); + *(uint3*)buf1535 = rsGetElementAt_uint3(*(rs_allocation*)buf1536, *(uint32_t*)buf1537); + *(uint4*)buf1538 = rsGetElementAt_uint4(*(rs_allocation*)buf1539, *(uint32_t*)buf1540); + *(long*)buf1541 = rsGetElementAt_long(*(rs_allocation*)buf1542, *(uint32_t*)buf1543); + *(long2*)buf1544 = rsGetElementAt_long2(*(rs_allocation*)buf1545, *(uint32_t*)buf1546); + *(long3*)buf1547 = rsGetElementAt_long3(*(rs_allocation*)buf1548, *(uint32_t*)buf1549); + *(long4*)buf1550 = rsGetElementAt_long4(*(rs_allocation*)buf1551, *(uint32_t*)buf1552); + *(ulong*)buf1553 = rsGetElementAt_ulong(*(rs_allocation*)buf1554, *(uint32_t*)buf1555); + *(ulong2*)buf1556 = rsGetElementAt_ulong2(*(rs_allocation*)buf1557, *(uint32_t*)buf1558); + *(ulong3*)buf1559 = rsGetElementAt_ulong3(*(rs_allocation*)buf1560, *(uint32_t*)buf1561); + *(ulong4*)buf1562 = rsGetElementAt_ulong4(*(rs_allocation*)buf1563, *(uint32_t*)buf1564); + *(float*)buf1565 = rsGetElementAt_float(*(rs_allocation*)buf1566, *(uint32_t*)buf1567, *(uint32_t*)buf1568); + *(float2*)buf1569 = rsGetElementAt_float2(*(rs_allocation*)buf1570, *(uint32_t*)buf1571, *(uint32_t*)buf1572); + *(float3*)buf1573 = rsGetElementAt_float3(*(rs_allocation*)buf1574, *(uint32_t*)buf1575, *(uint32_t*)buf1576); + *(float4*)buf1577 = rsGetElementAt_float4(*(rs_allocation*)buf1578, *(uint32_t*)buf1579, *(uint32_t*)buf1580); + *(double*)buf1581 = rsGetElementAt_double(*(rs_allocation*)buf1582, *(uint32_t*)buf1583, *(uint32_t*)buf1584); + *(double2*)buf1585 = rsGetElementAt_double2(*(rs_allocation*)buf1586, *(uint32_t*)buf1587, *(uint32_t*)buf1588); + *(double3*)buf1589 = rsGetElementAt_double3(*(rs_allocation*)buf1590, *(uint32_t*)buf1591, *(uint32_t*)buf1592); + *(double4*)buf1593 = rsGetElementAt_double4(*(rs_allocation*)buf1594, *(uint32_t*)buf1595, *(uint32_t*)buf1596); + *(char*)buf1597 = rsGetElementAt_char(*(rs_allocation*)buf1598, *(uint32_t*)buf1599, *(uint32_t*)buf1600); + *(char2*)buf1601 = rsGetElementAt_char2(*(rs_allocation*)buf1602, *(uint32_t*)buf1603, *(uint32_t*)buf1604); + *(char3*)buf1605 = rsGetElementAt_char3(*(rs_allocation*)buf1606, *(uint32_t*)buf1607, *(uint32_t*)buf1608); + *(char4*)buf1609 = rsGetElementAt_char4(*(rs_allocation*)buf1610, *(uint32_t*)buf1611, *(uint32_t*)buf1612); + *(uchar*)buf1613 = rsGetElementAt_uchar(*(rs_allocation*)buf1614, *(uint32_t*)buf1615, *(uint32_t*)buf1616); + *(uchar2*)buf1617 = rsGetElementAt_uchar2(*(rs_allocation*)buf1618, *(uint32_t*)buf1619, *(uint32_t*)buf1620); + *(uchar3*)buf1621 = rsGetElementAt_uchar3(*(rs_allocation*)buf1622, *(uint32_t*)buf1623, *(uint32_t*)buf1624); + *(uchar4*)buf1625 = rsGetElementAt_uchar4(*(rs_allocation*)buf1626, *(uint32_t*)buf1627, *(uint32_t*)buf1628); + *(short*)buf1629 = rsGetElementAt_short(*(rs_allocation*)buf1630, *(uint32_t*)buf1631, *(uint32_t*)buf1632); + *(short2*)buf1633 = rsGetElementAt_short2(*(rs_allocation*)buf1634, *(uint32_t*)buf1635, *(uint32_t*)buf1636); + *(short3*)buf1637 = rsGetElementAt_short3(*(rs_allocation*)buf1638, *(uint32_t*)buf1639, *(uint32_t*)buf1640); + *(short4*)buf1641 = rsGetElementAt_short4(*(rs_allocation*)buf1642, *(uint32_t*)buf1643, *(uint32_t*)buf1644); + *(ushort*)buf1645 = rsGetElementAt_ushort(*(rs_allocation*)buf1646, *(uint32_t*)buf1647, *(uint32_t*)buf1648); + *(ushort2*)buf1649 = rsGetElementAt_ushort2(*(rs_allocation*)buf1650, *(uint32_t*)buf1651, *(uint32_t*)buf1652); + *(ushort3*)buf1653 = rsGetElementAt_ushort3(*(rs_allocation*)buf1654, *(uint32_t*)buf1655, *(uint32_t*)buf1656); + *(ushort4*)buf1657 = rsGetElementAt_ushort4(*(rs_allocation*)buf1658, *(uint32_t*)buf1659, *(uint32_t*)buf1660); + *(int*)buf1661 = rsGetElementAt_int(*(rs_allocation*)buf1662, *(uint32_t*)buf1663, *(uint32_t*)buf1664); + *(int2*)buf1665 = rsGetElementAt_int2(*(rs_allocation*)buf1666, *(uint32_t*)buf1667, *(uint32_t*)buf1668); + *(int3*)buf1669 = rsGetElementAt_int3(*(rs_allocation*)buf1670, *(uint32_t*)buf1671, *(uint32_t*)buf1672); + *(int4*)buf1673 = rsGetElementAt_int4(*(rs_allocation*)buf1674, *(uint32_t*)buf1675, *(uint32_t*)buf1676); + *(uint*)buf1677 = rsGetElementAt_uint(*(rs_allocation*)buf1678, *(uint32_t*)buf1679, *(uint32_t*)buf1680); + *(uint2*)buf1681 = rsGetElementAt_uint2(*(rs_allocation*)buf1682, *(uint32_t*)buf1683, *(uint32_t*)buf1684); + *(uint3*)buf1685 = rsGetElementAt_uint3(*(rs_allocation*)buf1686, *(uint32_t*)buf1687, *(uint32_t*)buf1688); + *(uint4*)buf1689 = rsGetElementAt_uint4(*(rs_allocation*)buf1690, *(uint32_t*)buf1691, *(uint32_t*)buf1692); + *(long*)buf1693 = rsGetElementAt_long(*(rs_allocation*)buf1694, *(uint32_t*)buf1695, *(uint32_t*)buf1696); + *(long2*)buf1697 = rsGetElementAt_long2(*(rs_allocation*)buf1698, *(uint32_t*)buf1699, *(uint32_t*)buf1700); + *(long3*)buf1701 = rsGetElementAt_long3(*(rs_allocation*)buf1702, *(uint32_t*)buf1703, *(uint32_t*)buf1704); + *(long4*)buf1705 = rsGetElementAt_long4(*(rs_allocation*)buf1706, *(uint32_t*)buf1707, *(uint32_t*)buf1708); + *(ulong*)buf1709 = rsGetElementAt_ulong(*(rs_allocation*)buf1710, *(uint32_t*)buf1711, *(uint32_t*)buf1712); + *(ulong2*)buf1713 = rsGetElementAt_ulong2(*(rs_allocation*)buf1714, *(uint32_t*)buf1715, *(uint32_t*)buf1716); + *(ulong3*)buf1717 = rsGetElementAt_ulong3(*(rs_allocation*)buf1718, *(uint32_t*)buf1719, *(uint32_t*)buf1720); + *(ulong4*)buf1721 = rsGetElementAt_ulong4(*(rs_allocation*)buf1722, *(uint32_t*)buf1723, *(uint32_t*)buf1724); + *(float*)buf1725 = rsGetElementAt_float(*(rs_allocation*)buf1726, *(uint32_t*)buf1727, *(uint32_t*)buf1728, *(uint32_t*)buf1729); + *(float2*)buf1730 = rsGetElementAt_float2(*(rs_allocation*)buf1731, *(uint32_t*)buf1732, *(uint32_t*)buf1733, *(uint32_t*)buf1734); + *(float3*)buf1735 = rsGetElementAt_float3(*(rs_allocation*)buf1736, *(uint32_t*)buf1737, *(uint32_t*)buf1738, *(uint32_t*)buf1739); + *(float4*)buf1740 = rsGetElementAt_float4(*(rs_allocation*)buf1741, *(uint32_t*)buf1742, *(uint32_t*)buf1743, *(uint32_t*)buf1744); + *(double*)buf1745 = rsGetElementAt_double(*(rs_allocation*)buf1746, *(uint32_t*)buf1747, *(uint32_t*)buf1748, *(uint32_t*)buf1749); + *(double2*)buf1750 = rsGetElementAt_double2(*(rs_allocation*)buf1751, *(uint32_t*)buf1752, *(uint32_t*)buf1753, *(uint32_t*)buf1754); + *(double3*)buf1755 = rsGetElementAt_double3(*(rs_allocation*)buf1756, *(uint32_t*)buf1757, *(uint32_t*)buf1758, *(uint32_t*)buf1759); + *(double4*)buf1760 = rsGetElementAt_double4(*(rs_allocation*)buf1761, *(uint32_t*)buf1762, *(uint32_t*)buf1763, *(uint32_t*)buf1764); + *(char*)buf1765 = rsGetElementAt_char(*(rs_allocation*)buf1766, *(uint32_t*)buf1767, *(uint32_t*)buf1768, *(uint32_t*)buf1769); + *(char2*)buf1770 = rsGetElementAt_char2(*(rs_allocation*)buf1771, *(uint32_t*)buf1772, *(uint32_t*)buf1773, *(uint32_t*)buf1774); + *(char3*)buf1775 = rsGetElementAt_char3(*(rs_allocation*)buf1776, *(uint32_t*)buf1777, *(uint32_t*)buf1778, *(uint32_t*)buf1779); + *(char4*)buf1780 = rsGetElementAt_char4(*(rs_allocation*)buf1781, *(uint32_t*)buf1782, *(uint32_t*)buf1783, *(uint32_t*)buf1784); + *(uchar*)buf1785 = rsGetElementAt_uchar(*(rs_allocation*)buf1786, *(uint32_t*)buf1787, *(uint32_t*)buf1788, *(uint32_t*)buf1789); + *(uchar2*)buf1790 = rsGetElementAt_uchar2(*(rs_allocation*)buf1791, *(uint32_t*)buf1792, *(uint32_t*)buf1793, *(uint32_t*)buf1794); + *(uchar3*)buf1795 = rsGetElementAt_uchar3(*(rs_allocation*)buf1796, *(uint32_t*)buf1797, *(uint32_t*)buf1798, *(uint32_t*)buf1799); + *(uchar4*)buf1800 = rsGetElementAt_uchar4(*(rs_allocation*)buf1801, *(uint32_t*)buf1802, *(uint32_t*)buf1803, *(uint32_t*)buf1804); + *(short*)buf1805 = rsGetElementAt_short(*(rs_allocation*)buf1806, *(uint32_t*)buf1807, *(uint32_t*)buf1808, *(uint32_t*)buf1809); + *(short2*)buf1810 = rsGetElementAt_short2(*(rs_allocation*)buf1811, *(uint32_t*)buf1812, *(uint32_t*)buf1813, *(uint32_t*)buf1814); + *(short3*)buf1815 = rsGetElementAt_short3(*(rs_allocation*)buf1816, *(uint32_t*)buf1817, *(uint32_t*)buf1818, *(uint32_t*)buf1819); + *(short4*)buf1820 = rsGetElementAt_short4(*(rs_allocation*)buf1821, *(uint32_t*)buf1822, *(uint32_t*)buf1823, *(uint32_t*)buf1824); + *(ushort*)buf1825 = rsGetElementAt_ushort(*(rs_allocation*)buf1826, *(uint32_t*)buf1827, *(uint32_t*)buf1828, *(uint32_t*)buf1829); + *(ushort2*)buf1830 = rsGetElementAt_ushort2(*(rs_allocation*)buf1831, *(uint32_t*)buf1832, *(uint32_t*)buf1833, *(uint32_t*)buf1834); + *(ushort3*)buf1835 = rsGetElementAt_ushort3(*(rs_allocation*)buf1836, *(uint32_t*)buf1837, *(uint32_t*)buf1838, *(uint32_t*)buf1839); + *(ushort4*)buf1840 = rsGetElementAt_ushort4(*(rs_allocation*)buf1841, *(uint32_t*)buf1842, *(uint32_t*)buf1843, *(uint32_t*)buf1844); + *(int*)buf1845 = rsGetElementAt_int(*(rs_allocation*)buf1846, *(uint32_t*)buf1847, *(uint32_t*)buf1848, *(uint32_t*)buf1849); + *(int2*)buf1850 = rsGetElementAt_int2(*(rs_allocation*)buf1851, *(uint32_t*)buf1852, *(uint32_t*)buf1853, *(uint32_t*)buf1854); + *(int3*)buf1855 = rsGetElementAt_int3(*(rs_allocation*)buf1856, *(uint32_t*)buf1857, *(uint32_t*)buf1858, *(uint32_t*)buf1859); + *(int4*)buf1860 = rsGetElementAt_int4(*(rs_allocation*)buf1861, *(uint32_t*)buf1862, *(uint32_t*)buf1863, *(uint32_t*)buf1864); + *(uint*)buf1865 = rsGetElementAt_uint(*(rs_allocation*)buf1866, *(uint32_t*)buf1867, *(uint32_t*)buf1868, *(uint32_t*)buf1869); + *(uint2*)buf1870 = rsGetElementAt_uint2(*(rs_allocation*)buf1871, *(uint32_t*)buf1872, *(uint32_t*)buf1873, *(uint32_t*)buf1874); + *(uint3*)buf1875 = rsGetElementAt_uint3(*(rs_allocation*)buf1876, *(uint32_t*)buf1877, *(uint32_t*)buf1878, *(uint32_t*)buf1879); + *(uint4*)buf1880 = rsGetElementAt_uint4(*(rs_allocation*)buf1881, *(uint32_t*)buf1882, *(uint32_t*)buf1883, *(uint32_t*)buf1884); + *(long*)buf1885 = rsGetElementAt_long(*(rs_allocation*)buf1886, *(uint32_t*)buf1887, *(uint32_t*)buf1888, *(uint32_t*)buf1889); + *(long2*)buf1890 = rsGetElementAt_long2(*(rs_allocation*)buf1891, *(uint32_t*)buf1892, *(uint32_t*)buf1893, *(uint32_t*)buf1894); + *(long3*)buf1895 = rsGetElementAt_long3(*(rs_allocation*)buf1896, *(uint32_t*)buf1897, *(uint32_t*)buf1898, *(uint32_t*)buf1899); + *(long4*)buf1900 = rsGetElementAt_long4(*(rs_allocation*)buf1901, *(uint32_t*)buf1902, *(uint32_t*)buf1903, *(uint32_t*)buf1904); + *(ulong*)buf1905 = rsGetElementAt_ulong(*(rs_allocation*)buf1906, *(uint32_t*)buf1907, *(uint32_t*)buf1908, *(uint32_t*)buf1909); + *(ulong2*)buf1910 = rsGetElementAt_ulong2(*(rs_allocation*)buf1911, *(uint32_t*)buf1912, *(uint32_t*)buf1913, *(uint32_t*)buf1914); + *(ulong3*)buf1915 = rsGetElementAt_ulong3(*(rs_allocation*)buf1916, *(uint32_t*)buf1917, *(uint32_t*)buf1918, *(uint32_t*)buf1919); + *(ulong4*)buf1920 = rsGetElementAt_ulong4(*(rs_allocation*)buf1921, *(uint32_t*)buf1922, *(uint32_t*)buf1923, *(uint32_t*)buf1924); + *(bool*)buf1925 = rsIsObject(*(rs_element*)buf1926); + *(bool*)buf1927 = rsIsObject(*(rs_type*)buf1928); + *(bool*)buf1929 = rsIsObject(*(rs_allocation*)buf1930); + *(bool*)buf1931 = rsIsObject(*(rs_sampler*)buf1932); + *(bool*)buf1933 = rsIsObject(*(rs_script*)buf1934); +#ifndef __LP64__ + *(bool*)buf1935 = rsIsObject(*(rs_mesh*)buf1936); + *(bool*)buf1937 = rsIsObject(*(rs_program_fragment*)buf1938); + *(bool*)buf1939 = rsIsObject(*(rs_program_vertex*)buf1940); + *(bool*)buf1941 = rsIsObject(*(rs_program_raster*)buf1942); + *(bool*)buf1943 = rsIsObject(*(rs_program_store*)buf1944); + *(bool*)buf1945 = rsIsObject(*(rs_font*)buf1946); +#endif + *(bool*)buf1947 = rsIsSphereInFrustum((float4*) buf1948, (float4*) buf1949, (float4*) buf1950, (float4*) buf1951, (float4*) buf1952, (float4*) buf1953, (float4*) buf1954); + *(rs_tm**)buf1955 = rsLocaltime((rs_tm*) buf1956, (const rs_time_t*) buf1957); + *(float*)buf1958 = rsMatrixGet((const rs_matrix4x4*) buf1959, *(uint32_t*)buf1960, *(uint32_t*)buf1961); + *(float*)buf1962 = rsMatrixGet((const rs_matrix3x3*) buf1963, *(uint32_t*)buf1964, *(uint32_t*)buf1965); + *(float*)buf1966 = rsMatrixGet((const rs_matrix2x2*) buf1967, *(uint32_t*)buf1968, *(uint32_t*)buf1969); + *(bool*)buf1970 = rsMatrixInverse((rs_matrix4x4*) buf1971); + *(bool*)buf1972 = rsMatrixInverseTranspose((rs_matrix4x4*) buf1973); + rsMatrixLoad((rs_matrix4x4*) buf1974, (const float*) buf1975); + rsMatrixLoad((rs_matrix3x3*) buf1976, (const float*) buf1977); + rsMatrixLoad((rs_matrix2x2*) buf1978, (const float*) buf1979); + rsMatrixLoad((rs_matrix4x4*) buf1980, (const rs_matrix4x4*) buf1981); + rsMatrixLoad((rs_matrix3x3*) buf1982, (const rs_matrix3x3*) buf1983); + rsMatrixLoad((rs_matrix2x2*) buf1984, (const rs_matrix2x2*) buf1985); + rsMatrixLoad((rs_matrix4x4*) buf1986, (const rs_matrix3x3*) buf1987); + rsMatrixLoad((rs_matrix4x4*) buf1988, (const rs_matrix2x2*) buf1989); + rsMatrixLoadFrustum((rs_matrix4x4*) buf1990, *(float*)buf1991, *(float*)buf1992, *(float*)buf1993, *(float*)buf1994, *(float*)buf1995, *(float*)buf1996); + rsMatrixLoadIdentity((rs_matrix4x4*) buf1997); + rsMatrixLoadIdentity((rs_matrix3x3*) buf1998); + rsMatrixLoadIdentity((rs_matrix2x2*) buf1999); + rsMatrixLoadMultiply((rs_matrix4x4*) buf2000, (const rs_matrix4x4*) buf2001, (const rs_matrix4x4*) buf2002); + rsMatrixLoadMultiply((rs_matrix3x3*) buf2003, (const rs_matrix3x3*) buf2004, (const rs_matrix3x3*) buf2005); + rsMatrixLoadMultiply((rs_matrix2x2*) buf2006, (const rs_matrix2x2*) buf2007, (const rs_matrix2x2*) buf2008); + rsMatrixLoadOrtho((rs_matrix4x4*) buf2009, *(float*)buf2010, *(float*)buf2011, *(float*)buf2012, *(float*)buf2013, *(float*)buf2014, *(float*)buf2015); + rsMatrixLoadPerspective((rs_matrix4x4*) buf2016, *(float*)buf2017, *(float*)buf2018, *(float*)buf2019, *(float*)buf2020); + rsMatrixLoadRotate((rs_matrix4x4*) buf2021, *(float*)buf2022, *(float*)buf2023, *(float*)buf2024, *(float*)buf2025); + rsMatrixLoadScale((rs_matrix4x4*) buf2026, *(float*)buf2027, *(float*)buf2028, *(float*)buf2029); + rsMatrixLoadTranslate((rs_matrix4x4*) buf2030, *(float*)buf2031, *(float*)buf2032, *(float*)buf2033); + rsMatrixMultiply((rs_matrix4x4*) buf2034, (const rs_matrix4x4*) buf2035); + rsMatrixMultiply((rs_matrix3x3*) buf2036, (const rs_matrix3x3*) buf2037); + rsMatrixMultiply((rs_matrix2x2*) buf2038, (const rs_matrix2x2*) buf2039); + *(float4*)buf2040 = rsMatrixMultiply((const rs_matrix4x4*) buf2041, *(float4*)buf2042); + *(float4*)buf2043 = rsMatrixMultiply((const rs_matrix4x4*) buf2044, *(float3*)buf2045); + *(float4*)buf2046 = rsMatrixMultiply((const rs_matrix4x4*) buf2047, *(float2*)buf2048); + *(float3*)buf2049 = rsMatrixMultiply((const rs_matrix3x3*) buf2050, *(float3*)buf2051); + *(float3*)buf2052 = rsMatrixMultiply((const rs_matrix3x3*) buf2053, *(float2*)buf2054); + *(float2*)buf2055 = rsMatrixMultiply((const rs_matrix2x2*) buf2056, *(float2*)buf2057); + rsMatrixRotate((rs_matrix4x4*) buf2058, *(float*)buf2059, *(float*)buf2060, *(float*)buf2061, *(float*)buf2062); + rsMatrixScale((rs_matrix4x4*) buf2063, *(float*)buf2064, *(float*)buf2065, *(float*)buf2066); + rsMatrixSet((rs_matrix4x4*) buf2067, *(uint32_t*)buf2068, *(uint32_t*)buf2069, *(float*)buf2070); + rsMatrixSet((rs_matrix3x3*) buf2071, *(uint32_t*)buf2072, *(uint32_t*)buf2073, *(float*)buf2074); + rsMatrixSet((rs_matrix2x2*) buf2075, *(uint32_t*)buf2076, *(uint32_t*)buf2077, *(float*)buf2078); + rsMatrixTranslate((rs_matrix4x4*) buf2079, *(float*)buf2080, *(float*)buf2081, *(float*)buf2082); + rsMatrixTranspose((rs_matrix4x4*) buf2083); + rsMatrixTranspose((rs_matrix3x3*) buf2084); + rsMatrixTranspose((rs_matrix2x2*) buf2085); + *(uchar4*)buf2086 = rsPackColorTo8888(*(float*)buf2087, *(float*)buf2088, *(float*)buf2089); + *(uchar4*)buf2090 = rsPackColorTo8888(*(float*)buf2091, *(float*)buf2092, *(float*)buf2093, *(float*)buf2094); + *(uchar4*)buf2095 = rsPackColorTo8888(*(float3*)buf2096); + *(uchar4*)buf2097 = rsPackColorTo8888(*(float4*)buf2098); + rsQuaternionAdd((rs_quaternion*) buf2099, (const rs_quaternion*) buf2100); + rsQuaternionConjugate((rs_quaternion*) buf2101); + *(float*)buf2102 = rsQuaternionDot((const rs_quaternion*) buf2103, (const rs_quaternion*) buf2104); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2105, (const rs_quaternion*) buf2106); + rsQuaternionLoadRotate((rs_quaternion*) buf2107, *(float*)buf2108, *(float*)buf2109, *(float*)buf2110, *(float*)buf2111); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2112, *(float*)buf2113, *(float*)buf2114, *(float*)buf2115, *(float*)buf2116); + rsQuaternionMultiply((rs_quaternion*) buf2117, *(float*)buf2118); + rsQuaternionMultiply((rs_quaternion*) buf2119, (const rs_quaternion*) buf2120); + rsQuaternionNormalize((rs_quaternion*) buf2121); + rsQuaternionSet((rs_quaternion*) buf2122, *(float*)buf2123, *(float*)buf2124, *(float*)buf2125, *(float*)buf2126); + rsQuaternionSet((rs_quaternion*) buf2127, (const rs_quaternion*) buf2128); + rsQuaternionSlerp((rs_quaternion*) buf2129, (const rs_quaternion*) buf2130, (const rs_quaternion*) buf2131, *(float*)buf2132); + *(int*)buf2133 = rsRand(*(int*)buf2134); + *(int*)buf2135 = rsRand(*(int*)buf2136, *(int*)buf2137); + *(float*)buf2138 = rsRand(*(float*)buf2139); + *(float*)buf2140 = rsRand(*(float*)buf2141, *(float*)buf2142); + *(float4*)buf2143 = rsSample(*(rs_allocation*)buf2144, *(rs_sampler*)buf2145, *(float*)buf2146); + *(float4*)buf2147 = rsSample(*(rs_allocation*)buf2148, *(rs_sampler*)buf2149, *(float*)buf2150, *(float*)buf2151); + *(float4*)buf2152 = rsSample(*(rs_allocation*)buf2153, *(rs_sampler*)buf2154, *(float2*)buf2155); + *(float4*)buf2156 = rsSample(*(rs_allocation*)buf2157, *(rs_sampler*)buf2158, *(float2*)buf2159, *(float*)buf2160); + *(float*)buf2161 = rsSamplerGetAnisotropy(*(rs_sampler*)buf2162); + *(rs_sampler_value*)buf2163 = rsSamplerGetMagnification(*(rs_sampler*)buf2164); + *(rs_sampler_value*)buf2165 = rsSamplerGetMinification(*(rs_sampler*)buf2166); + *(rs_sampler_value*)buf2167 = rsSamplerGetWrapS(*(rs_sampler*)buf2168); + *(rs_sampler_value*)buf2169 = rsSamplerGetWrapT(*(rs_sampler*)buf2170); + *(bool*)buf2171 = rsSendToClient(*(int*)buf2172); + *(bool*)buf2173 = rsSendToClient(*(int*)buf2174, (const void*) buf2175, *(uint*)buf2176); + rsSendToClientBlocking(*(int*)buf2177); + rsSendToClientBlocking(*(int*)buf2178, (const void*) buf2179, *(uint*)buf2180); + rsSetObject((rs_element*) buf2181, *(rs_element*)buf2182); + rsSetObject((rs_type*) buf2183, *(rs_type*)buf2184); + rsSetObject((rs_allocation*) buf2185, *(rs_allocation*)buf2186); + rsSetObject((rs_sampler*) buf2187, *(rs_sampler*)buf2188); + rsSetObject((rs_script*) buf2189, *(rs_script*)buf2190); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2191, *(rs_mesh*)buf2192); + rsSetObject((rs_program_fragment*) buf2193, *(rs_program_fragment*)buf2194); + rsSetObject((rs_program_vertex*) buf2195, *(rs_program_vertex*)buf2196); + rsSetObject((rs_program_raster*) buf2197, *(rs_program_raster*)buf2198); + rsSetObject((rs_program_store*) buf2199, *(rs_program_store*)buf2200); + rsSetObject((rs_font*) buf2201, *(rs_font*)buf2202); +#endif + *(rs_time_t*)buf2203 = rsTime((rs_time_t*) buf2204); + *(float4*)buf2205 = rsUnpackColor8888(*(uchar4*)buf2206); + *(int64_t*)buf2207 = rsUptimeMillis(); + *(int64_t*)buf2208 = rsUptimeNanos(); + *(float4*)buf2209 = rsYuvToRGBA_float4(*(uchar*)buf2210, *(uchar*)buf2211, *(uchar*)buf2212); + *(uchar4*)buf2213 = rsYuvToRGBA_uchar4(*(uchar*)buf2214, *(uchar*)buf2215, *(uchar*)buf2216); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2217); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2218, *(rs_allocation_usage_type*)buf2219); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf2220, *(uint*)buf2221); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2222, *(uint*)buf2223, *(rs_allocation*)buf2224); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2225, *(uint*)buf2226, *(rs_allocation*)buf2227); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf2228); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2229); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2230); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2231); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2232); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2233); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2234, *(uint*)buf2235, *(rs_sampler*)buf2236); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2237, *(uint*)buf2238, *(rs_allocation*)buf2239); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2240, *(float*)buf2241, *(float*)buf2242, *(float*)buf2243); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf2244); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2245); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2246); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2247, *(uint*)buf2248); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2249, *(uint*)buf2250, *(uint*)buf2251, *(uint*)buf2252); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2253, *(float*)buf2254, *(float*)buf2255, *(float*)buf2256, *(float*)buf2257, *(float*)buf2258, *(float*)buf2259, *(float*)buf2260, *(float*)buf2261, *(float*)buf2262, *(float*)buf2263, *(float*)buf2264); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2265, *(float*)buf2266, *(float*)buf2267, *(float*)buf2268, *(float*)buf2269, *(float*)buf2270, *(float*)buf2271, *(float*)buf2272, *(float*)buf2273, *(float*)buf2274, *(float*)buf2275, *(float*)buf2276, *(float*)buf2277, *(float*)buf2278, *(float*)buf2279, *(float*)buf2280, *(float*)buf2281, *(float*)buf2282, *(float*)buf2283, *(float*)buf2284); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2285, *(float*)buf2286, *(float*)buf2287, *(float*)buf2288, *(float*)buf2289); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2290, *(float*)buf2291, *(float*)buf2292, *(float*)buf2293, *(float*)buf2294); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2295, *(int*)buf2296, *(int*)buf2297); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2298, *(int*)buf2299, *(int*)buf2300); +#endif +#ifndef __LP64__ + *(uint*)buf2301 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2302, *(float*)buf2303, *(float*)buf2304, *(float*)buf2305); +#endif +#ifndef __LP64__ + *(uint*)buf2306 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2307 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2308, (int*) buf2309, (int*) buf2310, (int*) buf2311, (int*) buf2312); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2313, (int*) buf2314, (int*) buf2315, (int*) buf2316, (int*) buf2317); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2318, (float*) buf2319, (float*) buf2320, (float*) buf2321, (float*) buf2322, (float*) buf2323, (float*) buf2324); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2325, (float3*) buf2326, (float3*) buf2327); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf2328 = rsgMeshGetIndexAllocation(*(rs_mesh*)buf2329, *(uint32_t*)buf2330); +#endif +#ifndef __LP64__ + *(rs_primitive*)buf2331 = rsgMeshGetPrimitive(*(rs_mesh*)buf2332, *(uint32_t*)buf2333); +#endif +#ifndef __LP64__ + *(uint32_t*)buf2334 = rsgMeshGetPrimitiveCount(*(rs_mesh*)buf2335); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf2336 = rsgMeshGetVertexAllocation(*(rs_mesh*)buf2337, *(uint32_t*)buf2338); +#endif +#ifndef __LP64__ + *(uint32_t*)buf2339 = rsgMeshGetVertexAllocationCount(*(rs_mesh*)buf2340); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf2341, *(float*)buf2342, *(float*)buf2343, *(float*)buf2344, *(float*)buf2345); +#endif +#ifndef __LP64__ + *(rs_cull_mode*)buf2346 = rsgProgramRasterGetCullMode(*(rs_program_raster*)buf2347); +#endif +#ifndef __LP64__ + *(bool*)buf2348 = rsgProgramRasterIsPointSpriteEnabled(*(rs_program_raster*)buf2349); +#endif +#ifndef __LP64__ + *(rs_blend_dst_func*)buf2350 = rsgProgramStoreGetBlendDstFunc(*(rs_program_store*)buf2351); +#endif +#ifndef __LP64__ + *(rs_blend_src_func*)buf2352 = rsgProgramStoreGetBlendSrcFunc(*(rs_program_store*)buf2353); +#endif +#ifndef __LP64__ + *(rs_depth_func*)buf2354 = rsgProgramStoreGetDepthFunc(*(rs_program_store*)buf2355); +#endif +#ifndef __LP64__ + *(bool*)buf2356 = rsgProgramStoreIsColorMaskAlphaEnabled(*(rs_program_store*)buf2357); +#endif +#ifndef __LP64__ + *(bool*)buf2358 = rsgProgramStoreIsColorMaskBlueEnabled(*(rs_program_store*)buf2359); +#endif +#ifndef __LP64__ + *(bool*)buf2360 = rsgProgramStoreIsColorMaskGreenEnabled(*(rs_program_store*)buf2361); +#endif +#ifndef __LP64__ + *(bool*)buf2362 = rsgProgramStoreIsColorMaskRedEnabled(*(rs_program_store*)buf2363); +#endif +#ifndef __LP64__ + *(bool*)buf2364 = rsgProgramStoreIsDepthMaskEnabled(*(rs_program_store*)buf2365); +#endif +#ifndef __LP64__ + *(bool*)buf2366 = rsgProgramStoreIsDitherEnabled(*(rs_program_store*)buf2367); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf2368); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf2369); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf2370); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf2371); +#endif + *(float*)buf2372 = rsqrt(*(float*)buf2373); + *(float2*)buf2374 = rsqrt(*(float2*)buf2375); + *(float3*)buf2376 = rsqrt(*(float3*)buf2377); + *(float4*)buf2378 = rsqrt(*(float4*)buf2379); + *(float*)buf2380 = sign(*(float*)buf2381); + *(float2*)buf2382 = sign(*(float2*)buf2383); + *(float3*)buf2384 = sign(*(float3*)buf2385); + *(float4*)buf2386 = sign(*(float4*)buf2387); + *(float*)buf2388 = sin(*(float*)buf2389); + *(float2*)buf2390 = sin(*(float2*)buf2391); + *(float3*)buf2392 = sin(*(float3*)buf2393); + *(float4*)buf2394 = sin(*(float4*)buf2395); + *(float*)buf2396 = sincos(*(float*)buf2397, (float*) buf2398); + *(float2*)buf2399 = sincos(*(float2*)buf2400, (float2*) buf2401); + *(float3*)buf2402 = sincos(*(float3*)buf2403, (float3*) buf2404); + *(float4*)buf2405 = sincos(*(float4*)buf2406, (float4*) buf2407); + *(float*)buf2408 = sinh(*(float*)buf2409); + *(float2*)buf2410 = sinh(*(float2*)buf2411); + *(float3*)buf2412 = sinh(*(float3*)buf2413); + *(float4*)buf2414 = sinh(*(float4*)buf2415); + *(float*)buf2416 = sinpi(*(float*)buf2417); + *(float2*)buf2418 = sinpi(*(float2*)buf2419); + *(float3*)buf2420 = sinpi(*(float3*)buf2421); + *(float4*)buf2422 = sinpi(*(float4*)buf2423); + *(float*)buf2424 = sqrt(*(float*)buf2425); + *(float2*)buf2426 = sqrt(*(float2*)buf2427); + *(float3*)buf2428 = sqrt(*(float3*)buf2429); + *(float4*)buf2430 = sqrt(*(float4*)buf2431); + *(float*)buf2432 = step(*(float*)buf2433, *(float*)buf2434); + *(float2*)buf2435 = step(*(float2*)buf2436, *(float2*)buf2437); + *(float3*)buf2438 = step(*(float3*)buf2439, *(float3*)buf2440); + *(float4*)buf2441 = step(*(float4*)buf2442, *(float4*)buf2443); + *(float2*)buf2444 = step(*(float2*)buf2445, *(float*)buf2446); + *(float3*)buf2447 = step(*(float3*)buf2448, *(float*)buf2449); + *(float4*)buf2450 = step(*(float4*)buf2451, *(float*)buf2452); + *(float*)buf2453 = tan(*(float*)buf2454); + *(float2*)buf2455 = tan(*(float2*)buf2456); + *(float3*)buf2457 = tan(*(float3*)buf2458); + *(float4*)buf2459 = tan(*(float4*)buf2460); + *(float*)buf2461 = tanh(*(float*)buf2462); + *(float2*)buf2463 = tanh(*(float2*)buf2464); + *(float3*)buf2465 = tanh(*(float3*)buf2466); + *(float4*)buf2467 = tanh(*(float4*)buf2468); + *(float*)buf2469 = tanpi(*(float*)buf2470); + *(float2*)buf2471 = tanpi(*(float2*)buf2472); + *(float3*)buf2473 = tanpi(*(float3*)buf2474); + *(float4*)buf2475 = tanpi(*(float4*)buf2476); + *(float*)buf2477 = tgamma(*(float*)buf2478); + *(float2*)buf2479 = tgamma(*(float2*)buf2480); + *(float3*)buf2481 = tgamma(*(float3*)buf2482); + *(float4*)buf2483 = tgamma(*(float4*)buf2484); + *(float*)buf2485 = trunc(*(float*)buf2486); + *(float2*)buf2487 = trunc(*(float2*)buf2488); + *(float3*)buf2489 = trunc(*(float3*)buf2490); + *(float4*)buf2491 = trunc(*(float4*)buf2492); +}
diff --git a/slang/tests/P_all_api_16/stderr.txt.expect b/slang/tests/P_all_api_16/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_16/stderr.txt.expect
diff --git a/slang/tests/P_all_api_16/stdout.txt.expect b/slang/tests/P_all_api_16/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_16/stdout.txt.expect
diff --git a/slang/tests/P_all_api_17/all17.rs b/slang/tests/P_all_api_17/all17.rs new file mode 100644 index 0000000..be84dd1 --- /dev/null +++ b/slang/tests/P_all_api_17/all17.rs
@@ -0,0 +1,3724 @@ +// -target-api 17 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; +char buf2493[200]; +char buf2494[200]; +char buf2495[200]; +char buf2496[200]; +char buf2497[200]; +char buf2498[200]; +char buf2499[200]; +char buf2500[200]; +char buf2501[200]; +char buf2502[200]; +char buf2503[200]; +char buf2504[200]; +char buf2505[200]; +char buf2506[200]; +char buf2507[200]; +char buf2508[200]; +char buf2509[200]; +char buf2510[200]; +char buf2511[200]; +char buf2512[200]; +char buf2513[200]; +char buf2514[200]; +char buf2515[200]; +char buf2516[200]; +char buf2517[200]; +char buf2518[200]; +char buf2519[200]; +char buf2520[200]; +char buf2521[200]; +char buf2522[200]; +char buf2523[200]; +char buf2524[200]; +char buf2525[200]; +char buf2526[200]; +char buf2527[200]; +char buf2528[200]; +char buf2529[200]; +char buf2530[200]; +char buf2531[200]; +char buf2532[200]; +char buf2533[200]; +char buf2534[200]; +char buf2535[200]; +char buf2536[200]; +char buf2537[200]; +char buf2538[200]; +char buf2539[200]; +char buf2540[200]; +char buf2541[200]; +char buf2542[200]; +char buf2543[200]; +char buf2544[200]; +char buf2545[200]; +char buf2546[200]; +char buf2547[200]; +char buf2548[200]; +char buf2549[200]; +char buf2550[200]; +char buf2551[200]; +char buf2552[200]; +char buf2553[200]; +char buf2554[200]; +char buf2555[200]; +char buf2556[200]; +char buf2557[200]; +char buf2558[200]; +char buf2559[200]; +char buf2560[200]; +char buf2561[200]; +char buf2562[200]; +char buf2563[200]; +char buf2564[200]; +char buf2565[200]; +char buf2566[200]; +char buf2567[200]; +char buf2568[200]; +char buf2569[200]; +char buf2570[200]; +char buf2571[200]; +char buf2572[200]; +char buf2573[200]; +char buf2574[200]; +char buf2575[200]; +char buf2576[200]; +char buf2577[200]; +char buf2578[200]; +char buf2579[200]; +char buf2580[200]; +char buf2581[200]; +char buf2582[200]; +char buf2583[200]; +char buf2584[200]; +char buf2585[200]; +char buf2586[200]; +char buf2587[200]; +char buf2588[200]; +char buf2589[200]; +char buf2590[200]; +char buf2591[200]; +char buf2592[200]; +char buf2593[200]; +char buf2594[200]; +char buf2595[200]; +char buf2596[200]; +char buf2597[200]; +char buf2598[200]; +char buf2599[200]; +char buf2600[200]; + +void RS_KERNEL test(int in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fast_distance(*(float*)buf637, *(float*)buf638); + *(float*)buf639 = fast_distance(*(float2*)buf640, *(float2*)buf641); + *(float*)buf642 = fast_distance(*(float3*)buf643, *(float3*)buf644); + *(float*)buf645 = fast_distance(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = fast_length(*(float*)buf649); + *(float*)buf650 = fast_length(*(float2*)buf651); + *(float*)buf652 = fast_length(*(float3*)buf653); + *(float*)buf654 = fast_length(*(float4*)buf655); + *(float*)buf656 = fast_normalize(*(float*)buf657); + *(float2*)buf658 = fast_normalize(*(float2*)buf659); + *(float3*)buf660 = fast_normalize(*(float3*)buf661); + *(float4*)buf662 = fast_normalize(*(float4*)buf663); + *(float*)buf664 = fdim(*(float*)buf665, *(float*)buf666); + *(float2*)buf667 = fdim(*(float2*)buf668, *(float2*)buf669); + *(float3*)buf670 = fdim(*(float3*)buf671, *(float3*)buf672); + *(float4*)buf673 = fdim(*(float4*)buf674, *(float4*)buf675); + *(float*)buf676 = floor(*(float*)buf677); + *(float2*)buf678 = floor(*(float2*)buf679); + *(float3*)buf680 = floor(*(float3*)buf681); + *(float4*)buf682 = floor(*(float4*)buf683); + *(float*)buf684 = fma(*(float*)buf685, *(float*)buf686, *(float*)buf687); + *(float2*)buf688 = fma(*(float2*)buf689, *(float2*)buf690, *(float2*)buf691); + *(float3*)buf692 = fma(*(float3*)buf693, *(float3*)buf694, *(float3*)buf695); + *(float4*)buf696 = fma(*(float4*)buf697, *(float4*)buf698, *(float4*)buf699); + *(float*)buf700 = fmax(*(float*)buf701, *(float*)buf702); + *(float2*)buf703 = fmax(*(float2*)buf704, *(float2*)buf705); + *(float3*)buf706 = fmax(*(float3*)buf707, *(float3*)buf708); + *(float4*)buf709 = fmax(*(float4*)buf710, *(float4*)buf711); + *(float2*)buf712 = fmax(*(float2*)buf713, *(float*)buf714); + *(float3*)buf715 = fmax(*(float3*)buf716, *(float*)buf717); + *(float4*)buf718 = fmax(*(float4*)buf719, *(float*)buf720); + *(float*)buf721 = fmin(*(float*)buf722, *(float*)buf723); + *(float2*)buf724 = fmin(*(float2*)buf725, *(float2*)buf726); + *(float3*)buf727 = fmin(*(float3*)buf728, *(float3*)buf729); + *(float4*)buf730 = fmin(*(float4*)buf731, *(float4*)buf732); + *(float2*)buf733 = fmin(*(float2*)buf734, *(float*)buf735); + *(float3*)buf736 = fmin(*(float3*)buf737, *(float*)buf738); + *(float4*)buf739 = fmin(*(float4*)buf740, *(float*)buf741); + *(float*)buf742 = fmod(*(float*)buf743, *(float*)buf744); + *(float2*)buf745 = fmod(*(float2*)buf746, *(float2*)buf747); + *(float3*)buf748 = fmod(*(float3*)buf749, *(float3*)buf750); + *(float4*)buf751 = fmod(*(float4*)buf752, *(float4*)buf753); + *(float*)buf754 = fract(*(float*)buf755, (float*) buf756); + *(float2*)buf757 = fract(*(float2*)buf758, (float2*) buf759); + *(float3*)buf760 = fract(*(float3*)buf761, (float3*) buf762); + *(float4*)buf763 = fract(*(float4*)buf764, (float4*) buf765); + *(float*)buf766 = fract(*(float*)buf767); + *(float2*)buf768 = fract(*(float2*)buf769); + *(float3*)buf770 = fract(*(float3*)buf771); + *(float4*)buf772 = fract(*(float4*)buf773); + *(float*)buf774 = frexp(*(float*)buf775, (int*) buf776); + *(float2*)buf777 = frexp(*(float2*)buf778, (int2*) buf779); + *(float3*)buf780 = frexp(*(float3*)buf781, (int3*) buf782); + *(float4*)buf783 = frexp(*(float4*)buf784, (int4*) buf785); + *(float*)buf786 = half_recip(*(float*)buf787); + *(float2*)buf788 = half_recip(*(float2*)buf789); + *(float3*)buf790 = half_recip(*(float3*)buf791); + *(float4*)buf792 = half_recip(*(float4*)buf793); + *(float*)buf794 = half_rsqrt(*(float*)buf795); + *(float2*)buf796 = half_rsqrt(*(float2*)buf797); + *(float3*)buf798 = half_rsqrt(*(float3*)buf799); + *(float4*)buf800 = half_rsqrt(*(float4*)buf801); + *(float*)buf802 = half_sqrt(*(float*)buf803); + *(float2*)buf804 = half_sqrt(*(float2*)buf805); + *(float3*)buf806 = half_sqrt(*(float3*)buf807); + *(float4*)buf808 = half_sqrt(*(float4*)buf809); + *(float*)buf810 = hypot(*(float*)buf811, *(float*)buf812); + *(float2*)buf813 = hypot(*(float2*)buf814, *(float2*)buf815); + *(float3*)buf816 = hypot(*(float3*)buf817, *(float3*)buf818); + *(float4*)buf819 = hypot(*(float4*)buf820, *(float4*)buf821); + *(int*)buf822 = ilogb(*(float*)buf823); + *(int2*)buf824 = ilogb(*(float2*)buf825); + *(int3*)buf826 = ilogb(*(float3*)buf827); + *(int4*)buf828 = ilogb(*(float4*)buf829); + *(float*)buf830 = ldexp(*(float*)buf831, *(int*)buf832); + *(float2*)buf833 = ldexp(*(float2*)buf834, *(int2*)buf835); + *(float3*)buf836 = ldexp(*(float3*)buf837, *(int3*)buf838); + *(float4*)buf839 = ldexp(*(float4*)buf840, *(int4*)buf841); + *(float2*)buf842 = ldexp(*(float2*)buf843, *(int*)buf844); + *(float3*)buf845 = ldexp(*(float3*)buf846, *(int*)buf847); + *(float4*)buf848 = ldexp(*(float4*)buf849, *(int*)buf850); + *(float*)buf851 = length(*(float*)buf852); + *(float*)buf853 = length(*(float2*)buf854); + *(float*)buf855 = length(*(float3*)buf856); + *(float*)buf857 = length(*(float4*)buf858); + *(float*)buf859 = lgamma(*(float*)buf860); + *(float2*)buf861 = lgamma(*(float2*)buf862); + *(float3*)buf863 = lgamma(*(float3*)buf864); + *(float4*)buf865 = lgamma(*(float4*)buf866); + *(float*)buf867 = lgamma(*(float*)buf868, (int*) buf869); + *(float2*)buf870 = lgamma(*(float2*)buf871, (int2*) buf872); + *(float3*)buf873 = lgamma(*(float3*)buf874, (int3*) buf875); + *(float4*)buf876 = lgamma(*(float4*)buf877, (int4*) buf878); + *(float*)buf879 = log(*(float*)buf880); + *(float2*)buf881 = log(*(float2*)buf882); + *(float3*)buf883 = log(*(float3*)buf884); + *(float4*)buf885 = log(*(float4*)buf886); + *(float*)buf887 = log10(*(float*)buf888); + *(float2*)buf889 = log10(*(float2*)buf890); + *(float3*)buf891 = log10(*(float3*)buf892); + *(float4*)buf893 = log10(*(float4*)buf894); + *(float*)buf895 = log1p(*(float*)buf896); + *(float2*)buf897 = log1p(*(float2*)buf898); + *(float3*)buf899 = log1p(*(float3*)buf900); + *(float4*)buf901 = log1p(*(float4*)buf902); + *(float*)buf903 = log2(*(float*)buf904); + *(float2*)buf905 = log2(*(float2*)buf906); + *(float3*)buf907 = log2(*(float3*)buf908); + *(float4*)buf909 = log2(*(float4*)buf910); + *(float*)buf911 = logb(*(float*)buf912); + *(float2*)buf913 = logb(*(float2*)buf914); + *(float3*)buf915 = logb(*(float3*)buf916); + *(float4*)buf917 = logb(*(float4*)buf918); + *(float*)buf919 = mad(*(float*)buf920, *(float*)buf921, *(float*)buf922); + *(float2*)buf923 = mad(*(float2*)buf924, *(float2*)buf925, *(float2*)buf926); + *(float3*)buf927 = mad(*(float3*)buf928, *(float3*)buf929, *(float3*)buf930); + *(float4*)buf931 = mad(*(float4*)buf932, *(float4*)buf933, *(float4*)buf934); + *(float*)buf935 = max(*(float*)buf936, *(float*)buf937); + *(float2*)buf938 = max(*(float2*)buf939, *(float2*)buf940); + *(float3*)buf941 = max(*(float3*)buf942, *(float3*)buf943); + *(float4*)buf944 = max(*(float4*)buf945, *(float4*)buf946); + *(float2*)buf947 = max(*(float2*)buf948, *(float*)buf949); + *(float3*)buf950 = max(*(float3*)buf951, *(float*)buf952); + *(float4*)buf953 = max(*(float4*)buf954, *(float*)buf955); + *(char*)buf956 = max(*(char*)buf957, *(char*)buf958); + *(uchar*)buf959 = max(*(uchar*)buf960, *(uchar*)buf961); + *(short*)buf962 = max(*(short*)buf963, *(short*)buf964); + *(ushort*)buf965 = max(*(ushort*)buf966, *(ushort*)buf967); + *(int*)buf968 = max(*(int*)buf969, *(int*)buf970); + *(uint*)buf971 = max(*(uint*)buf972, *(uint*)buf973); + *(char2*)buf974 = max(*(char2*)buf975, *(char2*)buf976); + *(uchar2*)buf977 = max(*(uchar2*)buf978, *(uchar2*)buf979); + *(short2*)buf980 = max(*(short2*)buf981, *(short2*)buf982); + *(ushort2*)buf983 = max(*(ushort2*)buf984, *(ushort2*)buf985); + *(int2*)buf986 = max(*(int2*)buf987, *(int2*)buf988); + *(uint2*)buf989 = max(*(uint2*)buf990, *(uint2*)buf991); + *(char3*)buf992 = max(*(char3*)buf993, *(char3*)buf994); + *(uchar3*)buf995 = max(*(uchar3*)buf996, *(uchar3*)buf997); + *(short3*)buf998 = max(*(short3*)buf999, *(short3*)buf1000); + *(ushort3*)buf1001 = max(*(ushort3*)buf1002, *(ushort3*)buf1003); + *(int3*)buf1004 = max(*(int3*)buf1005, *(int3*)buf1006); + *(uint3*)buf1007 = max(*(uint3*)buf1008, *(uint3*)buf1009); + *(char4*)buf1010 = max(*(char4*)buf1011, *(char4*)buf1012); + *(uchar4*)buf1013 = max(*(uchar4*)buf1014, *(uchar4*)buf1015); + *(short4*)buf1016 = max(*(short4*)buf1017, *(short4*)buf1018); + *(ushort4*)buf1019 = max(*(ushort4*)buf1020, *(ushort4*)buf1021); + *(int4*)buf1022 = max(*(int4*)buf1023, *(int4*)buf1024); + *(uint4*)buf1025 = max(*(uint4*)buf1026, *(uint4*)buf1027); + *(float*)buf1028 = min(*(float*)buf1029, *(float*)buf1030); + *(float2*)buf1031 = min(*(float2*)buf1032, *(float2*)buf1033); + *(float3*)buf1034 = min(*(float3*)buf1035, *(float3*)buf1036); + *(float4*)buf1037 = min(*(float4*)buf1038, *(float4*)buf1039); + *(float2*)buf1040 = min(*(float2*)buf1041, *(float*)buf1042); + *(float3*)buf1043 = min(*(float3*)buf1044, *(float*)buf1045); + *(float4*)buf1046 = min(*(float4*)buf1047, *(float*)buf1048); + *(char*)buf1049 = min(*(char*)buf1050, *(char*)buf1051); + *(uchar*)buf1052 = min(*(uchar*)buf1053, *(uchar*)buf1054); + *(short*)buf1055 = min(*(short*)buf1056, *(short*)buf1057); + *(ushort*)buf1058 = min(*(ushort*)buf1059, *(ushort*)buf1060); + *(int*)buf1061 = min(*(int*)buf1062, *(int*)buf1063); + *(uint*)buf1064 = min(*(uint*)buf1065, *(uint*)buf1066); + *(char2*)buf1067 = min(*(char2*)buf1068, *(char2*)buf1069); + *(uchar2*)buf1070 = min(*(uchar2*)buf1071, *(uchar2*)buf1072); + *(short2*)buf1073 = min(*(short2*)buf1074, *(short2*)buf1075); + *(ushort2*)buf1076 = min(*(ushort2*)buf1077, *(ushort2*)buf1078); + *(int2*)buf1079 = min(*(int2*)buf1080, *(int2*)buf1081); + *(uint2*)buf1082 = min(*(uint2*)buf1083, *(uint2*)buf1084); + *(char3*)buf1085 = min(*(char3*)buf1086, *(char3*)buf1087); + *(uchar3*)buf1088 = min(*(uchar3*)buf1089, *(uchar3*)buf1090); + *(short3*)buf1091 = min(*(short3*)buf1092, *(short3*)buf1093); + *(ushort3*)buf1094 = min(*(ushort3*)buf1095, *(ushort3*)buf1096); + *(int3*)buf1097 = min(*(int3*)buf1098, *(int3*)buf1099); + *(uint3*)buf1100 = min(*(uint3*)buf1101, *(uint3*)buf1102); + *(char4*)buf1103 = min(*(char4*)buf1104, *(char4*)buf1105); + *(uchar4*)buf1106 = min(*(uchar4*)buf1107, *(uchar4*)buf1108); + *(short4*)buf1109 = min(*(short4*)buf1110, *(short4*)buf1111); + *(ushort4*)buf1112 = min(*(ushort4*)buf1113, *(ushort4*)buf1114); + *(int4*)buf1115 = min(*(int4*)buf1116, *(int4*)buf1117); + *(uint4*)buf1118 = min(*(uint4*)buf1119, *(uint4*)buf1120); + *(float*)buf1121 = mix(*(float*)buf1122, *(float*)buf1123, *(float*)buf1124); + *(float2*)buf1125 = mix(*(float2*)buf1126, *(float2*)buf1127, *(float2*)buf1128); + *(float3*)buf1129 = mix(*(float3*)buf1130, *(float3*)buf1131, *(float3*)buf1132); + *(float4*)buf1133 = mix(*(float4*)buf1134, *(float4*)buf1135, *(float4*)buf1136); + *(float2*)buf1137 = mix(*(float2*)buf1138, *(float2*)buf1139, *(float*)buf1140); + *(float3*)buf1141 = mix(*(float3*)buf1142, *(float3*)buf1143, *(float*)buf1144); + *(float4*)buf1145 = mix(*(float4*)buf1146, *(float4*)buf1147, *(float*)buf1148); + *(float*)buf1149 = modf(*(float*)buf1150, (float*) buf1151); + *(float2*)buf1152 = modf(*(float2*)buf1153, (float2*) buf1154); + *(float3*)buf1155 = modf(*(float3*)buf1156, (float3*) buf1157); + *(float4*)buf1158 = modf(*(float4*)buf1159, (float4*) buf1160); + *(float*)buf1161 = nan(*(uint*)buf1162); + *(float*)buf1163 = nextafter(*(float*)buf1164, *(float*)buf1165); + *(float2*)buf1166 = nextafter(*(float2*)buf1167, *(float2*)buf1168); + *(float3*)buf1169 = nextafter(*(float3*)buf1170, *(float3*)buf1171); + *(float4*)buf1172 = nextafter(*(float4*)buf1173, *(float4*)buf1174); + *(float*)buf1175 = normalize(*(float*)buf1176); + *(float2*)buf1177 = normalize(*(float2*)buf1178); + *(float3*)buf1179 = normalize(*(float3*)buf1180); + *(float4*)buf1181 = normalize(*(float4*)buf1182); + *(float*)buf1183 = pow(*(float*)buf1184, *(float*)buf1185); + *(float2*)buf1186 = pow(*(float2*)buf1187, *(float2*)buf1188); + *(float3*)buf1189 = pow(*(float3*)buf1190, *(float3*)buf1191); + *(float4*)buf1192 = pow(*(float4*)buf1193, *(float4*)buf1194); + *(float*)buf1195 = pown(*(float*)buf1196, *(int*)buf1197); + *(float2*)buf1198 = pown(*(float2*)buf1199, *(int2*)buf1200); + *(float3*)buf1201 = pown(*(float3*)buf1202, *(int3*)buf1203); + *(float4*)buf1204 = pown(*(float4*)buf1205, *(int4*)buf1206); + *(float*)buf1207 = powr(*(float*)buf1208, *(float*)buf1209); + *(float2*)buf1210 = powr(*(float2*)buf1211, *(float2*)buf1212); + *(float3*)buf1213 = powr(*(float3*)buf1214, *(float3*)buf1215); + *(float4*)buf1216 = powr(*(float4*)buf1217, *(float4*)buf1218); + *(float*)buf1219 = radians(*(float*)buf1220); + *(float2*)buf1221 = radians(*(float2*)buf1222); + *(float3*)buf1223 = radians(*(float3*)buf1224); + *(float4*)buf1225 = radians(*(float4*)buf1226); + *(float*)buf1227 = remainder(*(float*)buf1228, *(float*)buf1229); + *(float2*)buf1230 = remainder(*(float2*)buf1231, *(float2*)buf1232); + *(float3*)buf1233 = remainder(*(float3*)buf1234, *(float3*)buf1235); + *(float4*)buf1236 = remainder(*(float4*)buf1237, *(float4*)buf1238); + *(float*)buf1239 = remquo(*(float*)buf1240, *(float*)buf1241, (int*) buf1242); + *(float2*)buf1243 = remquo(*(float2*)buf1244, *(float2*)buf1245, (int2*) buf1246); + *(float3*)buf1247 = remquo(*(float3*)buf1248, *(float3*)buf1249, (int3*) buf1250); + *(float4*)buf1251 = remquo(*(float4*)buf1252, *(float4*)buf1253, (int4*) buf1254); + *(float*)buf1255 = rint(*(float*)buf1256); + *(float2*)buf1257 = rint(*(float2*)buf1258); + *(float3*)buf1259 = rint(*(float3*)buf1260); + *(float4*)buf1261 = rint(*(float4*)buf1262); + *(float*)buf1263 = rootn(*(float*)buf1264, *(int*)buf1265); + *(float2*)buf1266 = rootn(*(float2*)buf1267, *(int2*)buf1268); + *(float3*)buf1269 = rootn(*(float3*)buf1270, *(int3*)buf1271); + *(float4*)buf1272 = rootn(*(float4*)buf1273, *(int4*)buf1274); + *(float*)buf1275 = round(*(float*)buf1276); + *(float2*)buf1277 = round(*(float2*)buf1278); + *(float3*)buf1279 = round(*(float3*)buf1280); + *(float4*)buf1281 = round(*(float4*)buf1282); + rsAllocationCopy1DRange(*(rs_allocation*)buf1283, *(uint32_t*)buf1284, *(uint32_t*)buf1285, *(uint32_t*)buf1286, *(rs_allocation*)buf1287, *(uint32_t*)buf1288, *(uint32_t*)buf1289); + rsAllocationCopy2DRange(*(rs_allocation*)buf1290, *(uint32_t*)buf1291, *(uint32_t*)buf1292, *(uint32_t*)buf1293, *(rs_allocation_cubemap_face*)buf1294, *(uint32_t*)buf1295, *(uint32_t*)buf1296, *(rs_allocation*)buf1297, *(uint32_t*)buf1298, *(uint32_t*)buf1299, *(uint32_t*)buf1300, *(rs_allocation_cubemap_face*)buf1301); + *(uint32_t*)buf1302 = rsAllocationGetDimFaces(*(rs_allocation*)buf1303); + *(uint32_t*)buf1304 = rsAllocationGetDimLOD(*(rs_allocation*)buf1305); + *(uint32_t*)buf1306 = rsAllocationGetDimX(*(rs_allocation*)buf1307); + *(uint32_t*)buf1308 = rsAllocationGetDimY(*(rs_allocation*)buf1309); + *(uint32_t*)buf1310 = rsAllocationGetDimZ(*(rs_allocation*)buf1311); + *(rs_element*)buf1312 = rsAllocationGetElement(*(rs_allocation*)buf1313); + rsAllocationIoReceive(*(rs_allocation*)buf1314); + rsAllocationIoSend(*(rs_allocation*)buf1315); + *(int32_t*)buf1316 = rsAtomicAdd((volatile int32_t*) buf1317, *(int32_t*)buf1318); + *(int32_t*)buf1319 = rsAtomicAnd((volatile int32_t*) buf1320, *(int32_t*)buf1321); + *(int32_t*)buf1322 = rsAtomicCas((volatile int32_t*) buf1323, *(int32_t*)buf1324, *(int32_t*)buf1325); + *(uint32_t*)buf1326 = rsAtomicCas((volatile uint32_t*) buf1327, *(uint32_t*)buf1328, *(uint32_t*)buf1329); + *(int32_t*)buf1330 = rsAtomicDec((volatile int32_t*) buf1331); + *(int32_t*)buf1332 = rsAtomicInc((volatile int32_t*) buf1333); + *(uint32_t*)buf1334 = rsAtomicMax((volatile uint32_t*) buf1335, *(uint32_t*)buf1336); + *(int32_t*)buf1337 = rsAtomicMax((volatile int32_t*) buf1338, *(int32_t*)buf1339); + *(uint32_t*)buf1340 = rsAtomicMin((volatile uint32_t*) buf1341, *(uint32_t*)buf1342); + *(int32_t*)buf1343 = rsAtomicMin((volatile int32_t*) buf1344, *(int32_t*)buf1345); + *(int32_t*)buf1346 = rsAtomicOr((volatile int32_t*) buf1347, *(int32_t*)buf1348); + *(int32_t*)buf1349 = rsAtomicSub((volatile int32_t*) buf1350, *(int32_t*)buf1351); + *(int32_t*)buf1352 = rsAtomicXor((volatile int32_t*) buf1353, *(int32_t*)buf1354); + *(char*)buf1355 = rsClamp(*(char*)buf1356, *(char*)buf1357, *(char*)buf1358); + *(uchar*)buf1359 = rsClamp(*(uchar*)buf1360, *(uchar*)buf1361, *(uchar*)buf1362); + *(short*)buf1363 = rsClamp(*(short*)buf1364, *(short*)buf1365, *(short*)buf1366); + *(ushort*)buf1367 = rsClamp(*(ushort*)buf1368, *(ushort*)buf1369, *(ushort*)buf1370); + *(int*)buf1371 = rsClamp(*(int*)buf1372, *(int*)buf1373, *(int*)buf1374); + *(uint*)buf1375 = rsClamp(*(uint*)buf1376, *(uint*)buf1377, *(uint*)buf1378); + rsClearObject((rs_element*) buf1379); + rsClearObject((rs_type*) buf1380); + rsClearObject((rs_allocation*) buf1381); + rsClearObject((rs_sampler*) buf1382); + rsClearObject((rs_script*) buf1383); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1384); + rsClearObject((rs_program_fragment*) buf1385); + rsClearObject((rs_program_vertex*) buf1386); + rsClearObject((rs_program_raster*) buf1387); + rsClearObject((rs_program_store*) buf1388); + rsClearObject((rs_font*) buf1389); +#endif + rsDebug((const char*) buf1390, *(double*)buf1391); + rsDebug((const char*) buf1392, *(int*)buf1393); + rsDebug((const char*) buf1394, *(uint*)buf1395); + rsDebug((const char*) buf1396, *(long*)buf1397); + rsDebug((const char*) buf1398, *(ulong*)buf1399); + rsDebug((const char*) buf1400, *(int2*)buf1401); + rsDebug((const char*) buf1402, *(int3*)buf1403); + rsDebug((const char*) buf1404, *(int4*)buf1405); + rsDebug((const char*) buf1406, *(uint2*)buf1407); + rsDebug((const char*) buf1408, *(uint3*)buf1409); + rsDebug((const char*) buf1410, *(uint4*)buf1411); + rsDebug((const char*) buf1412, *(long2*)buf1413); + rsDebug((const char*) buf1414, *(long3*)buf1415); + rsDebug((const char*) buf1416, *(long4*)buf1417); + rsDebug((const char*) buf1418, *(ulong2*)buf1419); + rsDebug((const char*) buf1420, *(ulong3*)buf1421); + rsDebug((const char*) buf1422, *(ulong4*)buf1423); + rsDebug((const char*) buf1424, *(float*)buf1425); + rsDebug((const char*) buf1426, *(float2*)buf1427); + rsDebug((const char*) buf1428, *(float3*)buf1429); + rsDebug((const char*) buf1430, *(float4*)buf1431); + rsDebug((const char*) buf1432, *(char*)buf1433); + rsDebug((const char*) buf1434, *(char2*)buf1435); + rsDebug((const char*) buf1436, *(char3*)buf1437); + rsDebug((const char*) buf1438, *(char4*)buf1439); + rsDebug((const char*) buf1440, *(uchar*)buf1441); + rsDebug((const char*) buf1442, *(uchar2*)buf1443); + rsDebug((const char*) buf1444, *(uchar3*)buf1445); + rsDebug((const char*) buf1446, *(uchar4*)buf1447); + rsDebug((const char*) buf1448, *(short*)buf1449); + rsDebug((const char*) buf1450, *(short2*)buf1451); + rsDebug((const char*) buf1452, *(short3*)buf1453); + rsDebug((const char*) buf1454, *(short4*)buf1455); + rsDebug((const char*) buf1456, *(ushort*)buf1457); + rsDebug((const char*) buf1458, *(ushort2*)buf1459); + rsDebug((const char*) buf1460, *(ushort3*)buf1461); + rsDebug((const char*) buf1462, *(ushort4*)buf1463); + rsDebug((const char*) buf1464, *(float*)buf1465, *(float*)buf1466); + rsDebug((const char*) buf1467, *(float*)buf1468, *(float*)buf1469, *(float*)buf1470); + rsDebug((const char*) buf1471, *(float*)buf1472, *(float*)buf1473, *(float*)buf1474, *(float*)buf1475); + rsDebug((const char*) buf1476, *(long long*)buf1477); + rsDebug((const char*) buf1478, *(unsigned long long*)buf1479); + rsDebug((const char*) buf1480, (const void*) buf1481); + rsDebug((const char*) buf1482, (const rs_matrix4x4*) buf1483); + rsDebug((const char*) buf1484, (const rs_matrix3x3*) buf1485); + rsDebug((const char*) buf1486, (const rs_matrix2x2*) buf1487); + *(uint32_t*)buf1488 = rsElementGetBytesSize(*(rs_element*)buf1489); + *(rs_data_kind*)buf1490 = rsElementGetDataKind(*(rs_element*)buf1491); + *(rs_data_type*)buf1492 = rsElementGetDataType(*(rs_element*)buf1493); + *(rs_element*)buf1494 = rsElementGetSubElement(*(rs_element*)buf1495, *(uint32_t*)buf1496); + *(uint32_t*)buf1497 = rsElementGetSubElementArraySize(*(rs_element*)buf1498, *(uint32_t*)buf1499); + *(uint32_t*)buf1500 = rsElementGetSubElementCount(*(rs_element*)buf1501); + *(uint32_t*)buf1502 = rsElementGetSubElementName(*(rs_element*)buf1503, *(uint32_t*)buf1504, (char*) buf1505, *(uint32_t*)buf1506); + *(uint32_t*)buf1507 = rsElementGetSubElementNameLength(*(rs_element*)buf1508, *(uint32_t*)buf1509); + *(uint32_t*)buf1510 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf1511, *(uint32_t*)buf1512); + *(uint32_t*)buf1513 = rsElementGetVectorSize(*(rs_element*)buf1514); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1515, (float4*) buf1516, (float4*) buf1517, (float4*) buf1518, (float4*) buf1519, (float4*) buf1520, (float4*) buf1521); + rsForEach(*(rs_script*)buf1522, *(rs_allocation*)buf1523, *(rs_allocation*)buf1524, (const void*) buf1525, *(size_t*)buf1526, (const rs_script_call_t*) buf1527); + rsForEach(*(rs_script*)buf1528, *(rs_allocation*)buf1529, *(rs_allocation*)buf1530, (const void*) buf1531, *(size_t*)buf1532); + rsForEach(*(rs_script*)buf1533, *(rs_allocation*)buf1534, *(rs_allocation*)buf1535); + *(float*)buf1536 = rsFrac(*(float*)buf1537); + *(rs_allocation*)buf1538 = rsGetAllocation((const void*) buf1539); + *(float*)buf1540 = rsGetDt(); + *(const void**)buf1541 = rsGetElementAt(*(rs_allocation*)buf1542, *(uint32_t*)buf1543); + *(const void**)buf1544 = rsGetElementAt(*(rs_allocation*)buf1545, *(uint32_t*)buf1546, *(uint32_t*)buf1547); + *(const void**)buf1548 = rsGetElementAt(*(rs_allocation*)buf1549, *(uint32_t*)buf1550, *(uint32_t*)buf1551, *(uint32_t*)buf1552); + *(float*)buf1553 = rsGetElementAt_float(*(rs_allocation*)buf1554, *(uint32_t*)buf1555); + *(float2*)buf1556 = rsGetElementAt_float2(*(rs_allocation*)buf1557, *(uint32_t*)buf1558); + *(float3*)buf1559 = rsGetElementAt_float3(*(rs_allocation*)buf1560, *(uint32_t*)buf1561); + *(float4*)buf1562 = rsGetElementAt_float4(*(rs_allocation*)buf1563, *(uint32_t*)buf1564); + *(double*)buf1565 = rsGetElementAt_double(*(rs_allocation*)buf1566, *(uint32_t*)buf1567); + *(double2*)buf1568 = rsGetElementAt_double2(*(rs_allocation*)buf1569, *(uint32_t*)buf1570); + *(double3*)buf1571 = rsGetElementAt_double3(*(rs_allocation*)buf1572, *(uint32_t*)buf1573); + *(double4*)buf1574 = rsGetElementAt_double4(*(rs_allocation*)buf1575, *(uint32_t*)buf1576); + *(char*)buf1577 = rsGetElementAt_char(*(rs_allocation*)buf1578, *(uint32_t*)buf1579); + *(char2*)buf1580 = rsGetElementAt_char2(*(rs_allocation*)buf1581, *(uint32_t*)buf1582); + *(char3*)buf1583 = rsGetElementAt_char3(*(rs_allocation*)buf1584, *(uint32_t*)buf1585); + *(char4*)buf1586 = rsGetElementAt_char4(*(rs_allocation*)buf1587, *(uint32_t*)buf1588); + *(uchar*)buf1589 = rsGetElementAt_uchar(*(rs_allocation*)buf1590, *(uint32_t*)buf1591); + *(uchar2*)buf1592 = rsGetElementAt_uchar2(*(rs_allocation*)buf1593, *(uint32_t*)buf1594); + *(uchar3*)buf1595 = rsGetElementAt_uchar3(*(rs_allocation*)buf1596, *(uint32_t*)buf1597); + *(uchar4*)buf1598 = rsGetElementAt_uchar4(*(rs_allocation*)buf1599, *(uint32_t*)buf1600); + *(short*)buf1601 = rsGetElementAt_short(*(rs_allocation*)buf1602, *(uint32_t*)buf1603); + *(short2*)buf1604 = rsGetElementAt_short2(*(rs_allocation*)buf1605, *(uint32_t*)buf1606); + *(short3*)buf1607 = rsGetElementAt_short3(*(rs_allocation*)buf1608, *(uint32_t*)buf1609); + *(short4*)buf1610 = rsGetElementAt_short4(*(rs_allocation*)buf1611, *(uint32_t*)buf1612); + *(ushort*)buf1613 = rsGetElementAt_ushort(*(rs_allocation*)buf1614, *(uint32_t*)buf1615); + *(ushort2*)buf1616 = rsGetElementAt_ushort2(*(rs_allocation*)buf1617, *(uint32_t*)buf1618); + *(ushort3*)buf1619 = rsGetElementAt_ushort3(*(rs_allocation*)buf1620, *(uint32_t*)buf1621); + *(ushort4*)buf1622 = rsGetElementAt_ushort4(*(rs_allocation*)buf1623, *(uint32_t*)buf1624); + *(int*)buf1625 = rsGetElementAt_int(*(rs_allocation*)buf1626, *(uint32_t*)buf1627); + *(int2*)buf1628 = rsGetElementAt_int2(*(rs_allocation*)buf1629, *(uint32_t*)buf1630); + *(int3*)buf1631 = rsGetElementAt_int3(*(rs_allocation*)buf1632, *(uint32_t*)buf1633); + *(int4*)buf1634 = rsGetElementAt_int4(*(rs_allocation*)buf1635, *(uint32_t*)buf1636); + *(uint*)buf1637 = rsGetElementAt_uint(*(rs_allocation*)buf1638, *(uint32_t*)buf1639); + *(uint2*)buf1640 = rsGetElementAt_uint2(*(rs_allocation*)buf1641, *(uint32_t*)buf1642); + *(uint3*)buf1643 = rsGetElementAt_uint3(*(rs_allocation*)buf1644, *(uint32_t*)buf1645); + *(uint4*)buf1646 = rsGetElementAt_uint4(*(rs_allocation*)buf1647, *(uint32_t*)buf1648); + *(long*)buf1649 = rsGetElementAt_long(*(rs_allocation*)buf1650, *(uint32_t*)buf1651); + *(long2*)buf1652 = rsGetElementAt_long2(*(rs_allocation*)buf1653, *(uint32_t*)buf1654); + *(long3*)buf1655 = rsGetElementAt_long3(*(rs_allocation*)buf1656, *(uint32_t*)buf1657); + *(long4*)buf1658 = rsGetElementAt_long4(*(rs_allocation*)buf1659, *(uint32_t*)buf1660); + *(ulong*)buf1661 = rsGetElementAt_ulong(*(rs_allocation*)buf1662, *(uint32_t*)buf1663); + *(ulong2*)buf1664 = rsGetElementAt_ulong2(*(rs_allocation*)buf1665, *(uint32_t*)buf1666); + *(ulong3*)buf1667 = rsGetElementAt_ulong3(*(rs_allocation*)buf1668, *(uint32_t*)buf1669); + *(ulong4*)buf1670 = rsGetElementAt_ulong4(*(rs_allocation*)buf1671, *(uint32_t*)buf1672); + *(float*)buf1673 = rsGetElementAt_float(*(rs_allocation*)buf1674, *(uint32_t*)buf1675, *(uint32_t*)buf1676); + *(float2*)buf1677 = rsGetElementAt_float2(*(rs_allocation*)buf1678, *(uint32_t*)buf1679, *(uint32_t*)buf1680); + *(float3*)buf1681 = rsGetElementAt_float3(*(rs_allocation*)buf1682, *(uint32_t*)buf1683, *(uint32_t*)buf1684); + *(float4*)buf1685 = rsGetElementAt_float4(*(rs_allocation*)buf1686, *(uint32_t*)buf1687, *(uint32_t*)buf1688); + *(double*)buf1689 = rsGetElementAt_double(*(rs_allocation*)buf1690, *(uint32_t*)buf1691, *(uint32_t*)buf1692); + *(double2*)buf1693 = rsGetElementAt_double2(*(rs_allocation*)buf1694, *(uint32_t*)buf1695, *(uint32_t*)buf1696); + *(double3*)buf1697 = rsGetElementAt_double3(*(rs_allocation*)buf1698, *(uint32_t*)buf1699, *(uint32_t*)buf1700); + *(double4*)buf1701 = rsGetElementAt_double4(*(rs_allocation*)buf1702, *(uint32_t*)buf1703, *(uint32_t*)buf1704); + *(char*)buf1705 = rsGetElementAt_char(*(rs_allocation*)buf1706, *(uint32_t*)buf1707, *(uint32_t*)buf1708); + *(char2*)buf1709 = rsGetElementAt_char2(*(rs_allocation*)buf1710, *(uint32_t*)buf1711, *(uint32_t*)buf1712); + *(char3*)buf1713 = rsGetElementAt_char3(*(rs_allocation*)buf1714, *(uint32_t*)buf1715, *(uint32_t*)buf1716); + *(char4*)buf1717 = rsGetElementAt_char4(*(rs_allocation*)buf1718, *(uint32_t*)buf1719, *(uint32_t*)buf1720); + *(uchar*)buf1721 = rsGetElementAt_uchar(*(rs_allocation*)buf1722, *(uint32_t*)buf1723, *(uint32_t*)buf1724); + *(uchar2*)buf1725 = rsGetElementAt_uchar2(*(rs_allocation*)buf1726, *(uint32_t*)buf1727, *(uint32_t*)buf1728); + *(uchar3*)buf1729 = rsGetElementAt_uchar3(*(rs_allocation*)buf1730, *(uint32_t*)buf1731, *(uint32_t*)buf1732); + *(uchar4*)buf1733 = rsGetElementAt_uchar4(*(rs_allocation*)buf1734, *(uint32_t*)buf1735, *(uint32_t*)buf1736); + *(short*)buf1737 = rsGetElementAt_short(*(rs_allocation*)buf1738, *(uint32_t*)buf1739, *(uint32_t*)buf1740); + *(short2*)buf1741 = rsGetElementAt_short2(*(rs_allocation*)buf1742, *(uint32_t*)buf1743, *(uint32_t*)buf1744); + *(short3*)buf1745 = rsGetElementAt_short3(*(rs_allocation*)buf1746, *(uint32_t*)buf1747, *(uint32_t*)buf1748); + *(short4*)buf1749 = rsGetElementAt_short4(*(rs_allocation*)buf1750, *(uint32_t*)buf1751, *(uint32_t*)buf1752); + *(ushort*)buf1753 = rsGetElementAt_ushort(*(rs_allocation*)buf1754, *(uint32_t*)buf1755, *(uint32_t*)buf1756); + *(ushort2*)buf1757 = rsGetElementAt_ushort2(*(rs_allocation*)buf1758, *(uint32_t*)buf1759, *(uint32_t*)buf1760); + *(ushort3*)buf1761 = rsGetElementAt_ushort3(*(rs_allocation*)buf1762, *(uint32_t*)buf1763, *(uint32_t*)buf1764); + *(ushort4*)buf1765 = rsGetElementAt_ushort4(*(rs_allocation*)buf1766, *(uint32_t*)buf1767, *(uint32_t*)buf1768); + *(int*)buf1769 = rsGetElementAt_int(*(rs_allocation*)buf1770, *(uint32_t*)buf1771, *(uint32_t*)buf1772); + *(int2*)buf1773 = rsGetElementAt_int2(*(rs_allocation*)buf1774, *(uint32_t*)buf1775, *(uint32_t*)buf1776); + *(int3*)buf1777 = rsGetElementAt_int3(*(rs_allocation*)buf1778, *(uint32_t*)buf1779, *(uint32_t*)buf1780); + *(int4*)buf1781 = rsGetElementAt_int4(*(rs_allocation*)buf1782, *(uint32_t*)buf1783, *(uint32_t*)buf1784); + *(uint*)buf1785 = rsGetElementAt_uint(*(rs_allocation*)buf1786, *(uint32_t*)buf1787, *(uint32_t*)buf1788); + *(uint2*)buf1789 = rsGetElementAt_uint2(*(rs_allocation*)buf1790, *(uint32_t*)buf1791, *(uint32_t*)buf1792); + *(uint3*)buf1793 = rsGetElementAt_uint3(*(rs_allocation*)buf1794, *(uint32_t*)buf1795, *(uint32_t*)buf1796); + *(uint4*)buf1797 = rsGetElementAt_uint4(*(rs_allocation*)buf1798, *(uint32_t*)buf1799, *(uint32_t*)buf1800); + *(long*)buf1801 = rsGetElementAt_long(*(rs_allocation*)buf1802, *(uint32_t*)buf1803, *(uint32_t*)buf1804); + *(long2*)buf1805 = rsGetElementAt_long2(*(rs_allocation*)buf1806, *(uint32_t*)buf1807, *(uint32_t*)buf1808); + *(long3*)buf1809 = rsGetElementAt_long3(*(rs_allocation*)buf1810, *(uint32_t*)buf1811, *(uint32_t*)buf1812); + *(long4*)buf1813 = rsGetElementAt_long4(*(rs_allocation*)buf1814, *(uint32_t*)buf1815, *(uint32_t*)buf1816); + *(ulong*)buf1817 = rsGetElementAt_ulong(*(rs_allocation*)buf1818, *(uint32_t*)buf1819, *(uint32_t*)buf1820); + *(ulong2*)buf1821 = rsGetElementAt_ulong2(*(rs_allocation*)buf1822, *(uint32_t*)buf1823, *(uint32_t*)buf1824); + *(ulong3*)buf1825 = rsGetElementAt_ulong3(*(rs_allocation*)buf1826, *(uint32_t*)buf1827, *(uint32_t*)buf1828); + *(ulong4*)buf1829 = rsGetElementAt_ulong4(*(rs_allocation*)buf1830, *(uint32_t*)buf1831, *(uint32_t*)buf1832); + *(float*)buf1833 = rsGetElementAt_float(*(rs_allocation*)buf1834, *(uint32_t*)buf1835, *(uint32_t*)buf1836, *(uint32_t*)buf1837); + *(float2*)buf1838 = rsGetElementAt_float2(*(rs_allocation*)buf1839, *(uint32_t*)buf1840, *(uint32_t*)buf1841, *(uint32_t*)buf1842); + *(float3*)buf1843 = rsGetElementAt_float3(*(rs_allocation*)buf1844, *(uint32_t*)buf1845, *(uint32_t*)buf1846, *(uint32_t*)buf1847); + *(float4*)buf1848 = rsGetElementAt_float4(*(rs_allocation*)buf1849, *(uint32_t*)buf1850, *(uint32_t*)buf1851, *(uint32_t*)buf1852); + *(double*)buf1853 = rsGetElementAt_double(*(rs_allocation*)buf1854, *(uint32_t*)buf1855, *(uint32_t*)buf1856, *(uint32_t*)buf1857); + *(double2*)buf1858 = rsGetElementAt_double2(*(rs_allocation*)buf1859, *(uint32_t*)buf1860, *(uint32_t*)buf1861, *(uint32_t*)buf1862); + *(double3*)buf1863 = rsGetElementAt_double3(*(rs_allocation*)buf1864, *(uint32_t*)buf1865, *(uint32_t*)buf1866, *(uint32_t*)buf1867); + *(double4*)buf1868 = rsGetElementAt_double4(*(rs_allocation*)buf1869, *(uint32_t*)buf1870, *(uint32_t*)buf1871, *(uint32_t*)buf1872); + *(char*)buf1873 = rsGetElementAt_char(*(rs_allocation*)buf1874, *(uint32_t*)buf1875, *(uint32_t*)buf1876, *(uint32_t*)buf1877); + *(char2*)buf1878 = rsGetElementAt_char2(*(rs_allocation*)buf1879, *(uint32_t*)buf1880, *(uint32_t*)buf1881, *(uint32_t*)buf1882); + *(char3*)buf1883 = rsGetElementAt_char3(*(rs_allocation*)buf1884, *(uint32_t*)buf1885, *(uint32_t*)buf1886, *(uint32_t*)buf1887); + *(char4*)buf1888 = rsGetElementAt_char4(*(rs_allocation*)buf1889, *(uint32_t*)buf1890, *(uint32_t*)buf1891, *(uint32_t*)buf1892); + *(uchar*)buf1893 = rsGetElementAt_uchar(*(rs_allocation*)buf1894, *(uint32_t*)buf1895, *(uint32_t*)buf1896, *(uint32_t*)buf1897); + *(uchar2*)buf1898 = rsGetElementAt_uchar2(*(rs_allocation*)buf1899, *(uint32_t*)buf1900, *(uint32_t*)buf1901, *(uint32_t*)buf1902); + *(uchar3*)buf1903 = rsGetElementAt_uchar3(*(rs_allocation*)buf1904, *(uint32_t*)buf1905, *(uint32_t*)buf1906, *(uint32_t*)buf1907); + *(uchar4*)buf1908 = rsGetElementAt_uchar4(*(rs_allocation*)buf1909, *(uint32_t*)buf1910, *(uint32_t*)buf1911, *(uint32_t*)buf1912); + *(short*)buf1913 = rsGetElementAt_short(*(rs_allocation*)buf1914, *(uint32_t*)buf1915, *(uint32_t*)buf1916, *(uint32_t*)buf1917); + *(short2*)buf1918 = rsGetElementAt_short2(*(rs_allocation*)buf1919, *(uint32_t*)buf1920, *(uint32_t*)buf1921, *(uint32_t*)buf1922); + *(short3*)buf1923 = rsGetElementAt_short3(*(rs_allocation*)buf1924, *(uint32_t*)buf1925, *(uint32_t*)buf1926, *(uint32_t*)buf1927); + *(short4*)buf1928 = rsGetElementAt_short4(*(rs_allocation*)buf1929, *(uint32_t*)buf1930, *(uint32_t*)buf1931, *(uint32_t*)buf1932); + *(ushort*)buf1933 = rsGetElementAt_ushort(*(rs_allocation*)buf1934, *(uint32_t*)buf1935, *(uint32_t*)buf1936, *(uint32_t*)buf1937); + *(ushort2*)buf1938 = rsGetElementAt_ushort2(*(rs_allocation*)buf1939, *(uint32_t*)buf1940, *(uint32_t*)buf1941, *(uint32_t*)buf1942); + *(ushort3*)buf1943 = rsGetElementAt_ushort3(*(rs_allocation*)buf1944, *(uint32_t*)buf1945, *(uint32_t*)buf1946, *(uint32_t*)buf1947); + *(ushort4*)buf1948 = rsGetElementAt_ushort4(*(rs_allocation*)buf1949, *(uint32_t*)buf1950, *(uint32_t*)buf1951, *(uint32_t*)buf1952); + *(int*)buf1953 = rsGetElementAt_int(*(rs_allocation*)buf1954, *(uint32_t*)buf1955, *(uint32_t*)buf1956, *(uint32_t*)buf1957); + *(int2*)buf1958 = rsGetElementAt_int2(*(rs_allocation*)buf1959, *(uint32_t*)buf1960, *(uint32_t*)buf1961, *(uint32_t*)buf1962); + *(int3*)buf1963 = rsGetElementAt_int3(*(rs_allocation*)buf1964, *(uint32_t*)buf1965, *(uint32_t*)buf1966, *(uint32_t*)buf1967); + *(int4*)buf1968 = rsGetElementAt_int4(*(rs_allocation*)buf1969, *(uint32_t*)buf1970, *(uint32_t*)buf1971, *(uint32_t*)buf1972); + *(uint*)buf1973 = rsGetElementAt_uint(*(rs_allocation*)buf1974, *(uint32_t*)buf1975, *(uint32_t*)buf1976, *(uint32_t*)buf1977); + *(uint2*)buf1978 = rsGetElementAt_uint2(*(rs_allocation*)buf1979, *(uint32_t*)buf1980, *(uint32_t*)buf1981, *(uint32_t*)buf1982); + *(uint3*)buf1983 = rsGetElementAt_uint3(*(rs_allocation*)buf1984, *(uint32_t*)buf1985, *(uint32_t*)buf1986, *(uint32_t*)buf1987); + *(uint4*)buf1988 = rsGetElementAt_uint4(*(rs_allocation*)buf1989, *(uint32_t*)buf1990, *(uint32_t*)buf1991, *(uint32_t*)buf1992); + *(long*)buf1993 = rsGetElementAt_long(*(rs_allocation*)buf1994, *(uint32_t*)buf1995, *(uint32_t*)buf1996, *(uint32_t*)buf1997); + *(long2*)buf1998 = rsGetElementAt_long2(*(rs_allocation*)buf1999, *(uint32_t*)buf2000, *(uint32_t*)buf2001, *(uint32_t*)buf2002); + *(long3*)buf2003 = rsGetElementAt_long3(*(rs_allocation*)buf2004, *(uint32_t*)buf2005, *(uint32_t*)buf2006, *(uint32_t*)buf2007); + *(long4*)buf2008 = rsGetElementAt_long4(*(rs_allocation*)buf2009, *(uint32_t*)buf2010, *(uint32_t*)buf2011, *(uint32_t*)buf2012); + *(ulong*)buf2013 = rsGetElementAt_ulong(*(rs_allocation*)buf2014, *(uint32_t*)buf2015, *(uint32_t*)buf2016, *(uint32_t*)buf2017); + *(ulong2*)buf2018 = rsGetElementAt_ulong2(*(rs_allocation*)buf2019, *(uint32_t*)buf2020, *(uint32_t*)buf2021, *(uint32_t*)buf2022); + *(ulong3*)buf2023 = rsGetElementAt_ulong3(*(rs_allocation*)buf2024, *(uint32_t*)buf2025, *(uint32_t*)buf2026, *(uint32_t*)buf2027); + *(ulong4*)buf2028 = rsGetElementAt_ulong4(*(rs_allocation*)buf2029, *(uint32_t*)buf2030, *(uint32_t*)buf2031, *(uint32_t*)buf2032); + *(bool*)buf2033 = rsIsObject(*(rs_element*)buf2034); + *(bool*)buf2035 = rsIsObject(*(rs_type*)buf2036); + *(bool*)buf2037 = rsIsObject(*(rs_allocation*)buf2038); + *(bool*)buf2039 = rsIsObject(*(rs_sampler*)buf2040); + *(bool*)buf2041 = rsIsObject(*(rs_script*)buf2042); +#ifndef __LP64__ + *(bool*)buf2043 = rsIsObject(*(rs_mesh*)buf2044); + *(bool*)buf2045 = rsIsObject(*(rs_program_fragment*)buf2046); + *(bool*)buf2047 = rsIsObject(*(rs_program_vertex*)buf2048); + *(bool*)buf2049 = rsIsObject(*(rs_program_raster*)buf2050); + *(bool*)buf2051 = rsIsObject(*(rs_program_store*)buf2052); + *(bool*)buf2053 = rsIsObject(*(rs_font*)buf2054); +#endif + *(bool*)buf2055 = rsIsSphereInFrustum((float4*) buf2056, (float4*) buf2057, (float4*) buf2058, (float4*) buf2059, (float4*) buf2060, (float4*) buf2061, (float4*) buf2062); + *(rs_tm**)buf2063 = rsLocaltime((rs_tm*) buf2064, (const rs_time_t*) buf2065); + *(float*)buf2066 = rsMatrixGet((const rs_matrix4x4*) buf2067, *(uint32_t*)buf2068, *(uint32_t*)buf2069); + *(float*)buf2070 = rsMatrixGet((const rs_matrix3x3*) buf2071, *(uint32_t*)buf2072, *(uint32_t*)buf2073); + *(float*)buf2074 = rsMatrixGet((const rs_matrix2x2*) buf2075, *(uint32_t*)buf2076, *(uint32_t*)buf2077); + *(bool*)buf2078 = rsMatrixInverse((rs_matrix4x4*) buf2079); + *(bool*)buf2080 = rsMatrixInverseTranspose((rs_matrix4x4*) buf2081); + rsMatrixLoad((rs_matrix4x4*) buf2082, (const float*) buf2083); + rsMatrixLoad((rs_matrix3x3*) buf2084, (const float*) buf2085); + rsMatrixLoad((rs_matrix2x2*) buf2086, (const float*) buf2087); + rsMatrixLoad((rs_matrix4x4*) buf2088, (const rs_matrix4x4*) buf2089); + rsMatrixLoad((rs_matrix3x3*) buf2090, (const rs_matrix3x3*) buf2091); + rsMatrixLoad((rs_matrix2x2*) buf2092, (const rs_matrix2x2*) buf2093); + rsMatrixLoad((rs_matrix4x4*) buf2094, (const rs_matrix3x3*) buf2095); + rsMatrixLoad((rs_matrix4x4*) buf2096, (const rs_matrix2x2*) buf2097); + rsMatrixLoadFrustum((rs_matrix4x4*) buf2098, *(float*)buf2099, *(float*)buf2100, *(float*)buf2101, *(float*)buf2102, *(float*)buf2103, *(float*)buf2104); + rsMatrixLoadIdentity((rs_matrix4x4*) buf2105); + rsMatrixLoadIdentity((rs_matrix3x3*) buf2106); + rsMatrixLoadIdentity((rs_matrix2x2*) buf2107); + rsMatrixLoadMultiply((rs_matrix4x4*) buf2108, (const rs_matrix4x4*) buf2109, (const rs_matrix4x4*) buf2110); + rsMatrixLoadMultiply((rs_matrix3x3*) buf2111, (const rs_matrix3x3*) buf2112, (const rs_matrix3x3*) buf2113); + rsMatrixLoadMultiply((rs_matrix2x2*) buf2114, (const rs_matrix2x2*) buf2115, (const rs_matrix2x2*) buf2116); + rsMatrixLoadOrtho((rs_matrix4x4*) buf2117, *(float*)buf2118, *(float*)buf2119, *(float*)buf2120, *(float*)buf2121, *(float*)buf2122, *(float*)buf2123); + rsMatrixLoadPerspective((rs_matrix4x4*) buf2124, *(float*)buf2125, *(float*)buf2126, *(float*)buf2127, *(float*)buf2128); + rsMatrixLoadRotate((rs_matrix4x4*) buf2129, *(float*)buf2130, *(float*)buf2131, *(float*)buf2132, *(float*)buf2133); + rsMatrixLoadScale((rs_matrix4x4*) buf2134, *(float*)buf2135, *(float*)buf2136, *(float*)buf2137); + rsMatrixLoadTranslate((rs_matrix4x4*) buf2138, *(float*)buf2139, *(float*)buf2140, *(float*)buf2141); + rsMatrixMultiply((rs_matrix4x4*) buf2142, (const rs_matrix4x4*) buf2143); + rsMatrixMultiply((rs_matrix3x3*) buf2144, (const rs_matrix3x3*) buf2145); + rsMatrixMultiply((rs_matrix2x2*) buf2146, (const rs_matrix2x2*) buf2147); + *(float4*)buf2148 = rsMatrixMultiply((const rs_matrix4x4*) buf2149, *(float4*)buf2150); + *(float4*)buf2151 = rsMatrixMultiply((const rs_matrix4x4*) buf2152, *(float3*)buf2153); + *(float4*)buf2154 = rsMatrixMultiply((const rs_matrix4x4*) buf2155, *(float2*)buf2156); + *(float3*)buf2157 = rsMatrixMultiply((const rs_matrix3x3*) buf2158, *(float3*)buf2159); + *(float3*)buf2160 = rsMatrixMultiply((const rs_matrix3x3*) buf2161, *(float2*)buf2162); + *(float2*)buf2163 = rsMatrixMultiply((const rs_matrix2x2*) buf2164, *(float2*)buf2165); + rsMatrixRotate((rs_matrix4x4*) buf2166, *(float*)buf2167, *(float*)buf2168, *(float*)buf2169, *(float*)buf2170); + rsMatrixScale((rs_matrix4x4*) buf2171, *(float*)buf2172, *(float*)buf2173, *(float*)buf2174); + rsMatrixSet((rs_matrix4x4*) buf2175, *(uint32_t*)buf2176, *(uint32_t*)buf2177, *(float*)buf2178); + rsMatrixSet((rs_matrix3x3*) buf2179, *(uint32_t*)buf2180, *(uint32_t*)buf2181, *(float*)buf2182); + rsMatrixSet((rs_matrix2x2*) buf2183, *(uint32_t*)buf2184, *(uint32_t*)buf2185, *(float*)buf2186); + rsMatrixTranslate((rs_matrix4x4*) buf2187, *(float*)buf2188, *(float*)buf2189, *(float*)buf2190); + rsMatrixTranspose((rs_matrix4x4*) buf2191); + rsMatrixTranspose((rs_matrix3x3*) buf2192); + rsMatrixTranspose((rs_matrix2x2*) buf2193); + *(uchar4*)buf2194 = rsPackColorTo8888(*(float*)buf2195, *(float*)buf2196, *(float*)buf2197); + *(uchar4*)buf2198 = rsPackColorTo8888(*(float*)buf2199, *(float*)buf2200, *(float*)buf2201, *(float*)buf2202); + *(uchar4*)buf2203 = rsPackColorTo8888(*(float3*)buf2204); + *(uchar4*)buf2205 = rsPackColorTo8888(*(float4*)buf2206); + rsQuaternionAdd((rs_quaternion*) buf2207, (const rs_quaternion*) buf2208); + rsQuaternionConjugate((rs_quaternion*) buf2209); + *(float*)buf2210 = rsQuaternionDot((const rs_quaternion*) buf2211, (const rs_quaternion*) buf2212); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2213, (const rs_quaternion*) buf2214); + rsQuaternionLoadRotate((rs_quaternion*) buf2215, *(float*)buf2216, *(float*)buf2217, *(float*)buf2218, *(float*)buf2219); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2220, *(float*)buf2221, *(float*)buf2222, *(float*)buf2223, *(float*)buf2224); + rsQuaternionMultiply((rs_quaternion*) buf2225, *(float*)buf2226); + rsQuaternionMultiply((rs_quaternion*) buf2227, (const rs_quaternion*) buf2228); + rsQuaternionNormalize((rs_quaternion*) buf2229); + rsQuaternionSet((rs_quaternion*) buf2230, *(float*)buf2231, *(float*)buf2232, *(float*)buf2233, *(float*)buf2234); + rsQuaternionSet((rs_quaternion*) buf2235, (const rs_quaternion*) buf2236); + rsQuaternionSlerp((rs_quaternion*) buf2237, (const rs_quaternion*) buf2238, (const rs_quaternion*) buf2239, *(float*)buf2240); + *(int*)buf2241 = rsRand(*(int*)buf2242); + *(int*)buf2243 = rsRand(*(int*)buf2244, *(int*)buf2245); + *(float*)buf2246 = rsRand(*(float*)buf2247); + *(float*)buf2248 = rsRand(*(float*)buf2249, *(float*)buf2250); + *(float4*)buf2251 = rsSample(*(rs_allocation*)buf2252, *(rs_sampler*)buf2253, *(float*)buf2254); + *(float4*)buf2255 = rsSample(*(rs_allocation*)buf2256, *(rs_sampler*)buf2257, *(float*)buf2258, *(float*)buf2259); + *(float4*)buf2260 = rsSample(*(rs_allocation*)buf2261, *(rs_sampler*)buf2262, *(float2*)buf2263); + *(float4*)buf2264 = rsSample(*(rs_allocation*)buf2265, *(rs_sampler*)buf2266, *(float2*)buf2267, *(float*)buf2268); + *(float*)buf2269 = rsSamplerGetAnisotropy(*(rs_sampler*)buf2270); + *(rs_sampler_value*)buf2271 = rsSamplerGetMagnification(*(rs_sampler*)buf2272); + *(rs_sampler_value*)buf2273 = rsSamplerGetMinification(*(rs_sampler*)buf2274); + *(rs_sampler_value*)buf2275 = rsSamplerGetWrapS(*(rs_sampler*)buf2276); + *(rs_sampler_value*)buf2277 = rsSamplerGetWrapT(*(rs_sampler*)buf2278); + *(bool*)buf2279 = rsSendToClient(*(int*)buf2280); + *(bool*)buf2281 = rsSendToClient(*(int*)buf2282, (const void*) buf2283, *(uint*)buf2284); + rsSendToClientBlocking(*(int*)buf2285); + rsSendToClientBlocking(*(int*)buf2286, (const void*) buf2287, *(uint*)buf2288); + rsSetObject((rs_element*) buf2289, *(rs_element*)buf2290); + rsSetObject((rs_type*) buf2291, *(rs_type*)buf2292); + rsSetObject((rs_allocation*) buf2293, *(rs_allocation*)buf2294); + rsSetObject((rs_sampler*) buf2295, *(rs_sampler*)buf2296); + rsSetObject((rs_script*) buf2297, *(rs_script*)buf2298); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2299, *(rs_mesh*)buf2300); + rsSetObject((rs_program_fragment*) buf2301, *(rs_program_fragment*)buf2302); + rsSetObject((rs_program_vertex*) buf2303, *(rs_program_vertex*)buf2304); + rsSetObject((rs_program_raster*) buf2305, *(rs_program_raster*)buf2306); + rsSetObject((rs_program_store*) buf2307, *(rs_program_store*)buf2308); + rsSetObject((rs_font*) buf2309, *(rs_font*)buf2310); +#endif + *(rs_time_t*)buf2311 = rsTime((rs_time_t*) buf2312); + *(float4*)buf2313 = rsUnpackColor8888(*(uchar4*)buf2314); + *(int64_t*)buf2315 = rsUptimeMillis(); + *(int64_t*)buf2316 = rsUptimeNanos(); + *(float4*)buf2317 = rsYuvToRGBA_float4(*(uchar*)buf2318, *(uchar*)buf2319, *(uchar*)buf2320); + *(uchar4*)buf2321 = rsYuvToRGBA_uchar4(*(uchar*)buf2322, *(uchar*)buf2323, *(uchar*)buf2324); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2325); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2326, *(rs_allocation_usage_type*)buf2327); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf2328, *(uint*)buf2329); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2330, *(uint*)buf2331, *(rs_allocation*)buf2332); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2333, *(uint*)buf2334, *(rs_allocation*)buf2335); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf2336); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2337); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2338); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2339); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2340); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2341); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2342, *(uint*)buf2343, *(rs_sampler*)buf2344); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2345, *(uint*)buf2346, *(rs_allocation*)buf2347); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2348, *(float*)buf2349, *(float*)buf2350, *(float*)buf2351); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf2352); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2353); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2354); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2355, *(uint*)buf2356); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2357, *(uint*)buf2358, *(uint*)buf2359, *(uint*)buf2360); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2361, *(float*)buf2362, *(float*)buf2363, *(float*)buf2364, *(float*)buf2365, *(float*)buf2366, *(float*)buf2367, *(float*)buf2368, *(float*)buf2369, *(float*)buf2370, *(float*)buf2371, *(float*)buf2372); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2373, *(float*)buf2374, *(float*)buf2375, *(float*)buf2376, *(float*)buf2377, *(float*)buf2378, *(float*)buf2379, *(float*)buf2380, *(float*)buf2381, *(float*)buf2382, *(float*)buf2383, *(float*)buf2384, *(float*)buf2385, *(float*)buf2386, *(float*)buf2387, *(float*)buf2388, *(float*)buf2389, *(float*)buf2390, *(float*)buf2391, *(float*)buf2392); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2393, *(float*)buf2394, *(float*)buf2395, *(float*)buf2396, *(float*)buf2397); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2398, *(float*)buf2399, *(float*)buf2400, *(float*)buf2401, *(float*)buf2402); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2403, *(int*)buf2404, *(int*)buf2405); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2406, *(int*)buf2407, *(int*)buf2408); +#endif +#ifndef __LP64__ + *(uint*)buf2409 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2410, *(float*)buf2411, *(float*)buf2412, *(float*)buf2413); +#endif +#ifndef __LP64__ + *(uint*)buf2414 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2415 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2416, (int*) buf2417, (int*) buf2418, (int*) buf2419, (int*) buf2420); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2421, (int*) buf2422, (int*) buf2423, (int*) buf2424, (int*) buf2425); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2426, (float*) buf2427, (float*) buf2428, (float*) buf2429, (float*) buf2430, (float*) buf2431, (float*) buf2432); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2433, (float3*) buf2434, (float3*) buf2435); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf2436 = rsgMeshGetIndexAllocation(*(rs_mesh*)buf2437, *(uint32_t*)buf2438); +#endif +#ifndef __LP64__ + *(rs_primitive*)buf2439 = rsgMeshGetPrimitive(*(rs_mesh*)buf2440, *(uint32_t*)buf2441); +#endif +#ifndef __LP64__ + *(uint32_t*)buf2442 = rsgMeshGetPrimitiveCount(*(rs_mesh*)buf2443); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf2444 = rsgMeshGetVertexAllocation(*(rs_mesh*)buf2445, *(uint32_t*)buf2446); +#endif +#ifndef __LP64__ + *(uint32_t*)buf2447 = rsgMeshGetVertexAllocationCount(*(rs_mesh*)buf2448); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf2449, *(float*)buf2450, *(float*)buf2451, *(float*)buf2452, *(float*)buf2453); +#endif +#ifndef __LP64__ + *(rs_cull_mode*)buf2454 = rsgProgramRasterGetCullMode(*(rs_program_raster*)buf2455); +#endif +#ifndef __LP64__ + *(bool*)buf2456 = rsgProgramRasterIsPointSpriteEnabled(*(rs_program_raster*)buf2457); +#endif +#ifndef __LP64__ + *(rs_blend_dst_func*)buf2458 = rsgProgramStoreGetBlendDstFunc(*(rs_program_store*)buf2459); +#endif +#ifndef __LP64__ + *(rs_blend_src_func*)buf2460 = rsgProgramStoreGetBlendSrcFunc(*(rs_program_store*)buf2461); +#endif +#ifndef __LP64__ + *(rs_depth_func*)buf2462 = rsgProgramStoreGetDepthFunc(*(rs_program_store*)buf2463); +#endif +#ifndef __LP64__ + *(bool*)buf2464 = rsgProgramStoreIsColorMaskAlphaEnabled(*(rs_program_store*)buf2465); +#endif +#ifndef __LP64__ + *(bool*)buf2466 = rsgProgramStoreIsColorMaskBlueEnabled(*(rs_program_store*)buf2467); +#endif +#ifndef __LP64__ + *(bool*)buf2468 = rsgProgramStoreIsColorMaskGreenEnabled(*(rs_program_store*)buf2469); +#endif +#ifndef __LP64__ + *(bool*)buf2470 = rsgProgramStoreIsColorMaskRedEnabled(*(rs_program_store*)buf2471); +#endif +#ifndef __LP64__ + *(bool*)buf2472 = rsgProgramStoreIsDepthMaskEnabled(*(rs_program_store*)buf2473); +#endif +#ifndef __LP64__ + *(bool*)buf2474 = rsgProgramStoreIsDitherEnabled(*(rs_program_store*)buf2475); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf2476); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf2477); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf2478); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf2479); +#endif + *(float*)buf2480 = rsqrt(*(float*)buf2481); + *(float2*)buf2482 = rsqrt(*(float2*)buf2483); + *(float3*)buf2484 = rsqrt(*(float3*)buf2485); + *(float4*)buf2486 = rsqrt(*(float4*)buf2487); + *(float*)buf2488 = sign(*(float*)buf2489); + *(float2*)buf2490 = sign(*(float2*)buf2491); + *(float3*)buf2492 = sign(*(float3*)buf2493); + *(float4*)buf2494 = sign(*(float4*)buf2495); + *(float*)buf2496 = sin(*(float*)buf2497); + *(float2*)buf2498 = sin(*(float2*)buf2499); + *(float3*)buf2500 = sin(*(float3*)buf2501); + *(float4*)buf2502 = sin(*(float4*)buf2503); + *(float*)buf2504 = sincos(*(float*)buf2505, (float*) buf2506); + *(float2*)buf2507 = sincos(*(float2*)buf2508, (float2*) buf2509); + *(float3*)buf2510 = sincos(*(float3*)buf2511, (float3*) buf2512); + *(float4*)buf2513 = sincos(*(float4*)buf2514, (float4*) buf2515); + *(float*)buf2516 = sinh(*(float*)buf2517); + *(float2*)buf2518 = sinh(*(float2*)buf2519); + *(float3*)buf2520 = sinh(*(float3*)buf2521); + *(float4*)buf2522 = sinh(*(float4*)buf2523); + *(float*)buf2524 = sinpi(*(float*)buf2525); + *(float2*)buf2526 = sinpi(*(float2*)buf2527); + *(float3*)buf2528 = sinpi(*(float3*)buf2529); + *(float4*)buf2530 = sinpi(*(float4*)buf2531); + *(float*)buf2532 = sqrt(*(float*)buf2533); + *(float2*)buf2534 = sqrt(*(float2*)buf2535); + *(float3*)buf2536 = sqrt(*(float3*)buf2537); + *(float4*)buf2538 = sqrt(*(float4*)buf2539); + *(float*)buf2540 = step(*(float*)buf2541, *(float*)buf2542); + *(float2*)buf2543 = step(*(float2*)buf2544, *(float2*)buf2545); + *(float3*)buf2546 = step(*(float3*)buf2547, *(float3*)buf2548); + *(float4*)buf2549 = step(*(float4*)buf2550, *(float4*)buf2551); + *(float2*)buf2552 = step(*(float2*)buf2553, *(float*)buf2554); + *(float3*)buf2555 = step(*(float3*)buf2556, *(float*)buf2557); + *(float4*)buf2558 = step(*(float4*)buf2559, *(float*)buf2560); + *(float*)buf2561 = tan(*(float*)buf2562); + *(float2*)buf2563 = tan(*(float2*)buf2564); + *(float3*)buf2565 = tan(*(float3*)buf2566); + *(float4*)buf2567 = tan(*(float4*)buf2568); + *(float*)buf2569 = tanh(*(float*)buf2570); + *(float2*)buf2571 = tanh(*(float2*)buf2572); + *(float3*)buf2573 = tanh(*(float3*)buf2574); + *(float4*)buf2575 = tanh(*(float4*)buf2576); + *(float*)buf2577 = tanpi(*(float*)buf2578); + *(float2*)buf2579 = tanpi(*(float2*)buf2580); + *(float3*)buf2581 = tanpi(*(float3*)buf2582); + *(float4*)buf2583 = tanpi(*(float4*)buf2584); + *(float*)buf2585 = tgamma(*(float*)buf2586); + *(float2*)buf2587 = tgamma(*(float2*)buf2588); + *(float3*)buf2589 = tgamma(*(float3*)buf2590); + *(float4*)buf2591 = tgamma(*(float4*)buf2592); + *(float*)buf2593 = trunc(*(float*)buf2594); + *(float2*)buf2595 = trunc(*(float2*)buf2596); + *(float3*)buf2597 = trunc(*(float3*)buf2598); + *(float4*)buf2599 = trunc(*(float4*)buf2600); +}
diff --git a/slang/tests/P_all_api_17/stderr.txt.expect b/slang/tests/P_all_api_17/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_17/stderr.txt.expect
diff --git a/slang/tests/P_all_api_17/stdout.txt.expect b/slang/tests/P_all_api_17/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_17/stdout.txt.expect
diff --git a/slang/tests/P_all_api_18/all18.rs b/slang/tests/P_all_api_18/all18.rs new file mode 100644 index 0000000..d07107e --- /dev/null +++ b/slang/tests/P_all_api_18/all18.rs
@@ -0,0 +1,4436 @@ +// -target-api 18 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; +char buf2493[200]; +char buf2494[200]; +char buf2495[200]; +char buf2496[200]; +char buf2497[200]; +char buf2498[200]; +char buf2499[200]; +char buf2500[200]; +char buf2501[200]; +char buf2502[200]; +char buf2503[200]; +char buf2504[200]; +char buf2505[200]; +char buf2506[200]; +char buf2507[200]; +char buf2508[200]; +char buf2509[200]; +char buf2510[200]; +char buf2511[200]; +char buf2512[200]; +char buf2513[200]; +char buf2514[200]; +char buf2515[200]; +char buf2516[200]; +char buf2517[200]; +char buf2518[200]; +char buf2519[200]; +char buf2520[200]; +char buf2521[200]; +char buf2522[200]; +char buf2523[200]; +char buf2524[200]; +char buf2525[200]; +char buf2526[200]; +char buf2527[200]; +char buf2528[200]; +char buf2529[200]; +char buf2530[200]; +char buf2531[200]; +char buf2532[200]; +char buf2533[200]; +char buf2534[200]; +char buf2535[200]; +char buf2536[200]; +char buf2537[200]; +char buf2538[200]; +char buf2539[200]; +char buf2540[200]; +char buf2541[200]; +char buf2542[200]; +char buf2543[200]; +char buf2544[200]; +char buf2545[200]; +char buf2546[200]; +char buf2547[200]; +char buf2548[200]; +char buf2549[200]; +char buf2550[200]; +char buf2551[200]; +char buf2552[200]; +char buf2553[200]; +char buf2554[200]; +char buf2555[200]; +char buf2556[200]; +char buf2557[200]; +char buf2558[200]; +char buf2559[200]; +char buf2560[200]; +char buf2561[200]; +char buf2562[200]; +char buf2563[200]; +char buf2564[200]; +char buf2565[200]; +char buf2566[200]; +char buf2567[200]; +char buf2568[200]; +char buf2569[200]; +char buf2570[200]; +char buf2571[200]; +char buf2572[200]; +char buf2573[200]; +char buf2574[200]; +char buf2575[200]; +char buf2576[200]; +char buf2577[200]; +char buf2578[200]; +char buf2579[200]; +char buf2580[200]; +char buf2581[200]; +char buf2582[200]; +char buf2583[200]; +char buf2584[200]; +char buf2585[200]; +char buf2586[200]; +char buf2587[200]; +char buf2588[200]; +char buf2589[200]; +char buf2590[200]; +char buf2591[200]; +char buf2592[200]; +char buf2593[200]; +char buf2594[200]; +char buf2595[200]; +char buf2596[200]; +char buf2597[200]; +char buf2598[200]; +char buf2599[200]; +char buf2600[200]; +char buf2601[200]; +char buf2602[200]; +char buf2603[200]; +char buf2604[200]; +char buf2605[200]; +char buf2606[200]; +char buf2607[200]; +char buf2608[200]; +char buf2609[200]; +char buf2610[200]; +char buf2611[200]; +char buf2612[200]; +char buf2613[200]; +char buf2614[200]; +char buf2615[200]; +char buf2616[200]; +char buf2617[200]; +char buf2618[200]; +char buf2619[200]; +char buf2620[200]; +char buf2621[200]; +char buf2622[200]; +char buf2623[200]; +char buf2624[200]; +char buf2625[200]; +char buf2626[200]; +char buf2627[200]; +char buf2628[200]; +char buf2629[200]; +char buf2630[200]; +char buf2631[200]; +char buf2632[200]; +char buf2633[200]; +char buf2634[200]; +char buf2635[200]; +char buf2636[200]; +char buf2637[200]; +char buf2638[200]; +char buf2639[200]; +char buf2640[200]; +char buf2641[200]; +char buf2642[200]; +char buf2643[200]; +char buf2644[200]; +char buf2645[200]; +char buf2646[200]; +char buf2647[200]; +char buf2648[200]; +char buf2649[200]; +char buf2650[200]; +char buf2651[200]; +char buf2652[200]; +char buf2653[200]; +char buf2654[200]; +char buf2655[200]; +char buf2656[200]; +char buf2657[200]; +char buf2658[200]; +char buf2659[200]; +char buf2660[200]; +char buf2661[200]; +char buf2662[200]; +char buf2663[200]; +char buf2664[200]; +char buf2665[200]; +char buf2666[200]; +char buf2667[200]; +char buf2668[200]; +char buf2669[200]; +char buf2670[200]; +char buf2671[200]; +char buf2672[200]; +char buf2673[200]; +char buf2674[200]; +char buf2675[200]; +char buf2676[200]; +char buf2677[200]; +char buf2678[200]; +char buf2679[200]; +char buf2680[200]; +char buf2681[200]; +char buf2682[200]; +char buf2683[200]; +char buf2684[200]; +char buf2685[200]; +char buf2686[200]; +char buf2687[200]; +char buf2688[200]; +char buf2689[200]; +char buf2690[200]; +char buf2691[200]; +char buf2692[200]; +char buf2693[200]; +char buf2694[200]; +char buf2695[200]; +char buf2696[200]; +char buf2697[200]; +char buf2698[200]; +char buf2699[200]; +char buf2700[200]; +char buf2701[200]; +char buf2702[200]; +char buf2703[200]; +char buf2704[200]; +char buf2705[200]; +char buf2706[200]; +char buf2707[200]; +char buf2708[200]; +char buf2709[200]; +char buf2710[200]; +char buf2711[200]; +char buf2712[200]; +char buf2713[200]; +char buf2714[200]; +char buf2715[200]; +char buf2716[200]; +char buf2717[200]; +char buf2718[200]; +char buf2719[200]; +char buf2720[200]; +char buf2721[200]; +char buf2722[200]; +char buf2723[200]; +char buf2724[200]; +char buf2725[200]; +char buf2726[200]; +char buf2727[200]; +char buf2728[200]; +char buf2729[200]; +char buf2730[200]; +char buf2731[200]; +char buf2732[200]; +char buf2733[200]; +char buf2734[200]; +char buf2735[200]; +char buf2736[200]; +char buf2737[200]; +char buf2738[200]; +char buf2739[200]; +char buf2740[200]; +char buf2741[200]; +char buf2742[200]; +char buf2743[200]; +char buf2744[200]; +char buf2745[200]; +char buf2746[200]; +char buf2747[200]; +char buf2748[200]; +char buf2749[200]; +char buf2750[200]; +char buf2751[200]; +char buf2752[200]; +char buf2753[200]; +char buf2754[200]; +char buf2755[200]; +char buf2756[200]; +char buf2757[200]; +char buf2758[200]; +char buf2759[200]; +char buf2760[200]; +char buf2761[200]; +char buf2762[200]; +char buf2763[200]; +char buf2764[200]; +char buf2765[200]; +char buf2766[200]; +char buf2767[200]; +char buf2768[200]; +char buf2769[200]; +char buf2770[200]; +char buf2771[200]; +char buf2772[200]; +char buf2773[200]; +char buf2774[200]; +char buf2775[200]; +char buf2776[200]; +char buf2777[200]; +char buf2778[200]; +char buf2779[200]; +char buf2780[200]; +char buf2781[200]; +char buf2782[200]; +char buf2783[200]; +char buf2784[200]; +char buf2785[200]; +char buf2786[200]; +char buf2787[200]; +char buf2788[200]; +char buf2789[200]; +char buf2790[200]; +char buf2791[200]; +char buf2792[200]; +char buf2793[200]; +char buf2794[200]; +char buf2795[200]; +char buf2796[200]; +char buf2797[200]; +char buf2798[200]; +char buf2799[200]; +char buf2800[200]; +char buf2801[200]; +char buf2802[200]; +char buf2803[200]; +char buf2804[200]; +char buf2805[200]; +char buf2806[200]; +char buf2807[200]; +char buf2808[200]; +char buf2809[200]; +char buf2810[200]; +char buf2811[200]; +char buf2812[200]; +char buf2813[200]; +char buf2814[200]; +char buf2815[200]; +char buf2816[200]; +char buf2817[200]; +char buf2818[200]; +char buf2819[200]; +char buf2820[200]; +char buf2821[200]; +char buf2822[200]; +char buf2823[200]; +char buf2824[200]; +char buf2825[200]; +char buf2826[200]; +char buf2827[200]; +char buf2828[200]; +char buf2829[200]; +char buf2830[200]; +char buf2831[200]; +char buf2832[200]; +char buf2833[200]; +char buf2834[200]; +char buf2835[200]; +char buf2836[200]; +char buf2837[200]; +char buf2838[200]; +char buf2839[200]; +char buf2840[200]; +char buf2841[200]; +char buf2842[200]; +char buf2843[200]; +char buf2844[200]; +char buf2845[200]; +char buf2846[200]; +char buf2847[200]; +char buf2848[200]; +char buf2849[200]; +char buf2850[200]; +char buf2851[200]; +char buf2852[200]; +char buf2853[200]; +char buf2854[200]; +char buf2855[200]; +char buf2856[200]; +char buf2857[200]; +char buf2858[200]; +char buf2859[200]; +char buf2860[200]; +char buf2861[200]; +char buf2862[200]; +char buf2863[200]; +char buf2864[200]; +char buf2865[200]; +char buf2866[200]; +char buf2867[200]; +char buf2868[200]; +char buf2869[200]; +char buf2870[200]; +char buf2871[200]; +char buf2872[200]; +char buf2873[200]; +char buf2874[200]; +char buf2875[200]; +char buf2876[200]; +char buf2877[200]; +char buf2878[200]; +char buf2879[200]; +char buf2880[200]; +char buf2881[200]; +char buf2882[200]; +char buf2883[200]; +char buf2884[200]; +char buf2885[200]; +char buf2886[200]; +char buf2887[200]; +char buf2888[200]; +char buf2889[200]; +char buf2890[200]; +char buf2891[200]; +char buf2892[200]; +char buf2893[200]; +char buf2894[200]; +char buf2895[200]; +char buf2896[200]; +char buf2897[200]; +char buf2898[200]; +char buf2899[200]; +char buf2900[200]; +char buf2901[200]; +char buf2902[200]; +char buf2903[200]; +char buf2904[200]; +char buf2905[200]; +char buf2906[200]; +char buf2907[200]; +char buf2908[200]; +char buf2909[200]; +char buf2910[200]; +char buf2911[200]; +char buf2912[200]; +char buf2913[200]; +char buf2914[200]; +char buf2915[200]; +char buf2916[200]; +char buf2917[200]; +char buf2918[200]; +char buf2919[200]; +char buf2920[200]; +char buf2921[200]; +char buf2922[200]; +char buf2923[200]; +char buf2924[200]; +char buf2925[200]; +char buf2926[200]; +char buf2927[200]; +char buf2928[200]; +char buf2929[200]; +char buf2930[200]; +char buf2931[200]; +char buf2932[200]; +char buf2933[200]; +char buf2934[200]; +char buf2935[200]; +char buf2936[200]; +char buf2937[200]; +char buf2938[200]; +char buf2939[200]; +char buf2940[200]; +char buf2941[200]; +char buf2942[200]; +char buf2943[200]; +char buf2944[200]; +char buf2945[200]; +char buf2946[200]; +char buf2947[200]; +char buf2948[200]; +char buf2949[200]; +char buf2950[200]; +char buf2951[200]; +char buf2952[200]; +char buf2953[200]; +char buf2954[200]; +char buf2955[200]; +char buf2956[200]; +char buf2957[200]; +char buf2958[200]; +char buf2959[200]; +char buf2960[200]; +char buf2961[200]; +char buf2962[200]; +char buf2963[200]; +char buf2964[200]; +char buf2965[200]; +char buf2966[200]; +char buf2967[200]; +char buf2968[200]; +char buf2969[200]; +char buf2970[200]; +char buf2971[200]; +char buf2972[200]; +char buf2973[200]; +char buf2974[200]; +char buf2975[200]; +char buf2976[200]; +char buf2977[200]; +char buf2978[200]; +char buf2979[200]; +char buf2980[200]; +char buf2981[200]; +char buf2982[200]; +char buf2983[200]; +char buf2984[200]; +char buf2985[200]; +char buf2986[200]; +char buf2987[200]; +char buf2988[200]; +char buf2989[200]; +char buf2990[200]; +char buf2991[200]; +char buf2992[200]; +char buf2993[200]; +char buf2994[200]; +char buf2995[200]; +char buf2996[200]; +char buf2997[200]; +char buf2998[200]; +char buf2999[200]; +char buf3000[200]; +char buf3001[200]; +char buf3002[200]; +char buf3003[200]; +char buf3004[200]; +char buf3005[200]; +char buf3006[200]; +char buf3007[200]; +char buf3008[200]; +char buf3009[200]; +char buf3010[200]; +char buf3011[200]; +char buf3012[200]; +char buf3013[200]; +char buf3014[200]; +char buf3015[200]; +char buf3016[200]; +char buf3017[200]; +char buf3018[200]; +char buf3019[200]; +char buf3020[200]; +char buf3021[200]; +char buf3022[200]; +char buf3023[200]; +char buf3024[200]; +char buf3025[200]; +char buf3026[200]; +char buf3027[200]; +char buf3028[200]; +char buf3029[200]; +char buf3030[200]; +char buf3031[200]; +char buf3032[200]; +char buf3033[200]; +char buf3034[200]; +char buf3035[200]; +char buf3036[200]; +char buf3037[200]; +char buf3038[200]; +char buf3039[200]; +char buf3040[200]; +char buf3041[200]; +char buf3042[200]; +char buf3043[200]; +char buf3044[200]; +char buf3045[200]; +char buf3046[200]; +char buf3047[200]; +char buf3048[200]; +char buf3049[200]; +char buf3050[200]; +char buf3051[200]; +char buf3052[200]; +char buf3053[200]; +char buf3054[200]; +char buf3055[200]; +char buf3056[200]; +char buf3057[200]; +char buf3058[200]; +char buf3059[200]; +char buf3060[200]; +char buf3061[200]; +char buf3062[200]; +char buf3063[200]; +char buf3064[200]; +char buf3065[200]; +char buf3066[200]; +char buf3067[200]; +char buf3068[200]; +char buf3069[200]; +char buf3070[200]; +char buf3071[200]; +char buf3072[200]; +char buf3073[200]; +char buf3074[200]; +char buf3075[200]; +char buf3076[200]; +char buf3077[200]; +char buf3078[200]; +char buf3079[200]; +char buf3080[200]; +char buf3081[200]; +char buf3082[200]; +char buf3083[200]; +char buf3084[200]; +char buf3085[200]; +char buf3086[200]; +char buf3087[200]; +char buf3088[200]; +char buf3089[200]; +char buf3090[200]; +char buf3091[200]; +char buf3092[200]; +char buf3093[200]; +char buf3094[200]; +char buf3095[200]; +char buf3096[200]; +char buf3097[200]; +char buf3098[200]; +char buf3099[200]; +char buf3100[200]; +char buf3101[200]; +char buf3102[200]; +char buf3103[200]; +char buf3104[200]; +char buf3105[200]; +char buf3106[200]; +char buf3107[200]; +char buf3108[200]; +char buf3109[200]; +char buf3110[200]; +char buf3111[200]; +char buf3112[200]; +char buf3113[200]; +char buf3114[200]; +char buf3115[200]; +char buf3116[200]; +char buf3117[200]; +char buf3118[200]; +char buf3119[200]; +char buf3120[200]; +char buf3121[200]; +char buf3122[200]; +char buf3123[200]; +char buf3124[200]; +char buf3125[200]; +char buf3126[200]; +char buf3127[200]; +char buf3128[200]; +char buf3129[200]; +char buf3130[200]; +char buf3131[200]; +char buf3132[200]; +char buf3133[200]; +char buf3134[200]; +char buf3135[200]; +char buf3136[200]; +char buf3137[200]; +char buf3138[200]; +char buf3139[200]; +char buf3140[200]; +char buf3141[200]; +char buf3142[200]; +char buf3143[200]; +char buf3144[200]; +char buf3145[200]; +char buf3146[200]; +char buf3147[200]; +char buf3148[200]; +char buf3149[200]; +char buf3150[200]; +char buf3151[200]; +char buf3152[200]; +char buf3153[200]; +char buf3154[200]; +char buf3155[200]; +char buf3156[200]; +char buf3157[200]; +char buf3158[200]; +char buf3159[200]; + +void RS_KERNEL test(int in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clz(*(char*)buf165); + *(char2*)buf166 = clz(*(char2*)buf167); + *(char3*)buf168 = clz(*(char3*)buf169); + *(char4*)buf170 = clz(*(char4*)buf171); + *(uchar*)buf172 = clz(*(uchar*)buf173); + *(uchar2*)buf174 = clz(*(uchar2*)buf175); + *(uchar3*)buf176 = clz(*(uchar3*)buf177); + *(uchar4*)buf178 = clz(*(uchar4*)buf179); + *(short*)buf180 = clz(*(short*)buf181); + *(short2*)buf182 = clz(*(short2*)buf183); + *(short3*)buf184 = clz(*(short3*)buf185); + *(short4*)buf186 = clz(*(short4*)buf187); + *(ushort*)buf188 = clz(*(ushort*)buf189); + *(ushort2*)buf190 = clz(*(ushort2*)buf191); + *(ushort3*)buf192 = clz(*(ushort3*)buf193); + *(ushort4*)buf194 = clz(*(ushort4*)buf195); + *(int*)buf196 = clz(*(int*)buf197); + *(int2*)buf198 = clz(*(int2*)buf199); + *(int3*)buf200 = clz(*(int3*)buf201); + *(int4*)buf202 = clz(*(int4*)buf203); + *(uint*)buf204 = clz(*(uint*)buf205); + *(uint2*)buf206 = clz(*(uint2*)buf207); + *(uint3*)buf208 = clz(*(uint3*)buf209); + *(uint4*)buf210 = clz(*(uint4*)buf211); + *(float2*)buf212 = convert_float2(*(float2*)buf213); + *(float3*)buf214 = convert_float3(*(float3*)buf215); + *(float4*)buf216 = convert_float4(*(float4*)buf217); + *(float2*)buf218 = convert_float2(*(char2*)buf219); + *(float3*)buf220 = convert_float3(*(char3*)buf221); + *(float4*)buf222 = convert_float4(*(char4*)buf223); + *(float2*)buf224 = convert_float2(*(uchar2*)buf225); + *(float3*)buf226 = convert_float3(*(uchar3*)buf227); + *(float4*)buf228 = convert_float4(*(uchar4*)buf229); + *(float2*)buf230 = convert_float2(*(short2*)buf231); + *(float3*)buf232 = convert_float3(*(short3*)buf233); + *(float4*)buf234 = convert_float4(*(short4*)buf235); + *(float2*)buf236 = convert_float2(*(ushort2*)buf237); + *(float3*)buf238 = convert_float3(*(ushort3*)buf239); + *(float4*)buf240 = convert_float4(*(ushort4*)buf241); + *(float2*)buf242 = convert_float2(*(int2*)buf243); + *(float3*)buf244 = convert_float3(*(int3*)buf245); + *(float4*)buf246 = convert_float4(*(int4*)buf247); + *(float2*)buf248 = convert_float2(*(uint2*)buf249); + *(float3*)buf250 = convert_float3(*(uint3*)buf251); + *(float4*)buf252 = convert_float4(*(uint4*)buf253); + *(char2*)buf254 = convert_char2(*(float2*)buf255); + *(char3*)buf256 = convert_char3(*(float3*)buf257); + *(char4*)buf258 = convert_char4(*(float4*)buf259); + *(char2*)buf260 = convert_char2(*(char2*)buf261); + *(char3*)buf262 = convert_char3(*(char3*)buf263); + *(char4*)buf264 = convert_char4(*(char4*)buf265); + *(char2*)buf266 = convert_char2(*(uchar2*)buf267); + *(char3*)buf268 = convert_char3(*(uchar3*)buf269); + *(char4*)buf270 = convert_char4(*(uchar4*)buf271); + *(char2*)buf272 = convert_char2(*(short2*)buf273); + *(char3*)buf274 = convert_char3(*(short3*)buf275); + *(char4*)buf276 = convert_char4(*(short4*)buf277); + *(char2*)buf278 = convert_char2(*(ushort2*)buf279); + *(char3*)buf280 = convert_char3(*(ushort3*)buf281); + *(char4*)buf282 = convert_char4(*(ushort4*)buf283); + *(char2*)buf284 = convert_char2(*(int2*)buf285); + *(char3*)buf286 = convert_char3(*(int3*)buf287); + *(char4*)buf288 = convert_char4(*(int4*)buf289); + *(char2*)buf290 = convert_char2(*(uint2*)buf291); + *(char3*)buf292 = convert_char3(*(uint3*)buf293); + *(char4*)buf294 = convert_char4(*(uint4*)buf295); + *(uchar2*)buf296 = convert_uchar2(*(float2*)buf297); + *(uchar3*)buf298 = convert_uchar3(*(float3*)buf299); + *(uchar4*)buf300 = convert_uchar4(*(float4*)buf301); + *(uchar2*)buf302 = convert_uchar2(*(char2*)buf303); + *(uchar3*)buf304 = convert_uchar3(*(char3*)buf305); + *(uchar4*)buf306 = convert_uchar4(*(char4*)buf307); + *(uchar2*)buf308 = convert_uchar2(*(uchar2*)buf309); + *(uchar3*)buf310 = convert_uchar3(*(uchar3*)buf311); + *(uchar4*)buf312 = convert_uchar4(*(uchar4*)buf313); + *(uchar2*)buf314 = convert_uchar2(*(short2*)buf315); + *(uchar3*)buf316 = convert_uchar3(*(short3*)buf317); + *(uchar4*)buf318 = convert_uchar4(*(short4*)buf319); + *(uchar2*)buf320 = convert_uchar2(*(ushort2*)buf321); + *(uchar3*)buf322 = convert_uchar3(*(ushort3*)buf323); + *(uchar4*)buf324 = convert_uchar4(*(ushort4*)buf325); + *(uchar2*)buf326 = convert_uchar2(*(int2*)buf327); + *(uchar3*)buf328 = convert_uchar3(*(int3*)buf329); + *(uchar4*)buf330 = convert_uchar4(*(int4*)buf331); + *(uchar2*)buf332 = convert_uchar2(*(uint2*)buf333); + *(uchar3*)buf334 = convert_uchar3(*(uint3*)buf335); + *(uchar4*)buf336 = convert_uchar4(*(uint4*)buf337); + *(short2*)buf338 = convert_short2(*(float2*)buf339); + *(short3*)buf340 = convert_short3(*(float3*)buf341); + *(short4*)buf342 = convert_short4(*(float4*)buf343); + *(short2*)buf344 = convert_short2(*(char2*)buf345); + *(short3*)buf346 = convert_short3(*(char3*)buf347); + *(short4*)buf348 = convert_short4(*(char4*)buf349); + *(short2*)buf350 = convert_short2(*(uchar2*)buf351); + *(short3*)buf352 = convert_short3(*(uchar3*)buf353); + *(short4*)buf354 = convert_short4(*(uchar4*)buf355); + *(short2*)buf356 = convert_short2(*(short2*)buf357); + *(short3*)buf358 = convert_short3(*(short3*)buf359); + *(short4*)buf360 = convert_short4(*(short4*)buf361); + *(short2*)buf362 = convert_short2(*(ushort2*)buf363); + *(short3*)buf364 = convert_short3(*(ushort3*)buf365); + *(short4*)buf366 = convert_short4(*(ushort4*)buf367); + *(short2*)buf368 = convert_short2(*(int2*)buf369); + *(short3*)buf370 = convert_short3(*(int3*)buf371); + *(short4*)buf372 = convert_short4(*(int4*)buf373); + *(short2*)buf374 = convert_short2(*(uint2*)buf375); + *(short3*)buf376 = convert_short3(*(uint3*)buf377); + *(short4*)buf378 = convert_short4(*(uint4*)buf379); + *(ushort2*)buf380 = convert_ushort2(*(float2*)buf381); + *(ushort3*)buf382 = convert_ushort3(*(float3*)buf383); + *(ushort4*)buf384 = convert_ushort4(*(float4*)buf385); + *(ushort2*)buf386 = convert_ushort2(*(char2*)buf387); + *(ushort3*)buf388 = convert_ushort3(*(char3*)buf389); + *(ushort4*)buf390 = convert_ushort4(*(char4*)buf391); + *(ushort2*)buf392 = convert_ushort2(*(uchar2*)buf393); + *(ushort3*)buf394 = convert_ushort3(*(uchar3*)buf395); + *(ushort4*)buf396 = convert_ushort4(*(uchar4*)buf397); + *(ushort2*)buf398 = convert_ushort2(*(short2*)buf399); + *(ushort3*)buf400 = convert_ushort3(*(short3*)buf401); + *(ushort4*)buf402 = convert_ushort4(*(short4*)buf403); + *(ushort2*)buf404 = convert_ushort2(*(ushort2*)buf405); + *(ushort3*)buf406 = convert_ushort3(*(ushort3*)buf407); + *(ushort4*)buf408 = convert_ushort4(*(ushort4*)buf409); + *(ushort2*)buf410 = convert_ushort2(*(int2*)buf411); + *(ushort3*)buf412 = convert_ushort3(*(int3*)buf413); + *(ushort4*)buf414 = convert_ushort4(*(int4*)buf415); + *(ushort2*)buf416 = convert_ushort2(*(uint2*)buf417); + *(ushort3*)buf418 = convert_ushort3(*(uint3*)buf419); + *(ushort4*)buf420 = convert_ushort4(*(uint4*)buf421); + *(int2*)buf422 = convert_int2(*(float2*)buf423); + *(int3*)buf424 = convert_int3(*(float3*)buf425); + *(int4*)buf426 = convert_int4(*(float4*)buf427); + *(int2*)buf428 = convert_int2(*(char2*)buf429); + *(int3*)buf430 = convert_int3(*(char3*)buf431); + *(int4*)buf432 = convert_int4(*(char4*)buf433); + *(int2*)buf434 = convert_int2(*(uchar2*)buf435); + *(int3*)buf436 = convert_int3(*(uchar3*)buf437); + *(int4*)buf438 = convert_int4(*(uchar4*)buf439); + *(int2*)buf440 = convert_int2(*(short2*)buf441); + *(int3*)buf442 = convert_int3(*(short3*)buf443); + *(int4*)buf444 = convert_int4(*(short4*)buf445); + *(int2*)buf446 = convert_int2(*(ushort2*)buf447); + *(int3*)buf448 = convert_int3(*(ushort3*)buf449); + *(int4*)buf450 = convert_int4(*(ushort4*)buf451); + *(int2*)buf452 = convert_int2(*(int2*)buf453); + *(int3*)buf454 = convert_int3(*(int3*)buf455); + *(int4*)buf456 = convert_int4(*(int4*)buf457); + *(int2*)buf458 = convert_int2(*(uint2*)buf459); + *(int3*)buf460 = convert_int3(*(uint3*)buf461); + *(int4*)buf462 = convert_int4(*(uint4*)buf463); + *(uint2*)buf464 = convert_uint2(*(float2*)buf465); + *(uint3*)buf466 = convert_uint3(*(float3*)buf467); + *(uint4*)buf468 = convert_uint4(*(float4*)buf469); + *(uint2*)buf470 = convert_uint2(*(char2*)buf471); + *(uint3*)buf472 = convert_uint3(*(char3*)buf473); + *(uint4*)buf474 = convert_uint4(*(char4*)buf475); + *(uint2*)buf476 = convert_uint2(*(uchar2*)buf477); + *(uint3*)buf478 = convert_uint3(*(uchar3*)buf479); + *(uint4*)buf480 = convert_uint4(*(uchar4*)buf481); + *(uint2*)buf482 = convert_uint2(*(short2*)buf483); + *(uint3*)buf484 = convert_uint3(*(short3*)buf485); + *(uint4*)buf486 = convert_uint4(*(short4*)buf487); + *(uint2*)buf488 = convert_uint2(*(ushort2*)buf489); + *(uint3*)buf490 = convert_uint3(*(ushort3*)buf491); + *(uint4*)buf492 = convert_uint4(*(ushort4*)buf493); + *(uint2*)buf494 = convert_uint2(*(int2*)buf495); + *(uint3*)buf496 = convert_uint3(*(int3*)buf497); + *(uint4*)buf498 = convert_uint4(*(int4*)buf499); + *(uint2*)buf500 = convert_uint2(*(uint2*)buf501); + *(uint3*)buf502 = convert_uint3(*(uint3*)buf503); + *(uint4*)buf504 = convert_uint4(*(uint4*)buf505); + *(float*)buf506 = copysign(*(float*)buf507, *(float*)buf508); + *(float2*)buf509 = copysign(*(float2*)buf510, *(float2*)buf511); + *(float3*)buf512 = copysign(*(float3*)buf513, *(float3*)buf514); + *(float4*)buf515 = copysign(*(float4*)buf516, *(float4*)buf517); + *(float*)buf518 = cos(*(float*)buf519); + *(float2*)buf520 = cos(*(float2*)buf521); + *(float3*)buf522 = cos(*(float3*)buf523); + *(float4*)buf524 = cos(*(float4*)buf525); + *(float*)buf526 = cosh(*(float*)buf527); + *(float2*)buf528 = cosh(*(float2*)buf529); + *(float3*)buf530 = cosh(*(float3*)buf531); + *(float4*)buf532 = cosh(*(float4*)buf533); + *(float*)buf534 = cospi(*(float*)buf535); + *(float2*)buf536 = cospi(*(float2*)buf537); + *(float3*)buf538 = cospi(*(float3*)buf539); + *(float4*)buf540 = cospi(*(float4*)buf541); + *(float3*)buf542 = cross(*(float3*)buf543, *(float3*)buf544); + *(float4*)buf545 = cross(*(float4*)buf546, *(float4*)buf547); + *(float*)buf548 = degrees(*(float*)buf549); + *(float2*)buf550 = degrees(*(float2*)buf551); + *(float3*)buf552 = degrees(*(float3*)buf553); + *(float4*)buf554 = degrees(*(float4*)buf555); + *(float*)buf556 = distance(*(float*)buf557, *(float*)buf558); + *(float*)buf559 = distance(*(float2*)buf560, *(float2*)buf561); + *(float*)buf562 = distance(*(float3*)buf563, *(float3*)buf564); + *(float*)buf565 = distance(*(float4*)buf566, *(float4*)buf567); + *(float*)buf568 = dot(*(float*)buf569, *(float*)buf570); + *(float*)buf571 = dot(*(float2*)buf572, *(float2*)buf573); + *(float*)buf574 = dot(*(float3*)buf575, *(float3*)buf576); + *(float*)buf577 = dot(*(float4*)buf578, *(float4*)buf579); + *(float*)buf580 = erf(*(float*)buf581); + *(float2*)buf582 = erf(*(float2*)buf583); + *(float3*)buf584 = erf(*(float3*)buf585); + *(float4*)buf586 = erf(*(float4*)buf587); + *(float*)buf588 = erfc(*(float*)buf589); + *(float2*)buf590 = erfc(*(float2*)buf591); + *(float3*)buf592 = erfc(*(float3*)buf593); + *(float4*)buf594 = erfc(*(float4*)buf595); + *(float*)buf596 = exp(*(float*)buf597); + *(float2*)buf598 = exp(*(float2*)buf599); + *(float3*)buf600 = exp(*(float3*)buf601); + *(float4*)buf602 = exp(*(float4*)buf603); + *(float*)buf604 = exp10(*(float*)buf605); + *(float2*)buf606 = exp10(*(float2*)buf607); + *(float3*)buf608 = exp10(*(float3*)buf609); + *(float4*)buf610 = exp10(*(float4*)buf611); + *(float*)buf612 = exp2(*(float*)buf613); + *(float2*)buf614 = exp2(*(float2*)buf615); + *(float3*)buf616 = exp2(*(float3*)buf617); + *(float4*)buf618 = exp2(*(float4*)buf619); + *(float*)buf620 = expm1(*(float*)buf621); + *(float2*)buf622 = expm1(*(float2*)buf623); + *(float3*)buf624 = expm1(*(float3*)buf625); + *(float4*)buf626 = expm1(*(float4*)buf627); + *(float*)buf628 = fabs(*(float*)buf629); + *(float2*)buf630 = fabs(*(float2*)buf631); + *(float3*)buf632 = fabs(*(float3*)buf633); + *(float4*)buf634 = fabs(*(float4*)buf635); + *(float*)buf636 = fast_distance(*(float*)buf637, *(float*)buf638); + *(float*)buf639 = fast_distance(*(float2*)buf640, *(float2*)buf641); + *(float*)buf642 = fast_distance(*(float3*)buf643, *(float3*)buf644); + *(float*)buf645 = fast_distance(*(float4*)buf646, *(float4*)buf647); + *(float*)buf648 = fast_length(*(float*)buf649); + *(float*)buf650 = fast_length(*(float2*)buf651); + *(float*)buf652 = fast_length(*(float3*)buf653); + *(float*)buf654 = fast_length(*(float4*)buf655); + *(float*)buf656 = fast_normalize(*(float*)buf657); + *(float2*)buf658 = fast_normalize(*(float2*)buf659); + *(float3*)buf660 = fast_normalize(*(float3*)buf661); + *(float4*)buf662 = fast_normalize(*(float4*)buf663); + *(float*)buf664 = fdim(*(float*)buf665, *(float*)buf666); + *(float2*)buf667 = fdim(*(float2*)buf668, *(float2*)buf669); + *(float3*)buf670 = fdim(*(float3*)buf671, *(float3*)buf672); + *(float4*)buf673 = fdim(*(float4*)buf674, *(float4*)buf675); + *(float*)buf676 = floor(*(float*)buf677); + *(float2*)buf678 = floor(*(float2*)buf679); + *(float3*)buf680 = floor(*(float3*)buf681); + *(float4*)buf682 = floor(*(float4*)buf683); + *(float*)buf684 = fma(*(float*)buf685, *(float*)buf686, *(float*)buf687); + *(float2*)buf688 = fma(*(float2*)buf689, *(float2*)buf690, *(float2*)buf691); + *(float3*)buf692 = fma(*(float3*)buf693, *(float3*)buf694, *(float3*)buf695); + *(float4*)buf696 = fma(*(float4*)buf697, *(float4*)buf698, *(float4*)buf699); + *(float*)buf700 = fmax(*(float*)buf701, *(float*)buf702); + *(float2*)buf703 = fmax(*(float2*)buf704, *(float2*)buf705); + *(float3*)buf706 = fmax(*(float3*)buf707, *(float3*)buf708); + *(float4*)buf709 = fmax(*(float4*)buf710, *(float4*)buf711); + *(float2*)buf712 = fmax(*(float2*)buf713, *(float*)buf714); + *(float3*)buf715 = fmax(*(float3*)buf716, *(float*)buf717); + *(float4*)buf718 = fmax(*(float4*)buf719, *(float*)buf720); + *(float*)buf721 = fmin(*(float*)buf722, *(float*)buf723); + *(float2*)buf724 = fmin(*(float2*)buf725, *(float2*)buf726); + *(float3*)buf727 = fmin(*(float3*)buf728, *(float3*)buf729); + *(float4*)buf730 = fmin(*(float4*)buf731, *(float4*)buf732); + *(float2*)buf733 = fmin(*(float2*)buf734, *(float*)buf735); + *(float3*)buf736 = fmin(*(float3*)buf737, *(float*)buf738); + *(float4*)buf739 = fmin(*(float4*)buf740, *(float*)buf741); + *(float*)buf742 = fmod(*(float*)buf743, *(float*)buf744); + *(float2*)buf745 = fmod(*(float2*)buf746, *(float2*)buf747); + *(float3*)buf748 = fmod(*(float3*)buf749, *(float3*)buf750); + *(float4*)buf751 = fmod(*(float4*)buf752, *(float4*)buf753); + *(float*)buf754 = fract(*(float*)buf755, (float*) buf756); + *(float2*)buf757 = fract(*(float2*)buf758, (float2*) buf759); + *(float3*)buf760 = fract(*(float3*)buf761, (float3*) buf762); + *(float4*)buf763 = fract(*(float4*)buf764, (float4*) buf765); + *(float*)buf766 = fract(*(float*)buf767); + *(float2*)buf768 = fract(*(float2*)buf769); + *(float3*)buf770 = fract(*(float3*)buf771); + *(float4*)buf772 = fract(*(float4*)buf773); + *(float*)buf774 = frexp(*(float*)buf775, (int*) buf776); + *(float2*)buf777 = frexp(*(float2*)buf778, (int2*) buf779); + *(float3*)buf780 = frexp(*(float3*)buf781, (int3*) buf782); + *(float4*)buf783 = frexp(*(float4*)buf784, (int4*) buf785); + *(float*)buf786 = half_recip(*(float*)buf787); + *(float2*)buf788 = half_recip(*(float2*)buf789); + *(float3*)buf790 = half_recip(*(float3*)buf791); + *(float4*)buf792 = half_recip(*(float4*)buf793); + *(float*)buf794 = half_rsqrt(*(float*)buf795); + *(float2*)buf796 = half_rsqrt(*(float2*)buf797); + *(float3*)buf798 = half_rsqrt(*(float3*)buf799); + *(float4*)buf800 = half_rsqrt(*(float4*)buf801); + *(float*)buf802 = half_sqrt(*(float*)buf803); + *(float2*)buf804 = half_sqrt(*(float2*)buf805); + *(float3*)buf806 = half_sqrt(*(float3*)buf807); + *(float4*)buf808 = half_sqrt(*(float4*)buf809); + *(float*)buf810 = hypot(*(float*)buf811, *(float*)buf812); + *(float2*)buf813 = hypot(*(float2*)buf814, *(float2*)buf815); + *(float3*)buf816 = hypot(*(float3*)buf817, *(float3*)buf818); + *(float4*)buf819 = hypot(*(float4*)buf820, *(float4*)buf821); + *(int*)buf822 = ilogb(*(float*)buf823); + *(int2*)buf824 = ilogb(*(float2*)buf825); + *(int3*)buf826 = ilogb(*(float3*)buf827); + *(int4*)buf828 = ilogb(*(float4*)buf829); + *(float*)buf830 = ldexp(*(float*)buf831, *(int*)buf832); + *(float2*)buf833 = ldexp(*(float2*)buf834, *(int2*)buf835); + *(float3*)buf836 = ldexp(*(float3*)buf837, *(int3*)buf838); + *(float4*)buf839 = ldexp(*(float4*)buf840, *(int4*)buf841); + *(float2*)buf842 = ldexp(*(float2*)buf843, *(int*)buf844); + *(float3*)buf845 = ldexp(*(float3*)buf846, *(int*)buf847); + *(float4*)buf848 = ldexp(*(float4*)buf849, *(int*)buf850); + *(float*)buf851 = length(*(float*)buf852); + *(float*)buf853 = length(*(float2*)buf854); + *(float*)buf855 = length(*(float3*)buf856); + *(float*)buf857 = length(*(float4*)buf858); + *(float*)buf859 = lgamma(*(float*)buf860); + *(float2*)buf861 = lgamma(*(float2*)buf862); + *(float3*)buf863 = lgamma(*(float3*)buf864); + *(float4*)buf865 = lgamma(*(float4*)buf866); + *(float*)buf867 = lgamma(*(float*)buf868, (int*) buf869); + *(float2*)buf870 = lgamma(*(float2*)buf871, (int2*) buf872); + *(float3*)buf873 = lgamma(*(float3*)buf874, (int3*) buf875); + *(float4*)buf876 = lgamma(*(float4*)buf877, (int4*) buf878); + *(float*)buf879 = log(*(float*)buf880); + *(float2*)buf881 = log(*(float2*)buf882); + *(float3*)buf883 = log(*(float3*)buf884); + *(float4*)buf885 = log(*(float4*)buf886); + *(float*)buf887 = log10(*(float*)buf888); + *(float2*)buf889 = log10(*(float2*)buf890); + *(float3*)buf891 = log10(*(float3*)buf892); + *(float4*)buf893 = log10(*(float4*)buf894); + *(float*)buf895 = log1p(*(float*)buf896); + *(float2*)buf897 = log1p(*(float2*)buf898); + *(float3*)buf899 = log1p(*(float3*)buf900); + *(float4*)buf901 = log1p(*(float4*)buf902); + *(float*)buf903 = log2(*(float*)buf904); + *(float2*)buf905 = log2(*(float2*)buf906); + *(float3*)buf907 = log2(*(float3*)buf908); + *(float4*)buf909 = log2(*(float4*)buf910); + *(float*)buf911 = logb(*(float*)buf912); + *(float2*)buf913 = logb(*(float2*)buf914); + *(float3*)buf915 = logb(*(float3*)buf916); + *(float4*)buf917 = logb(*(float4*)buf918); + *(float*)buf919 = mad(*(float*)buf920, *(float*)buf921, *(float*)buf922); + *(float2*)buf923 = mad(*(float2*)buf924, *(float2*)buf925, *(float2*)buf926); + *(float3*)buf927 = mad(*(float3*)buf928, *(float3*)buf929, *(float3*)buf930); + *(float4*)buf931 = mad(*(float4*)buf932, *(float4*)buf933, *(float4*)buf934); + *(float*)buf935 = max(*(float*)buf936, *(float*)buf937); + *(float2*)buf938 = max(*(float2*)buf939, *(float2*)buf940); + *(float3*)buf941 = max(*(float3*)buf942, *(float3*)buf943); + *(float4*)buf944 = max(*(float4*)buf945, *(float4*)buf946); + *(float2*)buf947 = max(*(float2*)buf948, *(float*)buf949); + *(float3*)buf950 = max(*(float3*)buf951, *(float*)buf952); + *(float4*)buf953 = max(*(float4*)buf954, *(float*)buf955); + *(char*)buf956 = max(*(char*)buf957, *(char*)buf958); + *(uchar*)buf959 = max(*(uchar*)buf960, *(uchar*)buf961); + *(short*)buf962 = max(*(short*)buf963, *(short*)buf964); + *(ushort*)buf965 = max(*(ushort*)buf966, *(ushort*)buf967); + *(int*)buf968 = max(*(int*)buf969, *(int*)buf970); + *(uint*)buf971 = max(*(uint*)buf972, *(uint*)buf973); + *(char2*)buf974 = max(*(char2*)buf975, *(char2*)buf976); + *(uchar2*)buf977 = max(*(uchar2*)buf978, *(uchar2*)buf979); + *(short2*)buf980 = max(*(short2*)buf981, *(short2*)buf982); + *(ushort2*)buf983 = max(*(ushort2*)buf984, *(ushort2*)buf985); + *(int2*)buf986 = max(*(int2*)buf987, *(int2*)buf988); + *(uint2*)buf989 = max(*(uint2*)buf990, *(uint2*)buf991); + *(char3*)buf992 = max(*(char3*)buf993, *(char3*)buf994); + *(uchar3*)buf995 = max(*(uchar3*)buf996, *(uchar3*)buf997); + *(short3*)buf998 = max(*(short3*)buf999, *(short3*)buf1000); + *(ushort3*)buf1001 = max(*(ushort3*)buf1002, *(ushort3*)buf1003); + *(int3*)buf1004 = max(*(int3*)buf1005, *(int3*)buf1006); + *(uint3*)buf1007 = max(*(uint3*)buf1008, *(uint3*)buf1009); + *(char4*)buf1010 = max(*(char4*)buf1011, *(char4*)buf1012); + *(uchar4*)buf1013 = max(*(uchar4*)buf1014, *(uchar4*)buf1015); + *(short4*)buf1016 = max(*(short4*)buf1017, *(short4*)buf1018); + *(ushort4*)buf1019 = max(*(ushort4*)buf1020, *(ushort4*)buf1021); + *(int4*)buf1022 = max(*(int4*)buf1023, *(int4*)buf1024); + *(uint4*)buf1025 = max(*(uint4*)buf1026, *(uint4*)buf1027); + *(float*)buf1028 = min(*(float*)buf1029, *(float*)buf1030); + *(float2*)buf1031 = min(*(float2*)buf1032, *(float2*)buf1033); + *(float3*)buf1034 = min(*(float3*)buf1035, *(float3*)buf1036); + *(float4*)buf1037 = min(*(float4*)buf1038, *(float4*)buf1039); + *(float2*)buf1040 = min(*(float2*)buf1041, *(float*)buf1042); + *(float3*)buf1043 = min(*(float3*)buf1044, *(float*)buf1045); + *(float4*)buf1046 = min(*(float4*)buf1047, *(float*)buf1048); + *(char*)buf1049 = min(*(char*)buf1050, *(char*)buf1051); + *(uchar*)buf1052 = min(*(uchar*)buf1053, *(uchar*)buf1054); + *(short*)buf1055 = min(*(short*)buf1056, *(short*)buf1057); + *(ushort*)buf1058 = min(*(ushort*)buf1059, *(ushort*)buf1060); + *(int*)buf1061 = min(*(int*)buf1062, *(int*)buf1063); + *(uint*)buf1064 = min(*(uint*)buf1065, *(uint*)buf1066); + *(char2*)buf1067 = min(*(char2*)buf1068, *(char2*)buf1069); + *(uchar2*)buf1070 = min(*(uchar2*)buf1071, *(uchar2*)buf1072); + *(short2*)buf1073 = min(*(short2*)buf1074, *(short2*)buf1075); + *(ushort2*)buf1076 = min(*(ushort2*)buf1077, *(ushort2*)buf1078); + *(int2*)buf1079 = min(*(int2*)buf1080, *(int2*)buf1081); + *(uint2*)buf1082 = min(*(uint2*)buf1083, *(uint2*)buf1084); + *(char3*)buf1085 = min(*(char3*)buf1086, *(char3*)buf1087); + *(uchar3*)buf1088 = min(*(uchar3*)buf1089, *(uchar3*)buf1090); + *(short3*)buf1091 = min(*(short3*)buf1092, *(short3*)buf1093); + *(ushort3*)buf1094 = min(*(ushort3*)buf1095, *(ushort3*)buf1096); + *(int3*)buf1097 = min(*(int3*)buf1098, *(int3*)buf1099); + *(uint3*)buf1100 = min(*(uint3*)buf1101, *(uint3*)buf1102); + *(char4*)buf1103 = min(*(char4*)buf1104, *(char4*)buf1105); + *(uchar4*)buf1106 = min(*(uchar4*)buf1107, *(uchar4*)buf1108); + *(short4*)buf1109 = min(*(short4*)buf1110, *(short4*)buf1111); + *(ushort4*)buf1112 = min(*(ushort4*)buf1113, *(ushort4*)buf1114); + *(int4*)buf1115 = min(*(int4*)buf1116, *(int4*)buf1117); + *(uint4*)buf1118 = min(*(uint4*)buf1119, *(uint4*)buf1120); + *(float*)buf1121 = mix(*(float*)buf1122, *(float*)buf1123, *(float*)buf1124); + *(float2*)buf1125 = mix(*(float2*)buf1126, *(float2*)buf1127, *(float2*)buf1128); + *(float3*)buf1129 = mix(*(float3*)buf1130, *(float3*)buf1131, *(float3*)buf1132); + *(float4*)buf1133 = mix(*(float4*)buf1134, *(float4*)buf1135, *(float4*)buf1136); + *(float2*)buf1137 = mix(*(float2*)buf1138, *(float2*)buf1139, *(float*)buf1140); + *(float3*)buf1141 = mix(*(float3*)buf1142, *(float3*)buf1143, *(float*)buf1144); + *(float4*)buf1145 = mix(*(float4*)buf1146, *(float4*)buf1147, *(float*)buf1148); + *(float*)buf1149 = modf(*(float*)buf1150, (float*) buf1151); + *(float2*)buf1152 = modf(*(float2*)buf1153, (float2*) buf1154); + *(float3*)buf1155 = modf(*(float3*)buf1156, (float3*) buf1157); + *(float4*)buf1158 = modf(*(float4*)buf1159, (float4*) buf1160); + *(float*)buf1161 = nan(*(uint*)buf1162); + *(float*)buf1163 = native_exp(*(float*)buf1164); + *(float2*)buf1165 = native_exp(*(float2*)buf1166); + *(float3*)buf1167 = native_exp(*(float3*)buf1168); + *(float4*)buf1169 = native_exp(*(float4*)buf1170); + *(float*)buf1171 = native_exp10(*(float*)buf1172); + *(float2*)buf1173 = native_exp10(*(float2*)buf1174); + *(float3*)buf1175 = native_exp10(*(float3*)buf1176); + *(float4*)buf1177 = native_exp10(*(float4*)buf1178); + *(float*)buf1179 = native_exp2(*(float*)buf1180); + *(float2*)buf1181 = native_exp2(*(float2*)buf1182); + *(float3*)buf1183 = native_exp2(*(float3*)buf1184); + *(float4*)buf1185 = native_exp2(*(float4*)buf1186); + *(float*)buf1187 = native_log(*(float*)buf1188); + *(float2*)buf1189 = native_log(*(float2*)buf1190); + *(float3*)buf1191 = native_log(*(float3*)buf1192); + *(float4*)buf1193 = native_log(*(float4*)buf1194); + *(float*)buf1195 = native_log10(*(float*)buf1196); + *(float2*)buf1197 = native_log10(*(float2*)buf1198); + *(float3*)buf1199 = native_log10(*(float3*)buf1200); + *(float4*)buf1201 = native_log10(*(float4*)buf1202); + *(float*)buf1203 = native_log2(*(float*)buf1204); + *(float2*)buf1205 = native_log2(*(float2*)buf1206); + *(float3*)buf1207 = native_log2(*(float3*)buf1208); + *(float4*)buf1209 = native_log2(*(float4*)buf1210); + *(float*)buf1211 = native_powr(*(float*)buf1212, *(float*)buf1213); + *(float2*)buf1214 = native_powr(*(float2*)buf1215, *(float2*)buf1216); + *(float3*)buf1217 = native_powr(*(float3*)buf1218, *(float3*)buf1219); + *(float4*)buf1220 = native_powr(*(float4*)buf1221, *(float4*)buf1222); + *(float*)buf1223 = nextafter(*(float*)buf1224, *(float*)buf1225); + *(float2*)buf1226 = nextafter(*(float2*)buf1227, *(float2*)buf1228); + *(float3*)buf1229 = nextafter(*(float3*)buf1230, *(float3*)buf1231); + *(float4*)buf1232 = nextafter(*(float4*)buf1233, *(float4*)buf1234); + *(float*)buf1235 = normalize(*(float*)buf1236); + *(float2*)buf1237 = normalize(*(float2*)buf1238); + *(float3*)buf1239 = normalize(*(float3*)buf1240); + *(float4*)buf1241 = normalize(*(float4*)buf1242); + *(float*)buf1243 = pow(*(float*)buf1244, *(float*)buf1245); + *(float2*)buf1246 = pow(*(float2*)buf1247, *(float2*)buf1248); + *(float3*)buf1249 = pow(*(float3*)buf1250, *(float3*)buf1251); + *(float4*)buf1252 = pow(*(float4*)buf1253, *(float4*)buf1254); + *(float*)buf1255 = pown(*(float*)buf1256, *(int*)buf1257); + *(float2*)buf1258 = pown(*(float2*)buf1259, *(int2*)buf1260); + *(float3*)buf1261 = pown(*(float3*)buf1262, *(int3*)buf1263); + *(float4*)buf1264 = pown(*(float4*)buf1265, *(int4*)buf1266); + *(float*)buf1267 = powr(*(float*)buf1268, *(float*)buf1269); + *(float2*)buf1270 = powr(*(float2*)buf1271, *(float2*)buf1272); + *(float3*)buf1273 = powr(*(float3*)buf1274, *(float3*)buf1275); + *(float4*)buf1276 = powr(*(float4*)buf1277, *(float4*)buf1278); + *(float*)buf1279 = radians(*(float*)buf1280); + *(float2*)buf1281 = radians(*(float2*)buf1282); + *(float3*)buf1283 = radians(*(float3*)buf1284); + *(float4*)buf1285 = radians(*(float4*)buf1286); + *(float*)buf1287 = remainder(*(float*)buf1288, *(float*)buf1289); + *(float2*)buf1290 = remainder(*(float2*)buf1291, *(float2*)buf1292); + *(float3*)buf1293 = remainder(*(float3*)buf1294, *(float3*)buf1295); + *(float4*)buf1296 = remainder(*(float4*)buf1297, *(float4*)buf1298); + *(float*)buf1299 = remquo(*(float*)buf1300, *(float*)buf1301, (int*) buf1302); + *(float2*)buf1303 = remquo(*(float2*)buf1304, *(float2*)buf1305, (int2*) buf1306); + *(float3*)buf1307 = remquo(*(float3*)buf1308, *(float3*)buf1309, (int3*) buf1310); + *(float4*)buf1311 = remquo(*(float4*)buf1312, *(float4*)buf1313, (int4*) buf1314); + *(float*)buf1315 = rint(*(float*)buf1316); + *(float2*)buf1317 = rint(*(float2*)buf1318); + *(float3*)buf1319 = rint(*(float3*)buf1320); + *(float4*)buf1321 = rint(*(float4*)buf1322); + *(float*)buf1323 = rootn(*(float*)buf1324, *(int*)buf1325); + *(float2*)buf1326 = rootn(*(float2*)buf1327, *(int2*)buf1328); + *(float3*)buf1329 = rootn(*(float3*)buf1330, *(int3*)buf1331); + *(float4*)buf1332 = rootn(*(float4*)buf1333, *(int4*)buf1334); + *(float*)buf1335 = round(*(float*)buf1336); + *(float2*)buf1337 = round(*(float2*)buf1338); + *(float3*)buf1339 = round(*(float3*)buf1340); + *(float4*)buf1341 = round(*(float4*)buf1342); + rsAllocationCopy1DRange(*(rs_allocation*)buf1343, *(uint32_t*)buf1344, *(uint32_t*)buf1345, *(uint32_t*)buf1346, *(rs_allocation*)buf1347, *(uint32_t*)buf1348, *(uint32_t*)buf1349); + rsAllocationCopy2DRange(*(rs_allocation*)buf1350, *(uint32_t*)buf1351, *(uint32_t*)buf1352, *(uint32_t*)buf1353, *(rs_allocation_cubemap_face*)buf1354, *(uint32_t*)buf1355, *(uint32_t*)buf1356, *(rs_allocation*)buf1357, *(uint32_t*)buf1358, *(uint32_t*)buf1359, *(uint32_t*)buf1360, *(rs_allocation_cubemap_face*)buf1361); + *(uint32_t*)buf1362 = rsAllocationGetDimFaces(*(rs_allocation*)buf1363); + *(uint32_t*)buf1364 = rsAllocationGetDimLOD(*(rs_allocation*)buf1365); + *(uint32_t*)buf1366 = rsAllocationGetDimX(*(rs_allocation*)buf1367); + *(uint32_t*)buf1368 = rsAllocationGetDimY(*(rs_allocation*)buf1369); + *(uint32_t*)buf1370 = rsAllocationGetDimZ(*(rs_allocation*)buf1371); + *(rs_element*)buf1372 = rsAllocationGetElement(*(rs_allocation*)buf1373); + rsAllocationIoReceive(*(rs_allocation*)buf1374); + rsAllocationIoSend(*(rs_allocation*)buf1375); + *(int32_t*)buf1376 = rsAtomicAdd((volatile int32_t*) buf1377, *(int32_t*)buf1378); + *(int32_t*)buf1379 = rsAtomicAnd((volatile int32_t*) buf1380, *(int32_t*)buf1381); + *(int32_t*)buf1382 = rsAtomicCas((volatile int32_t*) buf1383, *(int32_t*)buf1384, *(int32_t*)buf1385); + *(uint32_t*)buf1386 = rsAtomicCas((volatile uint32_t*) buf1387, *(uint32_t*)buf1388, *(uint32_t*)buf1389); + *(int32_t*)buf1390 = rsAtomicDec((volatile int32_t*) buf1391); + *(int32_t*)buf1392 = rsAtomicInc((volatile int32_t*) buf1393); + *(uint32_t*)buf1394 = rsAtomicMax((volatile uint32_t*) buf1395, *(uint32_t*)buf1396); + *(int32_t*)buf1397 = rsAtomicMax((volatile int32_t*) buf1398, *(int32_t*)buf1399); + *(uint32_t*)buf1400 = rsAtomicMin((volatile uint32_t*) buf1401, *(uint32_t*)buf1402); + *(int32_t*)buf1403 = rsAtomicMin((volatile int32_t*) buf1404, *(int32_t*)buf1405); + *(int32_t*)buf1406 = rsAtomicOr((volatile int32_t*) buf1407, *(int32_t*)buf1408); + *(int32_t*)buf1409 = rsAtomicSub((volatile int32_t*) buf1410, *(int32_t*)buf1411); + *(int32_t*)buf1412 = rsAtomicXor((volatile int32_t*) buf1413, *(int32_t*)buf1414); + *(char*)buf1415 = rsClamp(*(char*)buf1416, *(char*)buf1417, *(char*)buf1418); + *(uchar*)buf1419 = rsClamp(*(uchar*)buf1420, *(uchar*)buf1421, *(uchar*)buf1422); + *(short*)buf1423 = rsClamp(*(short*)buf1424, *(short*)buf1425, *(short*)buf1426); + *(ushort*)buf1427 = rsClamp(*(ushort*)buf1428, *(ushort*)buf1429, *(ushort*)buf1430); + *(int*)buf1431 = rsClamp(*(int*)buf1432, *(int*)buf1433, *(int*)buf1434); + *(uint*)buf1435 = rsClamp(*(uint*)buf1436, *(uint*)buf1437, *(uint*)buf1438); + rsClearObject((rs_element*) buf1439); + rsClearObject((rs_type*) buf1440); + rsClearObject((rs_allocation*) buf1441); + rsClearObject((rs_sampler*) buf1442); + rsClearObject((rs_script*) buf1443); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1444); + rsClearObject((rs_program_fragment*) buf1445); + rsClearObject((rs_program_vertex*) buf1446); + rsClearObject((rs_program_raster*) buf1447); + rsClearObject((rs_program_store*) buf1448); + rsClearObject((rs_font*) buf1449); +#endif + rsDebug((const char*) buf1450, *(double*)buf1451); + rsDebug((const char*) buf1452, *(int*)buf1453); + rsDebug((const char*) buf1454, *(uint*)buf1455); + rsDebug((const char*) buf1456, *(long*)buf1457); + rsDebug((const char*) buf1458, *(ulong*)buf1459); + rsDebug((const char*) buf1460, *(int2*)buf1461); + rsDebug((const char*) buf1462, *(int3*)buf1463); + rsDebug((const char*) buf1464, *(int4*)buf1465); + rsDebug((const char*) buf1466, *(uint2*)buf1467); + rsDebug((const char*) buf1468, *(uint3*)buf1469); + rsDebug((const char*) buf1470, *(uint4*)buf1471); + rsDebug((const char*) buf1472, *(long2*)buf1473); + rsDebug((const char*) buf1474, *(long3*)buf1475); + rsDebug((const char*) buf1476, *(long4*)buf1477); + rsDebug((const char*) buf1478, *(ulong2*)buf1479); + rsDebug((const char*) buf1480, *(ulong3*)buf1481); + rsDebug((const char*) buf1482, *(ulong4*)buf1483); + rsDebug((const char*) buf1484, *(float*)buf1485); + rsDebug((const char*) buf1486, *(float2*)buf1487); + rsDebug((const char*) buf1488, *(float3*)buf1489); + rsDebug((const char*) buf1490, *(float4*)buf1491); + rsDebug((const char*) buf1492, *(char*)buf1493); + rsDebug((const char*) buf1494, *(char2*)buf1495); + rsDebug((const char*) buf1496, *(char3*)buf1497); + rsDebug((const char*) buf1498, *(char4*)buf1499); + rsDebug((const char*) buf1500, *(uchar*)buf1501); + rsDebug((const char*) buf1502, *(uchar2*)buf1503); + rsDebug((const char*) buf1504, *(uchar3*)buf1505); + rsDebug((const char*) buf1506, *(uchar4*)buf1507); + rsDebug((const char*) buf1508, *(short*)buf1509); + rsDebug((const char*) buf1510, *(short2*)buf1511); + rsDebug((const char*) buf1512, *(short3*)buf1513); + rsDebug((const char*) buf1514, *(short4*)buf1515); + rsDebug((const char*) buf1516, *(ushort*)buf1517); + rsDebug((const char*) buf1518, *(ushort2*)buf1519); + rsDebug((const char*) buf1520, *(ushort3*)buf1521); + rsDebug((const char*) buf1522, *(ushort4*)buf1523); + rsDebug((const char*) buf1524, *(float*)buf1525, *(float*)buf1526); + rsDebug((const char*) buf1527, *(float*)buf1528, *(float*)buf1529, *(float*)buf1530); + rsDebug((const char*) buf1531, *(float*)buf1532, *(float*)buf1533, *(float*)buf1534, *(float*)buf1535); + rsDebug((const char*) buf1536, *(long long*)buf1537); + rsDebug((const char*) buf1538, *(unsigned long long*)buf1539); + rsDebug((const char*) buf1540, (const void*) buf1541); + rsDebug((const char*) buf1542, (const rs_matrix4x4*) buf1543); + rsDebug((const char*) buf1544, (const rs_matrix3x3*) buf1545); + rsDebug((const char*) buf1546, (const rs_matrix2x2*) buf1547); + *(uint32_t*)buf1548 = rsElementGetBytesSize(*(rs_element*)buf1549); + *(rs_data_kind*)buf1550 = rsElementGetDataKind(*(rs_element*)buf1551); + *(rs_data_type*)buf1552 = rsElementGetDataType(*(rs_element*)buf1553); + *(rs_element*)buf1554 = rsElementGetSubElement(*(rs_element*)buf1555, *(uint32_t*)buf1556); + *(uint32_t*)buf1557 = rsElementGetSubElementArraySize(*(rs_element*)buf1558, *(uint32_t*)buf1559); + *(uint32_t*)buf1560 = rsElementGetSubElementCount(*(rs_element*)buf1561); + *(uint32_t*)buf1562 = rsElementGetSubElementName(*(rs_element*)buf1563, *(uint32_t*)buf1564, (char*) buf1565, *(uint32_t*)buf1566); + *(uint32_t*)buf1567 = rsElementGetSubElementNameLength(*(rs_element*)buf1568, *(uint32_t*)buf1569); + *(uint32_t*)buf1570 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf1571, *(uint32_t*)buf1572); + *(uint32_t*)buf1573 = rsElementGetVectorSize(*(rs_element*)buf1574); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1575, (float4*) buf1576, (float4*) buf1577, (float4*) buf1578, (float4*) buf1579, (float4*) buf1580, (float4*) buf1581); + rsForEach(*(rs_script*)buf1582, *(rs_allocation*)buf1583, *(rs_allocation*)buf1584, (const void*) buf1585, *(size_t*)buf1586, (const rs_script_call_t*) buf1587); + rsForEach(*(rs_script*)buf1588, *(rs_allocation*)buf1589, *(rs_allocation*)buf1590, (const void*) buf1591, *(size_t*)buf1592); + rsForEach(*(rs_script*)buf1593, *(rs_allocation*)buf1594, *(rs_allocation*)buf1595); + *(float*)buf1596 = rsFrac(*(float*)buf1597); + *(rs_allocation*)buf1598 = rsGetAllocation((const void*) buf1599); + *(float*)buf1600 = rsGetDt(); + *(const void**)buf1601 = rsGetElementAt(*(rs_allocation*)buf1602, *(uint32_t*)buf1603); + *(const void**)buf1604 = rsGetElementAt(*(rs_allocation*)buf1605, *(uint32_t*)buf1606, *(uint32_t*)buf1607); + *(const void**)buf1608 = rsGetElementAt(*(rs_allocation*)buf1609, *(uint32_t*)buf1610, *(uint32_t*)buf1611, *(uint32_t*)buf1612); + *(float*)buf1613 = rsGetElementAt_float(*(rs_allocation*)buf1614, *(uint32_t*)buf1615); + *(float2*)buf1616 = rsGetElementAt_float2(*(rs_allocation*)buf1617, *(uint32_t*)buf1618); + *(float3*)buf1619 = rsGetElementAt_float3(*(rs_allocation*)buf1620, *(uint32_t*)buf1621); + *(float4*)buf1622 = rsGetElementAt_float4(*(rs_allocation*)buf1623, *(uint32_t*)buf1624); + *(double*)buf1625 = rsGetElementAt_double(*(rs_allocation*)buf1626, *(uint32_t*)buf1627); + *(double2*)buf1628 = rsGetElementAt_double2(*(rs_allocation*)buf1629, *(uint32_t*)buf1630); + *(double3*)buf1631 = rsGetElementAt_double3(*(rs_allocation*)buf1632, *(uint32_t*)buf1633); + *(double4*)buf1634 = rsGetElementAt_double4(*(rs_allocation*)buf1635, *(uint32_t*)buf1636); + *(char*)buf1637 = rsGetElementAt_char(*(rs_allocation*)buf1638, *(uint32_t*)buf1639); + *(char2*)buf1640 = rsGetElementAt_char2(*(rs_allocation*)buf1641, *(uint32_t*)buf1642); + *(char3*)buf1643 = rsGetElementAt_char3(*(rs_allocation*)buf1644, *(uint32_t*)buf1645); + *(char4*)buf1646 = rsGetElementAt_char4(*(rs_allocation*)buf1647, *(uint32_t*)buf1648); + *(uchar*)buf1649 = rsGetElementAt_uchar(*(rs_allocation*)buf1650, *(uint32_t*)buf1651); + *(uchar2*)buf1652 = rsGetElementAt_uchar2(*(rs_allocation*)buf1653, *(uint32_t*)buf1654); + *(uchar3*)buf1655 = rsGetElementAt_uchar3(*(rs_allocation*)buf1656, *(uint32_t*)buf1657); + *(uchar4*)buf1658 = rsGetElementAt_uchar4(*(rs_allocation*)buf1659, *(uint32_t*)buf1660); + *(short*)buf1661 = rsGetElementAt_short(*(rs_allocation*)buf1662, *(uint32_t*)buf1663); + *(short2*)buf1664 = rsGetElementAt_short2(*(rs_allocation*)buf1665, *(uint32_t*)buf1666); + *(short3*)buf1667 = rsGetElementAt_short3(*(rs_allocation*)buf1668, *(uint32_t*)buf1669); + *(short4*)buf1670 = rsGetElementAt_short4(*(rs_allocation*)buf1671, *(uint32_t*)buf1672); + *(ushort*)buf1673 = rsGetElementAt_ushort(*(rs_allocation*)buf1674, *(uint32_t*)buf1675); + *(ushort2*)buf1676 = rsGetElementAt_ushort2(*(rs_allocation*)buf1677, *(uint32_t*)buf1678); + *(ushort3*)buf1679 = rsGetElementAt_ushort3(*(rs_allocation*)buf1680, *(uint32_t*)buf1681); + *(ushort4*)buf1682 = rsGetElementAt_ushort4(*(rs_allocation*)buf1683, *(uint32_t*)buf1684); + *(int*)buf1685 = rsGetElementAt_int(*(rs_allocation*)buf1686, *(uint32_t*)buf1687); + *(int2*)buf1688 = rsGetElementAt_int2(*(rs_allocation*)buf1689, *(uint32_t*)buf1690); + *(int3*)buf1691 = rsGetElementAt_int3(*(rs_allocation*)buf1692, *(uint32_t*)buf1693); + *(int4*)buf1694 = rsGetElementAt_int4(*(rs_allocation*)buf1695, *(uint32_t*)buf1696); + *(uint*)buf1697 = rsGetElementAt_uint(*(rs_allocation*)buf1698, *(uint32_t*)buf1699); + *(uint2*)buf1700 = rsGetElementAt_uint2(*(rs_allocation*)buf1701, *(uint32_t*)buf1702); + *(uint3*)buf1703 = rsGetElementAt_uint3(*(rs_allocation*)buf1704, *(uint32_t*)buf1705); + *(uint4*)buf1706 = rsGetElementAt_uint4(*(rs_allocation*)buf1707, *(uint32_t*)buf1708); + *(long*)buf1709 = rsGetElementAt_long(*(rs_allocation*)buf1710, *(uint32_t*)buf1711); + *(long2*)buf1712 = rsGetElementAt_long2(*(rs_allocation*)buf1713, *(uint32_t*)buf1714); + *(long3*)buf1715 = rsGetElementAt_long3(*(rs_allocation*)buf1716, *(uint32_t*)buf1717); + *(long4*)buf1718 = rsGetElementAt_long4(*(rs_allocation*)buf1719, *(uint32_t*)buf1720); + *(ulong*)buf1721 = rsGetElementAt_ulong(*(rs_allocation*)buf1722, *(uint32_t*)buf1723); + *(ulong2*)buf1724 = rsGetElementAt_ulong2(*(rs_allocation*)buf1725, *(uint32_t*)buf1726); + *(ulong3*)buf1727 = rsGetElementAt_ulong3(*(rs_allocation*)buf1728, *(uint32_t*)buf1729); + *(ulong4*)buf1730 = rsGetElementAt_ulong4(*(rs_allocation*)buf1731, *(uint32_t*)buf1732); + *(float*)buf1733 = rsGetElementAt_float(*(rs_allocation*)buf1734, *(uint32_t*)buf1735, *(uint32_t*)buf1736); + *(float2*)buf1737 = rsGetElementAt_float2(*(rs_allocation*)buf1738, *(uint32_t*)buf1739, *(uint32_t*)buf1740); + *(float3*)buf1741 = rsGetElementAt_float3(*(rs_allocation*)buf1742, *(uint32_t*)buf1743, *(uint32_t*)buf1744); + *(float4*)buf1745 = rsGetElementAt_float4(*(rs_allocation*)buf1746, *(uint32_t*)buf1747, *(uint32_t*)buf1748); + *(double*)buf1749 = rsGetElementAt_double(*(rs_allocation*)buf1750, *(uint32_t*)buf1751, *(uint32_t*)buf1752); + *(double2*)buf1753 = rsGetElementAt_double2(*(rs_allocation*)buf1754, *(uint32_t*)buf1755, *(uint32_t*)buf1756); + *(double3*)buf1757 = rsGetElementAt_double3(*(rs_allocation*)buf1758, *(uint32_t*)buf1759, *(uint32_t*)buf1760); + *(double4*)buf1761 = rsGetElementAt_double4(*(rs_allocation*)buf1762, *(uint32_t*)buf1763, *(uint32_t*)buf1764); + *(char*)buf1765 = rsGetElementAt_char(*(rs_allocation*)buf1766, *(uint32_t*)buf1767, *(uint32_t*)buf1768); + *(char2*)buf1769 = rsGetElementAt_char2(*(rs_allocation*)buf1770, *(uint32_t*)buf1771, *(uint32_t*)buf1772); + *(char3*)buf1773 = rsGetElementAt_char3(*(rs_allocation*)buf1774, *(uint32_t*)buf1775, *(uint32_t*)buf1776); + *(char4*)buf1777 = rsGetElementAt_char4(*(rs_allocation*)buf1778, *(uint32_t*)buf1779, *(uint32_t*)buf1780); + *(uchar*)buf1781 = rsGetElementAt_uchar(*(rs_allocation*)buf1782, *(uint32_t*)buf1783, *(uint32_t*)buf1784); + *(uchar2*)buf1785 = rsGetElementAt_uchar2(*(rs_allocation*)buf1786, *(uint32_t*)buf1787, *(uint32_t*)buf1788); + *(uchar3*)buf1789 = rsGetElementAt_uchar3(*(rs_allocation*)buf1790, *(uint32_t*)buf1791, *(uint32_t*)buf1792); + *(uchar4*)buf1793 = rsGetElementAt_uchar4(*(rs_allocation*)buf1794, *(uint32_t*)buf1795, *(uint32_t*)buf1796); + *(short*)buf1797 = rsGetElementAt_short(*(rs_allocation*)buf1798, *(uint32_t*)buf1799, *(uint32_t*)buf1800); + *(short2*)buf1801 = rsGetElementAt_short2(*(rs_allocation*)buf1802, *(uint32_t*)buf1803, *(uint32_t*)buf1804); + *(short3*)buf1805 = rsGetElementAt_short3(*(rs_allocation*)buf1806, *(uint32_t*)buf1807, *(uint32_t*)buf1808); + *(short4*)buf1809 = rsGetElementAt_short4(*(rs_allocation*)buf1810, *(uint32_t*)buf1811, *(uint32_t*)buf1812); + *(ushort*)buf1813 = rsGetElementAt_ushort(*(rs_allocation*)buf1814, *(uint32_t*)buf1815, *(uint32_t*)buf1816); + *(ushort2*)buf1817 = rsGetElementAt_ushort2(*(rs_allocation*)buf1818, *(uint32_t*)buf1819, *(uint32_t*)buf1820); + *(ushort3*)buf1821 = rsGetElementAt_ushort3(*(rs_allocation*)buf1822, *(uint32_t*)buf1823, *(uint32_t*)buf1824); + *(ushort4*)buf1825 = rsGetElementAt_ushort4(*(rs_allocation*)buf1826, *(uint32_t*)buf1827, *(uint32_t*)buf1828); + *(int*)buf1829 = rsGetElementAt_int(*(rs_allocation*)buf1830, *(uint32_t*)buf1831, *(uint32_t*)buf1832); + *(int2*)buf1833 = rsGetElementAt_int2(*(rs_allocation*)buf1834, *(uint32_t*)buf1835, *(uint32_t*)buf1836); + *(int3*)buf1837 = rsGetElementAt_int3(*(rs_allocation*)buf1838, *(uint32_t*)buf1839, *(uint32_t*)buf1840); + *(int4*)buf1841 = rsGetElementAt_int4(*(rs_allocation*)buf1842, *(uint32_t*)buf1843, *(uint32_t*)buf1844); + *(uint*)buf1845 = rsGetElementAt_uint(*(rs_allocation*)buf1846, *(uint32_t*)buf1847, *(uint32_t*)buf1848); + *(uint2*)buf1849 = rsGetElementAt_uint2(*(rs_allocation*)buf1850, *(uint32_t*)buf1851, *(uint32_t*)buf1852); + *(uint3*)buf1853 = rsGetElementAt_uint3(*(rs_allocation*)buf1854, *(uint32_t*)buf1855, *(uint32_t*)buf1856); + *(uint4*)buf1857 = rsGetElementAt_uint4(*(rs_allocation*)buf1858, *(uint32_t*)buf1859, *(uint32_t*)buf1860); + *(long*)buf1861 = rsGetElementAt_long(*(rs_allocation*)buf1862, *(uint32_t*)buf1863, *(uint32_t*)buf1864); + *(long2*)buf1865 = rsGetElementAt_long2(*(rs_allocation*)buf1866, *(uint32_t*)buf1867, *(uint32_t*)buf1868); + *(long3*)buf1869 = rsGetElementAt_long3(*(rs_allocation*)buf1870, *(uint32_t*)buf1871, *(uint32_t*)buf1872); + *(long4*)buf1873 = rsGetElementAt_long4(*(rs_allocation*)buf1874, *(uint32_t*)buf1875, *(uint32_t*)buf1876); + *(ulong*)buf1877 = rsGetElementAt_ulong(*(rs_allocation*)buf1878, *(uint32_t*)buf1879, *(uint32_t*)buf1880); + *(ulong2*)buf1881 = rsGetElementAt_ulong2(*(rs_allocation*)buf1882, *(uint32_t*)buf1883, *(uint32_t*)buf1884); + *(ulong3*)buf1885 = rsGetElementAt_ulong3(*(rs_allocation*)buf1886, *(uint32_t*)buf1887, *(uint32_t*)buf1888); + *(ulong4*)buf1889 = rsGetElementAt_ulong4(*(rs_allocation*)buf1890, *(uint32_t*)buf1891, *(uint32_t*)buf1892); + *(float*)buf1893 = rsGetElementAt_float(*(rs_allocation*)buf1894, *(uint32_t*)buf1895, *(uint32_t*)buf1896, *(uint32_t*)buf1897); + *(float2*)buf1898 = rsGetElementAt_float2(*(rs_allocation*)buf1899, *(uint32_t*)buf1900, *(uint32_t*)buf1901, *(uint32_t*)buf1902); + *(float3*)buf1903 = rsGetElementAt_float3(*(rs_allocation*)buf1904, *(uint32_t*)buf1905, *(uint32_t*)buf1906, *(uint32_t*)buf1907); + *(float4*)buf1908 = rsGetElementAt_float4(*(rs_allocation*)buf1909, *(uint32_t*)buf1910, *(uint32_t*)buf1911, *(uint32_t*)buf1912); + *(double*)buf1913 = rsGetElementAt_double(*(rs_allocation*)buf1914, *(uint32_t*)buf1915, *(uint32_t*)buf1916, *(uint32_t*)buf1917); + *(double2*)buf1918 = rsGetElementAt_double2(*(rs_allocation*)buf1919, *(uint32_t*)buf1920, *(uint32_t*)buf1921, *(uint32_t*)buf1922); + *(double3*)buf1923 = rsGetElementAt_double3(*(rs_allocation*)buf1924, *(uint32_t*)buf1925, *(uint32_t*)buf1926, *(uint32_t*)buf1927); + *(double4*)buf1928 = rsGetElementAt_double4(*(rs_allocation*)buf1929, *(uint32_t*)buf1930, *(uint32_t*)buf1931, *(uint32_t*)buf1932); + *(char*)buf1933 = rsGetElementAt_char(*(rs_allocation*)buf1934, *(uint32_t*)buf1935, *(uint32_t*)buf1936, *(uint32_t*)buf1937); + *(char2*)buf1938 = rsGetElementAt_char2(*(rs_allocation*)buf1939, *(uint32_t*)buf1940, *(uint32_t*)buf1941, *(uint32_t*)buf1942); + *(char3*)buf1943 = rsGetElementAt_char3(*(rs_allocation*)buf1944, *(uint32_t*)buf1945, *(uint32_t*)buf1946, *(uint32_t*)buf1947); + *(char4*)buf1948 = rsGetElementAt_char4(*(rs_allocation*)buf1949, *(uint32_t*)buf1950, *(uint32_t*)buf1951, *(uint32_t*)buf1952); + *(uchar*)buf1953 = rsGetElementAt_uchar(*(rs_allocation*)buf1954, *(uint32_t*)buf1955, *(uint32_t*)buf1956, *(uint32_t*)buf1957); + *(uchar2*)buf1958 = rsGetElementAt_uchar2(*(rs_allocation*)buf1959, *(uint32_t*)buf1960, *(uint32_t*)buf1961, *(uint32_t*)buf1962); + *(uchar3*)buf1963 = rsGetElementAt_uchar3(*(rs_allocation*)buf1964, *(uint32_t*)buf1965, *(uint32_t*)buf1966, *(uint32_t*)buf1967); + *(uchar4*)buf1968 = rsGetElementAt_uchar4(*(rs_allocation*)buf1969, *(uint32_t*)buf1970, *(uint32_t*)buf1971, *(uint32_t*)buf1972); + *(short*)buf1973 = rsGetElementAt_short(*(rs_allocation*)buf1974, *(uint32_t*)buf1975, *(uint32_t*)buf1976, *(uint32_t*)buf1977); + *(short2*)buf1978 = rsGetElementAt_short2(*(rs_allocation*)buf1979, *(uint32_t*)buf1980, *(uint32_t*)buf1981, *(uint32_t*)buf1982); + *(short3*)buf1983 = rsGetElementAt_short3(*(rs_allocation*)buf1984, *(uint32_t*)buf1985, *(uint32_t*)buf1986, *(uint32_t*)buf1987); + *(short4*)buf1988 = rsGetElementAt_short4(*(rs_allocation*)buf1989, *(uint32_t*)buf1990, *(uint32_t*)buf1991, *(uint32_t*)buf1992); + *(ushort*)buf1993 = rsGetElementAt_ushort(*(rs_allocation*)buf1994, *(uint32_t*)buf1995, *(uint32_t*)buf1996, *(uint32_t*)buf1997); + *(ushort2*)buf1998 = rsGetElementAt_ushort2(*(rs_allocation*)buf1999, *(uint32_t*)buf2000, *(uint32_t*)buf2001, *(uint32_t*)buf2002); + *(ushort3*)buf2003 = rsGetElementAt_ushort3(*(rs_allocation*)buf2004, *(uint32_t*)buf2005, *(uint32_t*)buf2006, *(uint32_t*)buf2007); + *(ushort4*)buf2008 = rsGetElementAt_ushort4(*(rs_allocation*)buf2009, *(uint32_t*)buf2010, *(uint32_t*)buf2011, *(uint32_t*)buf2012); + *(int*)buf2013 = rsGetElementAt_int(*(rs_allocation*)buf2014, *(uint32_t*)buf2015, *(uint32_t*)buf2016, *(uint32_t*)buf2017); + *(int2*)buf2018 = rsGetElementAt_int2(*(rs_allocation*)buf2019, *(uint32_t*)buf2020, *(uint32_t*)buf2021, *(uint32_t*)buf2022); + *(int3*)buf2023 = rsGetElementAt_int3(*(rs_allocation*)buf2024, *(uint32_t*)buf2025, *(uint32_t*)buf2026, *(uint32_t*)buf2027); + *(int4*)buf2028 = rsGetElementAt_int4(*(rs_allocation*)buf2029, *(uint32_t*)buf2030, *(uint32_t*)buf2031, *(uint32_t*)buf2032); + *(uint*)buf2033 = rsGetElementAt_uint(*(rs_allocation*)buf2034, *(uint32_t*)buf2035, *(uint32_t*)buf2036, *(uint32_t*)buf2037); + *(uint2*)buf2038 = rsGetElementAt_uint2(*(rs_allocation*)buf2039, *(uint32_t*)buf2040, *(uint32_t*)buf2041, *(uint32_t*)buf2042); + *(uint3*)buf2043 = rsGetElementAt_uint3(*(rs_allocation*)buf2044, *(uint32_t*)buf2045, *(uint32_t*)buf2046, *(uint32_t*)buf2047); + *(uint4*)buf2048 = rsGetElementAt_uint4(*(rs_allocation*)buf2049, *(uint32_t*)buf2050, *(uint32_t*)buf2051, *(uint32_t*)buf2052); + *(long*)buf2053 = rsGetElementAt_long(*(rs_allocation*)buf2054, *(uint32_t*)buf2055, *(uint32_t*)buf2056, *(uint32_t*)buf2057); + *(long2*)buf2058 = rsGetElementAt_long2(*(rs_allocation*)buf2059, *(uint32_t*)buf2060, *(uint32_t*)buf2061, *(uint32_t*)buf2062); + *(long3*)buf2063 = rsGetElementAt_long3(*(rs_allocation*)buf2064, *(uint32_t*)buf2065, *(uint32_t*)buf2066, *(uint32_t*)buf2067); + *(long4*)buf2068 = rsGetElementAt_long4(*(rs_allocation*)buf2069, *(uint32_t*)buf2070, *(uint32_t*)buf2071, *(uint32_t*)buf2072); + *(ulong*)buf2073 = rsGetElementAt_ulong(*(rs_allocation*)buf2074, *(uint32_t*)buf2075, *(uint32_t*)buf2076, *(uint32_t*)buf2077); + *(ulong2*)buf2078 = rsGetElementAt_ulong2(*(rs_allocation*)buf2079, *(uint32_t*)buf2080, *(uint32_t*)buf2081, *(uint32_t*)buf2082); + *(ulong3*)buf2083 = rsGetElementAt_ulong3(*(rs_allocation*)buf2084, *(uint32_t*)buf2085, *(uint32_t*)buf2086, *(uint32_t*)buf2087); + *(ulong4*)buf2088 = rsGetElementAt_ulong4(*(rs_allocation*)buf2089, *(uint32_t*)buf2090, *(uint32_t*)buf2091, *(uint32_t*)buf2092); + *(uchar*)buf2093 = rsGetElementAtYuv_uchar_U(*(rs_allocation*)buf2094, *(uint32_t*)buf2095, *(uint32_t*)buf2096); + *(uchar*)buf2097 = rsGetElementAtYuv_uchar_V(*(rs_allocation*)buf2098, *(uint32_t*)buf2099, *(uint32_t*)buf2100); + *(uchar*)buf2101 = rsGetElementAtYuv_uchar_Y(*(rs_allocation*)buf2102, *(uint32_t*)buf2103, *(uint32_t*)buf2104); + *(bool*)buf2105 = rsIsObject(*(rs_element*)buf2106); + *(bool*)buf2107 = rsIsObject(*(rs_type*)buf2108); + *(bool*)buf2109 = rsIsObject(*(rs_allocation*)buf2110); + *(bool*)buf2111 = rsIsObject(*(rs_sampler*)buf2112); + *(bool*)buf2113 = rsIsObject(*(rs_script*)buf2114); +#ifndef __LP64__ + *(bool*)buf2115 = rsIsObject(*(rs_mesh*)buf2116); + *(bool*)buf2117 = rsIsObject(*(rs_program_fragment*)buf2118); + *(bool*)buf2119 = rsIsObject(*(rs_program_vertex*)buf2120); + *(bool*)buf2121 = rsIsObject(*(rs_program_raster*)buf2122); + *(bool*)buf2123 = rsIsObject(*(rs_program_store*)buf2124); + *(bool*)buf2125 = rsIsObject(*(rs_font*)buf2126); +#endif + *(bool*)buf2127 = rsIsSphereInFrustum((float4*) buf2128, (float4*) buf2129, (float4*) buf2130, (float4*) buf2131, (float4*) buf2132, (float4*) buf2133, (float4*) buf2134); + *(rs_tm**)buf2135 = rsLocaltime((rs_tm*) buf2136, (const rs_time_t*) buf2137); + *(float*)buf2138 = rsMatrixGet((const rs_matrix4x4*) buf2139, *(uint32_t*)buf2140, *(uint32_t*)buf2141); + *(float*)buf2142 = rsMatrixGet((const rs_matrix3x3*) buf2143, *(uint32_t*)buf2144, *(uint32_t*)buf2145); + *(float*)buf2146 = rsMatrixGet((const rs_matrix2x2*) buf2147, *(uint32_t*)buf2148, *(uint32_t*)buf2149); + *(bool*)buf2150 = rsMatrixInverse((rs_matrix4x4*) buf2151); + *(bool*)buf2152 = rsMatrixInverseTranspose((rs_matrix4x4*) buf2153); + rsMatrixLoad((rs_matrix4x4*) buf2154, (const float*) buf2155); + rsMatrixLoad((rs_matrix3x3*) buf2156, (const float*) buf2157); + rsMatrixLoad((rs_matrix2x2*) buf2158, (const float*) buf2159); + rsMatrixLoad((rs_matrix4x4*) buf2160, (const rs_matrix4x4*) buf2161); + rsMatrixLoad((rs_matrix3x3*) buf2162, (const rs_matrix3x3*) buf2163); + rsMatrixLoad((rs_matrix2x2*) buf2164, (const rs_matrix2x2*) buf2165); + rsMatrixLoad((rs_matrix4x4*) buf2166, (const rs_matrix3x3*) buf2167); + rsMatrixLoad((rs_matrix4x4*) buf2168, (const rs_matrix2x2*) buf2169); + rsMatrixLoadFrustum((rs_matrix4x4*) buf2170, *(float*)buf2171, *(float*)buf2172, *(float*)buf2173, *(float*)buf2174, *(float*)buf2175, *(float*)buf2176); + rsMatrixLoadIdentity((rs_matrix4x4*) buf2177); + rsMatrixLoadIdentity((rs_matrix3x3*) buf2178); + rsMatrixLoadIdentity((rs_matrix2x2*) buf2179); + rsMatrixLoadMultiply((rs_matrix4x4*) buf2180, (const rs_matrix4x4*) buf2181, (const rs_matrix4x4*) buf2182); + rsMatrixLoadMultiply((rs_matrix3x3*) buf2183, (const rs_matrix3x3*) buf2184, (const rs_matrix3x3*) buf2185); + rsMatrixLoadMultiply((rs_matrix2x2*) buf2186, (const rs_matrix2x2*) buf2187, (const rs_matrix2x2*) buf2188); + rsMatrixLoadOrtho((rs_matrix4x4*) buf2189, *(float*)buf2190, *(float*)buf2191, *(float*)buf2192, *(float*)buf2193, *(float*)buf2194, *(float*)buf2195); + rsMatrixLoadPerspective((rs_matrix4x4*) buf2196, *(float*)buf2197, *(float*)buf2198, *(float*)buf2199, *(float*)buf2200); + rsMatrixLoadRotate((rs_matrix4x4*) buf2201, *(float*)buf2202, *(float*)buf2203, *(float*)buf2204, *(float*)buf2205); + rsMatrixLoadScale((rs_matrix4x4*) buf2206, *(float*)buf2207, *(float*)buf2208, *(float*)buf2209); + rsMatrixLoadTranslate((rs_matrix4x4*) buf2210, *(float*)buf2211, *(float*)buf2212, *(float*)buf2213); + rsMatrixMultiply((rs_matrix4x4*) buf2214, (const rs_matrix4x4*) buf2215); + rsMatrixMultiply((rs_matrix3x3*) buf2216, (const rs_matrix3x3*) buf2217); + rsMatrixMultiply((rs_matrix2x2*) buf2218, (const rs_matrix2x2*) buf2219); + *(float4*)buf2220 = rsMatrixMultiply((const rs_matrix4x4*) buf2221, *(float4*)buf2222); + *(float4*)buf2223 = rsMatrixMultiply((const rs_matrix4x4*) buf2224, *(float3*)buf2225); + *(float4*)buf2226 = rsMatrixMultiply((const rs_matrix4x4*) buf2227, *(float2*)buf2228); + *(float3*)buf2229 = rsMatrixMultiply((const rs_matrix3x3*) buf2230, *(float3*)buf2231); + *(float3*)buf2232 = rsMatrixMultiply((const rs_matrix3x3*) buf2233, *(float2*)buf2234); + *(float2*)buf2235 = rsMatrixMultiply((const rs_matrix2x2*) buf2236, *(float2*)buf2237); + rsMatrixRotate((rs_matrix4x4*) buf2238, *(float*)buf2239, *(float*)buf2240, *(float*)buf2241, *(float*)buf2242); + rsMatrixScale((rs_matrix4x4*) buf2243, *(float*)buf2244, *(float*)buf2245, *(float*)buf2246); + rsMatrixSet((rs_matrix4x4*) buf2247, *(uint32_t*)buf2248, *(uint32_t*)buf2249, *(float*)buf2250); + rsMatrixSet((rs_matrix3x3*) buf2251, *(uint32_t*)buf2252, *(uint32_t*)buf2253, *(float*)buf2254); + rsMatrixSet((rs_matrix2x2*) buf2255, *(uint32_t*)buf2256, *(uint32_t*)buf2257, *(float*)buf2258); + rsMatrixTranslate((rs_matrix4x4*) buf2259, *(float*)buf2260, *(float*)buf2261, *(float*)buf2262); + rsMatrixTranspose((rs_matrix4x4*) buf2263); + rsMatrixTranspose((rs_matrix3x3*) buf2264); + rsMatrixTranspose((rs_matrix2x2*) buf2265); + *(uchar4*)buf2266 = rsPackColorTo8888(*(float*)buf2267, *(float*)buf2268, *(float*)buf2269); + *(uchar4*)buf2270 = rsPackColorTo8888(*(float*)buf2271, *(float*)buf2272, *(float*)buf2273, *(float*)buf2274); + *(uchar4*)buf2275 = rsPackColorTo8888(*(float3*)buf2276); + *(uchar4*)buf2277 = rsPackColorTo8888(*(float4*)buf2278); + rsQuaternionAdd((rs_quaternion*) buf2279, (const rs_quaternion*) buf2280); + rsQuaternionConjugate((rs_quaternion*) buf2281); + *(float*)buf2282 = rsQuaternionDot((const rs_quaternion*) buf2283, (const rs_quaternion*) buf2284); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2285, (const rs_quaternion*) buf2286); + rsQuaternionLoadRotate((rs_quaternion*) buf2287, *(float*)buf2288, *(float*)buf2289, *(float*)buf2290, *(float*)buf2291); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2292, *(float*)buf2293, *(float*)buf2294, *(float*)buf2295, *(float*)buf2296); + rsQuaternionMultiply((rs_quaternion*) buf2297, *(float*)buf2298); + rsQuaternionMultiply((rs_quaternion*) buf2299, (const rs_quaternion*) buf2300); + rsQuaternionNormalize((rs_quaternion*) buf2301); + rsQuaternionSet((rs_quaternion*) buf2302, *(float*)buf2303, *(float*)buf2304, *(float*)buf2305, *(float*)buf2306); + rsQuaternionSet((rs_quaternion*) buf2307, (const rs_quaternion*) buf2308); + rsQuaternionSlerp((rs_quaternion*) buf2309, (const rs_quaternion*) buf2310, (const rs_quaternion*) buf2311, *(float*)buf2312); + *(int*)buf2313 = rsRand(*(int*)buf2314); + *(int*)buf2315 = rsRand(*(int*)buf2316, *(int*)buf2317); + *(float*)buf2318 = rsRand(*(float*)buf2319); + *(float*)buf2320 = rsRand(*(float*)buf2321, *(float*)buf2322); + *(float4*)buf2323 = rsSample(*(rs_allocation*)buf2324, *(rs_sampler*)buf2325, *(float*)buf2326); + *(float4*)buf2327 = rsSample(*(rs_allocation*)buf2328, *(rs_sampler*)buf2329, *(float*)buf2330, *(float*)buf2331); + *(float4*)buf2332 = rsSample(*(rs_allocation*)buf2333, *(rs_sampler*)buf2334, *(float2*)buf2335); + *(float4*)buf2336 = rsSample(*(rs_allocation*)buf2337, *(rs_sampler*)buf2338, *(float2*)buf2339, *(float*)buf2340); + *(float*)buf2341 = rsSamplerGetAnisotropy(*(rs_sampler*)buf2342); + *(rs_sampler_value*)buf2343 = rsSamplerGetMagnification(*(rs_sampler*)buf2344); + *(rs_sampler_value*)buf2345 = rsSamplerGetMinification(*(rs_sampler*)buf2346); + *(rs_sampler_value*)buf2347 = rsSamplerGetWrapS(*(rs_sampler*)buf2348); + *(rs_sampler_value*)buf2349 = rsSamplerGetWrapT(*(rs_sampler*)buf2350); + *(bool*)buf2351 = rsSendToClient(*(int*)buf2352); + *(bool*)buf2353 = rsSendToClient(*(int*)buf2354, (const void*) buf2355, *(uint*)buf2356); + rsSendToClientBlocking(*(int*)buf2357); + rsSendToClientBlocking(*(int*)buf2358, (const void*) buf2359, *(uint*)buf2360); + rsSetElementAt(*(rs_allocation*)buf2361, (void*) buf2362, *(uint32_t*)buf2363); + rsSetElementAt(*(rs_allocation*)buf2364, (void*) buf2365, *(uint32_t*)buf2366, *(uint32_t*)buf2367); + rsSetElementAt_float(*(rs_allocation*)buf2368, *(float*)buf2369, *(uint32_t*)buf2370); + rsSetElementAt_float2(*(rs_allocation*)buf2371, *(float2*)buf2372, *(uint32_t*)buf2373); + rsSetElementAt_float3(*(rs_allocation*)buf2374, *(float3*)buf2375, *(uint32_t*)buf2376); + rsSetElementAt_float4(*(rs_allocation*)buf2377, *(float4*)buf2378, *(uint32_t*)buf2379); + rsSetElementAt_double(*(rs_allocation*)buf2380, *(double*)buf2381, *(uint32_t*)buf2382); + rsSetElementAt_double2(*(rs_allocation*)buf2383, *(double2*)buf2384, *(uint32_t*)buf2385); + rsSetElementAt_double3(*(rs_allocation*)buf2386, *(double3*)buf2387, *(uint32_t*)buf2388); + rsSetElementAt_double4(*(rs_allocation*)buf2389, *(double4*)buf2390, *(uint32_t*)buf2391); + rsSetElementAt_char(*(rs_allocation*)buf2392, *(char*)buf2393, *(uint32_t*)buf2394); + rsSetElementAt_char2(*(rs_allocation*)buf2395, *(char2*)buf2396, *(uint32_t*)buf2397); + rsSetElementAt_char3(*(rs_allocation*)buf2398, *(char3*)buf2399, *(uint32_t*)buf2400); + rsSetElementAt_char4(*(rs_allocation*)buf2401, *(char4*)buf2402, *(uint32_t*)buf2403); + rsSetElementAt_uchar(*(rs_allocation*)buf2404, *(uchar*)buf2405, *(uint32_t*)buf2406); + rsSetElementAt_uchar2(*(rs_allocation*)buf2407, *(uchar2*)buf2408, *(uint32_t*)buf2409); + rsSetElementAt_uchar3(*(rs_allocation*)buf2410, *(uchar3*)buf2411, *(uint32_t*)buf2412); + rsSetElementAt_uchar4(*(rs_allocation*)buf2413, *(uchar4*)buf2414, *(uint32_t*)buf2415); + rsSetElementAt_short(*(rs_allocation*)buf2416, *(short*)buf2417, *(uint32_t*)buf2418); + rsSetElementAt_short2(*(rs_allocation*)buf2419, *(short2*)buf2420, *(uint32_t*)buf2421); + rsSetElementAt_short3(*(rs_allocation*)buf2422, *(short3*)buf2423, *(uint32_t*)buf2424); + rsSetElementAt_short4(*(rs_allocation*)buf2425, *(short4*)buf2426, *(uint32_t*)buf2427); + rsSetElementAt_ushort(*(rs_allocation*)buf2428, *(ushort*)buf2429, *(uint32_t*)buf2430); + rsSetElementAt_ushort2(*(rs_allocation*)buf2431, *(ushort2*)buf2432, *(uint32_t*)buf2433); + rsSetElementAt_ushort3(*(rs_allocation*)buf2434, *(ushort3*)buf2435, *(uint32_t*)buf2436); + rsSetElementAt_ushort4(*(rs_allocation*)buf2437, *(ushort4*)buf2438, *(uint32_t*)buf2439); + rsSetElementAt_int(*(rs_allocation*)buf2440, *(int*)buf2441, *(uint32_t*)buf2442); + rsSetElementAt_int2(*(rs_allocation*)buf2443, *(int2*)buf2444, *(uint32_t*)buf2445); + rsSetElementAt_int3(*(rs_allocation*)buf2446, *(int3*)buf2447, *(uint32_t*)buf2448); + rsSetElementAt_int4(*(rs_allocation*)buf2449, *(int4*)buf2450, *(uint32_t*)buf2451); + rsSetElementAt_uint(*(rs_allocation*)buf2452, *(uint*)buf2453, *(uint32_t*)buf2454); + rsSetElementAt_uint2(*(rs_allocation*)buf2455, *(uint2*)buf2456, *(uint32_t*)buf2457); + rsSetElementAt_uint3(*(rs_allocation*)buf2458, *(uint3*)buf2459, *(uint32_t*)buf2460); + rsSetElementAt_uint4(*(rs_allocation*)buf2461, *(uint4*)buf2462, *(uint32_t*)buf2463); + rsSetElementAt_long(*(rs_allocation*)buf2464, *(long*)buf2465, *(uint32_t*)buf2466); + rsSetElementAt_long2(*(rs_allocation*)buf2467, *(long2*)buf2468, *(uint32_t*)buf2469); + rsSetElementAt_long3(*(rs_allocation*)buf2470, *(long3*)buf2471, *(uint32_t*)buf2472); + rsSetElementAt_long4(*(rs_allocation*)buf2473, *(long4*)buf2474, *(uint32_t*)buf2475); + rsSetElementAt_ulong(*(rs_allocation*)buf2476, *(ulong*)buf2477, *(uint32_t*)buf2478); + rsSetElementAt_ulong2(*(rs_allocation*)buf2479, *(ulong2*)buf2480, *(uint32_t*)buf2481); + rsSetElementAt_ulong3(*(rs_allocation*)buf2482, *(ulong3*)buf2483, *(uint32_t*)buf2484); + rsSetElementAt_ulong4(*(rs_allocation*)buf2485, *(ulong4*)buf2486, *(uint32_t*)buf2487); + rsSetElementAt_float(*(rs_allocation*)buf2488, *(float*)buf2489, *(uint32_t*)buf2490, *(uint32_t*)buf2491); + rsSetElementAt_float2(*(rs_allocation*)buf2492, *(float2*)buf2493, *(uint32_t*)buf2494, *(uint32_t*)buf2495); + rsSetElementAt_float3(*(rs_allocation*)buf2496, *(float3*)buf2497, *(uint32_t*)buf2498, *(uint32_t*)buf2499); + rsSetElementAt_float4(*(rs_allocation*)buf2500, *(float4*)buf2501, *(uint32_t*)buf2502, *(uint32_t*)buf2503); + rsSetElementAt_double(*(rs_allocation*)buf2504, *(double*)buf2505, *(uint32_t*)buf2506, *(uint32_t*)buf2507); + rsSetElementAt_double2(*(rs_allocation*)buf2508, *(double2*)buf2509, *(uint32_t*)buf2510, *(uint32_t*)buf2511); + rsSetElementAt_double3(*(rs_allocation*)buf2512, *(double3*)buf2513, *(uint32_t*)buf2514, *(uint32_t*)buf2515); + rsSetElementAt_double4(*(rs_allocation*)buf2516, *(double4*)buf2517, *(uint32_t*)buf2518, *(uint32_t*)buf2519); + rsSetElementAt_char(*(rs_allocation*)buf2520, *(char*)buf2521, *(uint32_t*)buf2522, *(uint32_t*)buf2523); + rsSetElementAt_char2(*(rs_allocation*)buf2524, *(char2*)buf2525, *(uint32_t*)buf2526, *(uint32_t*)buf2527); + rsSetElementAt_char3(*(rs_allocation*)buf2528, *(char3*)buf2529, *(uint32_t*)buf2530, *(uint32_t*)buf2531); + rsSetElementAt_char4(*(rs_allocation*)buf2532, *(char4*)buf2533, *(uint32_t*)buf2534, *(uint32_t*)buf2535); + rsSetElementAt_uchar(*(rs_allocation*)buf2536, *(uchar*)buf2537, *(uint32_t*)buf2538, *(uint32_t*)buf2539); + rsSetElementAt_uchar2(*(rs_allocation*)buf2540, *(uchar2*)buf2541, *(uint32_t*)buf2542, *(uint32_t*)buf2543); + rsSetElementAt_uchar3(*(rs_allocation*)buf2544, *(uchar3*)buf2545, *(uint32_t*)buf2546, *(uint32_t*)buf2547); + rsSetElementAt_uchar4(*(rs_allocation*)buf2548, *(uchar4*)buf2549, *(uint32_t*)buf2550, *(uint32_t*)buf2551); + rsSetElementAt_short(*(rs_allocation*)buf2552, *(short*)buf2553, *(uint32_t*)buf2554, *(uint32_t*)buf2555); + rsSetElementAt_short2(*(rs_allocation*)buf2556, *(short2*)buf2557, *(uint32_t*)buf2558, *(uint32_t*)buf2559); + rsSetElementAt_short3(*(rs_allocation*)buf2560, *(short3*)buf2561, *(uint32_t*)buf2562, *(uint32_t*)buf2563); + rsSetElementAt_short4(*(rs_allocation*)buf2564, *(short4*)buf2565, *(uint32_t*)buf2566, *(uint32_t*)buf2567); + rsSetElementAt_ushort(*(rs_allocation*)buf2568, *(ushort*)buf2569, *(uint32_t*)buf2570, *(uint32_t*)buf2571); + rsSetElementAt_ushort2(*(rs_allocation*)buf2572, *(ushort2*)buf2573, *(uint32_t*)buf2574, *(uint32_t*)buf2575); + rsSetElementAt_ushort3(*(rs_allocation*)buf2576, *(ushort3*)buf2577, *(uint32_t*)buf2578, *(uint32_t*)buf2579); + rsSetElementAt_ushort4(*(rs_allocation*)buf2580, *(ushort4*)buf2581, *(uint32_t*)buf2582, *(uint32_t*)buf2583); + rsSetElementAt_int(*(rs_allocation*)buf2584, *(int*)buf2585, *(uint32_t*)buf2586, *(uint32_t*)buf2587); + rsSetElementAt_int2(*(rs_allocation*)buf2588, *(int2*)buf2589, *(uint32_t*)buf2590, *(uint32_t*)buf2591); + rsSetElementAt_int3(*(rs_allocation*)buf2592, *(int3*)buf2593, *(uint32_t*)buf2594, *(uint32_t*)buf2595); + rsSetElementAt_int4(*(rs_allocation*)buf2596, *(int4*)buf2597, *(uint32_t*)buf2598, *(uint32_t*)buf2599); + rsSetElementAt_uint(*(rs_allocation*)buf2600, *(uint*)buf2601, *(uint32_t*)buf2602, *(uint32_t*)buf2603); + rsSetElementAt_uint2(*(rs_allocation*)buf2604, *(uint2*)buf2605, *(uint32_t*)buf2606, *(uint32_t*)buf2607); + rsSetElementAt_uint3(*(rs_allocation*)buf2608, *(uint3*)buf2609, *(uint32_t*)buf2610, *(uint32_t*)buf2611); + rsSetElementAt_uint4(*(rs_allocation*)buf2612, *(uint4*)buf2613, *(uint32_t*)buf2614, *(uint32_t*)buf2615); + rsSetElementAt_long(*(rs_allocation*)buf2616, *(long*)buf2617, *(uint32_t*)buf2618, *(uint32_t*)buf2619); + rsSetElementAt_long2(*(rs_allocation*)buf2620, *(long2*)buf2621, *(uint32_t*)buf2622, *(uint32_t*)buf2623); + rsSetElementAt_long3(*(rs_allocation*)buf2624, *(long3*)buf2625, *(uint32_t*)buf2626, *(uint32_t*)buf2627); + rsSetElementAt_long4(*(rs_allocation*)buf2628, *(long4*)buf2629, *(uint32_t*)buf2630, *(uint32_t*)buf2631); + rsSetElementAt_ulong(*(rs_allocation*)buf2632, *(ulong*)buf2633, *(uint32_t*)buf2634, *(uint32_t*)buf2635); + rsSetElementAt_ulong2(*(rs_allocation*)buf2636, *(ulong2*)buf2637, *(uint32_t*)buf2638, *(uint32_t*)buf2639); + rsSetElementAt_ulong3(*(rs_allocation*)buf2640, *(ulong3*)buf2641, *(uint32_t*)buf2642, *(uint32_t*)buf2643); + rsSetElementAt_ulong4(*(rs_allocation*)buf2644, *(ulong4*)buf2645, *(uint32_t*)buf2646, *(uint32_t*)buf2647); + rsSetElementAt_float(*(rs_allocation*)buf2648, *(float*)buf2649, *(uint32_t*)buf2650, *(uint32_t*)buf2651, *(uint32_t*)buf2652); + rsSetElementAt_float2(*(rs_allocation*)buf2653, *(float2*)buf2654, *(uint32_t*)buf2655, *(uint32_t*)buf2656, *(uint32_t*)buf2657); + rsSetElementAt_float3(*(rs_allocation*)buf2658, *(float3*)buf2659, *(uint32_t*)buf2660, *(uint32_t*)buf2661, *(uint32_t*)buf2662); + rsSetElementAt_float4(*(rs_allocation*)buf2663, *(float4*)buf2664, *(uint32_t*)buf2665, *(uint32_t*)buf2666, *(uint32_t*)buf2667); + rsSetElementAt_double(*(rs_allocation*)buf2668, *(double*)buf2669, *(uint32_t*)buf2670, *(uint32_t*)buf2671, *(uint32_t*)buf2672); + rsSetElementAt_double2(*(rs_allocation*)buf2673, *(double2*)buf2674, *(uint32_t*)buf2675, *(uint32_t*)buf2676, *(uint32_t*)buf2677); + rsSetElementAt_double3(*(rs_allocation*)buf2678, *(double3*)buf2679, *(uint32_t*)buf2680, *(uint32_t*)buf2681, *(uint32_t*)buf2682); + rsSetElementAt_double4(*(rs_allocation*)buf2683, *(double4*)buf2684, *(uint32_t*)buf2685, *(uint32_t*)buf2686, *(uint32_t*)buf2687); + rsSetElementAt_char(*(rs_allocation*)buf2688, *(char*)buf2689, *(uint32_t*)buf2690, *(uint32_t*)buf2691, *(uint32_t*)buf2692); + rsSetElementAt_char2(*(rs_allocation*)buf2693, *(char2*)buf2694, *(uint32_t*)buf2695, *(uint32_t*)buf2696, *(uint32_t*)buf2697); + rsSetElementAt_char3(*(rs_allocation*)buf2698, *(char3*)buf2699, *(uint32_t*)buf2700, *(uint32_t*)buf2701, *(uint32_t*)buf2702); + rsSetElementAt_char4(*(rs_allocation*)buf2703, *(char4*)buf2704, *(uint32_t*)buf2705, *(uint32_t*)buf2706, *(uint32_t*)buf2707); + rsSetElementAt_uchar(*(rs_allocation*)buf2708, *(uchar*)buf2709, *(uint32_t*)buf2710, *(uint32_t*)buf2711, *(uint32_t*)buf2712); + rsSetElementAt_uchar2(*(rs_allocation*)buf2713, *(uchar2*)buf2714, *(uint32_t*)buf2715, *(uint32_t*)buf2716, *(uint32_t*)buf2717); + rsSetElementAt_uchar3(*(rs_allocation*)buf2718, *(uchar3*)buf2719, *(uint32_t*)buf2720, *(uint32_t*)buf2721, *(uint32_t*)buf2722); + rsSetElementAt_uchar4(*(rs_allocation*)buf2723, *(uchar4*)buf2724, *(uint32_t*)buf2725, *(uint32_t*)buf2726, *(uint32_t*)buf2727); + rsSetElementAt_short(*(rs_allocation*)buf2728, *(short*)buf2729, *(uint32_t*)buf2730, *(uint32_t*)buf2731, *(uint32_t*)buf2732); + rsSetElementAt_short2(*(rs_allocation*)buf2733, *(short2*)buf2734, *(uint32_t*)buf2735, *(uint32_t*)buf2736, *(uint32_t*)buf2737); + rsSetElementAt_short3(*(rs_allocation*)buf2738, *(short3*)buf2739, *(uint32_t*)buf2740, *(uint32_t*)buf2741, *(uint32_t*)buf2742); + rsSetElementAt_short4(*(rs_allocation*)buf2743, *(short4*)buf2744, *(uint32_t*)buf2745, *(uint32_t*)buf2746, *(uint32_t*)buf2747); + rsSetElementAt_ushort(*(rs_allocation*)buf2748, *(ushort*)buf2749, *(uint32_t*)buf2750, *(uint32_t*)buf2751, *(uint32_t*)buf2752); + rsSetElementAt_ushort2(*(rs_allocation*)buf2753, *(ushort2*)buf2754, *(uint32_t*)buf2755, *(uint32_t*)buf2756, *(uint32_t*)buf2757); + rsSetElementAt_ushort3(*(rs_allocation*)buf2758, *(ushort3*)buf2759, *(uint32_t*)buf2760, *(uint32_t*)buf2761, *(uint32_t*)buf2762); + rsSetElementAt_ushort4(*(rs_allocation*)buf2763, *(ushort4*)buf2764, *(uint32_t*)buf2765, *(uint32_t*)buf2766, *(uint32_t*)buf2767); + rsSetElementAt_int(*(rs_allocation*)buf2768, *(int*)buf2769, *(uint32_t*)buf2770, *(uint32_t*)buf2771, *(uint32_t*)buf2772); + rsSetElementAt_int2(*(rs_allocation*)buf2773, *(int2*)buf2774, *(uint32_t*)buf2775, *(uint32_t*)buf2776, *(uint32_t*)buf2777); + rsSetElementAt_int3(*(rs_allocation*)buf2778, *(int3*)buf2779, *(uint32_t*)buf2780, *(uint32_t*)buf2781, *(uint32_t*)buf2782); + rsSetElementAt_int4(*(rs_allocation*)buf2783, *(int4*)buf2784, *(uint32_t*)buf2785, *(uint32_t*)buf2786, *(uint32_t*)buf2787); + rsSetElementAt_uint(*(rs_allocation*)buf2788, *(uint*)buf2789, *(uint32_t*)buf2790, *(uint32_t*)buf2791, *(uint32_t*)buf2792); + rsSetElementAt_uint2(*(rs_allocation*)buf2793, *(uint2*)buf2794, *(uint32_t*)buf2795, *(uint32_t*)buf2796, *(uint32_t*)buf2797); + rsSetElementAt_uint3(*(rs_allocation*)buf2798, *(uint3*)buf2799, *(uint32_t*)buf2800, *(uint32_t*)buf2801, *(uint32_t*)buf2802); + rsSetElementAt_uint4(*(rs_allocation*)buf2803, *(uint4*)buf2804, *(uint32_t*)buf2805, *(uint32_t*)buf2806, *(uint32_t*)buf2807); + rsSetElementAt_long(*(rs_allocation*)buf2808, *(long*)buf2809, *(uint32_t*)buf2810, *(uint32_t*)buf2811, *(uint32_t*)buf2812); + rsSetElementAt_long2(*(rs_allocation*)buf2813, *(long2*)buf2814, *(uint32_t*)buf2815, *(uint32_t*)buf2816, *(uint32_t*)buf2817); + rsSetElementAt_long3(*(rs_allocation*)buf2818, *(long3*)buf2819, *(uint32_t*)buf2820, *(uint32_t*)buf2821, *(uint32_t*)buf2822); + rsSetElementAt_long4(*(rs_allocation*)buf2823, *(long4*)buf2824, *(uint32_t*)buf2825, *(uint32_t*)buf2826, *(uint32_t*)buf2827); + rsSetElementAt_ulong(*(rs_allocation*)buf2828, *(ulong*)buf2829, *(uint32_t*)buf2830, *(uint32_t*)buf2831, *(uint32_t*)buf2832); + rsSetElementAt_ulong2(*(rs_allocation*)buf2833, *(ulong2*)buf2834, *(uint32_t*)buf2835, *(uint32_t*)buf2836, *(uint32_t*)buf2837); + rsSetElementAt_ulong3(*(rs_allocation*)buf2838, *(ulong3*)buf2839, *(uint32_t*)buf2840, *(uint32_t*)buf2841, *(uint32_t*)buf2842); + rsSetElementAt_ulong4(*(rs_allocation*)buf2843, *(ulong4*)buf2844, *(uint32_t*)buf2845, *(uint32_t*)buf2846, *(uint32_t*)buf2847); + rsSetObject((rs_element*) buf2848, *(rs_element*)buf2849); + rsSetObject((rs_type*) buf2850, *(rs_type*)buf2851); + rsSetObject((rs_allocation*) buf2852, *(rs_allocation*)buf2853); + rsSetObject((rs_sampler*) buf2854, *(rs_sampler*)buf2855); + rsSetObject((rs_script*) buf2856, *(rs_script*)buf2857); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf2858, *(rs_mesh*)buf2859); + rsSetObject((rs_program_fragment*) buf2860, *(rs_program_fragment*)buf2861); + rsSetObject((rs_program_vertex*) buf2862, *(rs_program_vertex*)buf2863); + rsSetObject((rs_program_raster*) buf2864, *(rs_program_raster*)buf2865); + rsSetObject((rs_program_store*) buf2866, *(rs_program_store*)buf2867); + rsSetObject((rs_font*) buf2868, *(rs_font*)buf2869); +#endif + *(rs_time_t*)buf2870 = rsTime((rs_time_t*) buf2871); + *(float4*)buf2872 = rsUnpackColor8888(*(uchar4*)buf2873); + *(int64_t*)buf2874 = rsUptimeMillis(); + *(int64_t*)buf2875 = rsUptimeNanos(); + *(float4*)buf2876 = rsYuvToRGBA_float4(*(uchar*)buf2877, *(uchar*)buf2878, *(uchar*)buf2879); + *(uchar4*)buf2880 = rsYuvToRGBA_uchar4(*(uchar*)buf2881, *(uchar*)buf2882, *(uchar*)buf2883); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2884); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf2885, *(rs_allocation_usage_type*)buf2886); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf2887, *(uint*)buf2888); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf2889, *(uint*)buf2890, *(rs_allocation*)buf2891); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf2892, *(uint*)buf2893, *(rs_allocation*)buf2894); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf2895); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf2896); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf2897); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf2898); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf2899); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf2900); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf2901, *(uint*)buf2902, *(rs_sampler*)buf2903); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf2904, *(uint*)buf2905, *(rs_allocation*)buf2906); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf2907, *(float*)buf2908, *(float*)buf2909, *(float*)buf2910); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf2911); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf2912); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2913); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2914, *(uint*)buf2915); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf2916, *(uint*)buf2917, *(uint*)buf2918, *(uint*)buf2919); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf2920, *(float*)buf2921, *(float*)buf2922, *(float*)buf2923, *(float*)buf2924, *(float*)buf2925, *(float*)buf2926, *(float*)buf2927, *(float*)buf2928, *(float*)buf2929, *(float*)buf2930, *(float*)buf2931); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf2932, *(float*)buf2933, *(float*)buf2934, *(float*)buf2935, *(float*)buf2936, *(float*)buf2937, *(float*)buf2938, *(float*)buf2939, *(float*)buf2940, *(float*)buf2941, *(float*)buf2942, *(float*)buf2943, *(float*)buf2944, *(float*)buf2945, *(float*)buf2946, *(float*)buf2947, *(float*)buf2948, *(float*)buf2949, *(float*)buf2950, *(float*)buf2951); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf2952, *(float*)buf2953, *(float*)buf2954, *(float*)buf2955, *(float*)buf2956); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf2957, *(float*)buf2958, *(float*)buf2959, *(float*)buf2960, *(float*)buf2961); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf2962, *(int*)buf2963, *(int*)buf2964); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf2965, *(int*)buf2966, *(int*)buf2967); +#endif +#ifndef __LP64__ + *(uint*)buf2968 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf2969, *(float*)buf2970, *(float*)buf2971, *(float*)buf2972); +#endif +#ifndef __LP64__ + *(uint*)buf2973 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf2974 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf2975, (int*) buf2976, (int*) buf2977, (int*) buf2978, (int*) buf2979); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf2980, (int*) buf2981, (int*) buf2982, (int*) buf2983, (int*) buf2984); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2985, (float*) buf2986, (float*) buf2987, (float*) buf2988, (float*) buf2989, (float*) buf2990, (float*) buf2991); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf2992, (float3*) buf2993, (float3*) buf2994); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf2995 = rsgMeshGetIndexAllocation(*(rs_mesh*)buf2996, *(uint32_t*)buf2997); +#endif +#ifndef __LP64__ + *(rs_primitive*)buf2998 = rsgMeshGetPrimitive(*(rs_mesh*)buf2999, *(uint32_t*)buf3000); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3001 = rsgMeshGetPrimitiveCount(*(rs_mesh*)buf3002); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf3003 = rsgMeshGetVertexAllocation(*(rs_mesh*)buf3004, *(uint32_t*)buf3005); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3006 = rsgMeshGetVertexAllocationCount(*(rs_mesh*)buf3007); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf3008, *(float*)buf3009, *(float*)buf3010, *(float*)buf3011, *(float*)buf3012); +#endif +#ifndef __LP64__ + *(rs_cull_mode*)buf3013 = rsgProgramRasterGetCullMode(*(rs_program_raster*)buf3014); +#endif +#ifndef __LP64__ + *(bool*)buf3015 = rsgProgramRasterIsPointSpriteEnabled(*(rs_program_raster*)buf3016); +#endif +#ifndef __LP64__ + *(rs_blend_dst_func*)buf3017 = rsgProgramStoreGetBlendDstFunc(*(rs_program_store*)buf3018); +#endif +#ifndef __LP64__ + *(rs_blend_src_func*)buf3019 = rsgProgramStoreGetBlendSrcFunc(*(rs_program_store*)buf3020); +#endif +#ifndef __LP64__ + *(rs_depth_func*)buf3021 = rsgProgramStoreGetDepthFunc(*(rs_program_store*)buf3022); +#endif +#ifndef __LP64__ + *(bool*)buf3023 = rsgProgramStoreIsColorMaskAlphaEnabled(*(rs_program_store*)buf3024); +#endif +#ifndef __LP64__ + *(bool*)buf3025 = rsgProgramStoreIsColorMaskBlueEnabled(*(rs_program_store*)buf3026); +#endif +#ifndef __LP64__ + *(bool*)buf3027 = rsgProgramStoreIsColorMaskGreenEnabled(*(rs_program_store*)buf3028); +#endif +#ifndef __LP64__ + *(bool*)buf3029 = rsgProgramStoreIsColorMaskRedEnabled(*(rs_program_store*)buf3030); +#endif +#ifndef __LP64__ + *(bool*)buf3031 = rsgProgramStoreIsDepthMaskEnabled(*(rs_program_store*)buf3032); +#endif +#ifndef __LP64__ + *(bool*)buf3033 = rsgProgramStoreIsDitherEnabled(*(rs_program_store*)buf3034); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf3035); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf3036); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf3037); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf3038); +#endif + *(float*)buf3039 = rsqrt(*(float*)buf3040); + *(float2*)buf3041 = rsqrt(*(float2*)buf3042); + *(float3*)buf3043 = rsqrt(*(float3*)buf3044); + *(float4*)buf3045 = rsqrt(*(float4*)buf3046); + *(float*)buf3047 = sign(*(float*)buf3048); + *(float2*)buf3049 = sign(*(float2*)buf3050); + *(float3*)buf3051 = sign(*(float3*)buf3052); + *(float4*)buf3053 = sign(*(float4*)buf3054); + *(float*)buf3055 = sin(*(float*)buf3056); + *(float2*)buf3057 = sin(*(float2*)buf3058); + *(float3*)buf3059 = sin(*(float3*)buf3060); + *(float4*)buf3061 = sin(*(float4*)buf3062); + *(float*)buf3063 = sincos(*(float*)buf3064, (float*) buf3065); + *(float2*)buf3066 = sincos(*(float2*)buf3067, (float2*) buf3068); + *(float3*)buf3069 = sincos(*(float3*)buf3070, (float3*) buf3071); + *(float4*)buf3072 = sincos(*(float4*)buf3073, (float4*) buf3074); + *(float*)buf3075 = sinh(*(float*)buf3076); + *(float2*)buf3077 = sinh(*(float2*)buf3078); + *(float3*)buf3079 = sinh(*(float3*)buf3080); + *(float4*)buf3081 = sinh(*(float4*)buf3082); + *(float*)buf3083 = sinpi(*(float*)buf3084); + *(float2*)buf3085 = sinpi(*(float2*)buf3086); + *(float3*)buf3087 = sinpi(*(float3*)buf3088); + *(float4*)buf3089 = sinpi(*(float4*)buf3090); + *(float*)buf3091 = sqrt(*(float*)buf3092); + *(float2*)buf3093 = sqrt(*(float2*)buf3094); + *(float3*)buf3095 = sqrt(*(float3*)buf3096); + *(float4*)buf3097 = sqrt(*(float4*)buf3098); + *(float*)buf3099 = step(*(float*)buf3100, *(float*)buf3101); + *(float2*)buf3102 = step(*(float2*)buf3103, *(float2*)buf3104); + *(float3*)buf3105 = step(*(float3*)buf3106, *(float3*)buf3107); + *(float4*)buf3108 = step(*(float4*)buf3109, *(float4*)buf3110); + *(float2*)buf3111 = step(*(float2*)buf3112, *(float*)buf3113); + *(float3*)buf3114 = step(*(float3*)buf3115, *(float*)buf3116); + *(float4*)buf3117 = step(*(float4*)buf3118, *(float*)buf3119); + *(float*)buf3120 = tan(*(float*)buf3121); + *(float2*)buf3122 = tan(*(float2*)buf3123); + *(float3*)buf3124 = tan(*(float3*)buf3125); + *(float4*)buf3126 = tan(*(float4*)buf3127); + *(float*)buf3128 = tanh(*(float*)buf3129); + *(float2*)buf3130 = tanh(*(float2*)buf3131); + *(float3*)buf3132 = tanh(*(float3*)buf3133); + *(float4*)buf3134 = tanh(*(float4*)buf3135); + *(float*)buf3136 = tanpi(*(float*)buf3137); + *(float2*)buf3138 = tanpi(*(float2*)buf3139); + *(float3*)buf3140 = tanpi(*(float3*)buf3141); + *(float4*)buf3142 = tanpi(*(float4*)buf3143); + *(float*)buf3144 = tgamma(*(float*)buf3145); + *(float2*)buf3146 = tgamma(*(float2*)buf3147); + *(float3*)buf3148 = tgamma(*(float3*)buf3149); + *(float4*)buf3150 = tgamma(*(float4*)buf3151); + *(float*)buf3152 = trunc(*(float*)buf3153); + *(float2*)buf3154 = trunc(*(float2*)buf3155); + *(float3*)buf3156 = trunc(*(float3*)buf3157); + *(float4*)buf3158 = trunc(*(float4*)buf3159); +}
diff --git a/slang/tests/P_all_api_18/stderr.txt.expect b/slang/tests/P_all_api_18/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_18/stderr.txt.expect
diff --git a/slang/tests/P_all_api_18/stdout.txt.expect b/slang/tests/P_all_api_18/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_18/stdout.txt.expect
diff --git a/slang/tests/P_all_api_19/all19.rs b/slang/tests/P_all_api_19/all19.rs new file mode 100644 index 0000000..da44c86 --- /dev/null +++ b/slang/tests/P_all_api_19/all19.rs
@@ -0,0 +1,4716 @@ +// -target-api 19 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; +char buf2493[200]; +char buf2494[200]; +char buf2495[200]; +char buf2496[200]; +char buf2497[200]; +char buf2498[200]; +char buf2499[200]; +char buf2500[200]; +char buf2501[200]; +char buf2502[200]; +char buf2503[200]; +char buf2504[200]; +char buf2505[200]; +char buf2506[200]; +char buf2507[200]; +char buf2508[200]; +char buf2509[200]; +char buf2510[200]; +char buf2511[200]; +char buf2512[200]; +char buf2513[200]; +char buf2514[200]; +char buf2515[200]; +char buf2516[200]; +char buf2517[200]; +char buf2518[200]; +char buf2519[200]; +char buf2520[200]; +char buf2521[200]; +char buf2522[200]; +char buf2523[200]; +char buf2524[200]; +char buf2525[200]; +char buf2526[200]; +char buf2527[200]; +char buf2528[200]; +char buf2529[200]; +char buf2530[200]; +char buf2531[200]; +char buf2532[200]; +char buf2533[200]; +char buf2534[200]; +char buf2535[200]; +char buf2536[200]; +char buf2537[200]; +char buf2538[200]; +char buf2539[200]; +char buf2540[200]; +char buf2541[200]; +char buf2542[200]; +char buf2543[200]; +char buf2544[200]; +char buf2545[200]; +char buf2546[200]; +char buf2547[200]; +char buf2548[200]; +char buf2549[200]; +char buf2550[200]; +char buf2551[200]; +char buf2552[200]; +char buf2553[200]; +char buf2554[200]; +char buf2555[200]; +char buf2556[200]; +char buf2557[200]; +char buf2558[200]; +char buf2559[200]; +char buf2560[200]; +char buf2561[200]; +char buf2562[200]; +char buf2563[200]; +char buf2564[200]; +char buf2565[200]; +char buf2566[200]; +char buf2567[200]; +char buf2568[200]; +char buf2569[200]; +char buf2570[200]; +char buf2571[200]; +char buf2572[200]; +char buf2573[200]; +char buf2574[200]; +char buf2575[200]; +char buf2576[200]; +char buf2577[200]; +char buf2578[200]; +char buf2579[200]; +char buf2580[200]; +char buf2581[200]; +char buf2582[200]; +char buf2583[200]; +char buf2584[200]; +char buf2585[200]; +char buf2586[200]; +char buf2587[200]; +char buf2588[200]; +char buf2589[200]; +char buf2590[200]; +char buf2591[200]; +char buf2592[200]; +char buf2593[200]; +char buf2594[200]; +char buf2595[200]; +char buf2596[200]; +char buf2597[200]; +char buf2598[200]; +char buf2599[200]; +char buf2600[200]; +char buf2601[200]; +char buf2602[200]; +char buf2603[200]; +char buf2604[200]; +char buf2605[200]; +char buf2606[200]; +char buf2607[200]; +char buf2608[200]; +char buf2609[200]; +char buf2610[200]; +char buf2611[200]; +char buf2612[200]; +char buf2613[200]; +char buf2614[200]; +char buf2615[200]; +char buf2616[200]; +char buf2617[200]; +char buf2618[200]; +char buf2619[200]; +char buf2620[200]; +char buf2621[200]; +char buf2622[200]; +char buf2623[200]; +char buf2624[200]; +char buf2625[200]; +char buf2626[200]; +char buf2627[200]; +char buf2628[200]; +char buf2629[200]; +char buf2630[200]; +char buf2631[200]; +char buf2632[200]; +char buf2633[200]; +char buf2634[200]; +char buf2635[200]; +char buf2636[200]; +char buf2637[200]; +char buf2638[200]; +char buf2639[200]; +char buf2640[200]; +char buf2641[200]; +char buf2642[200]; +char buf2643[200]; +char buf2644[200]; +char buf2645[200]; +char buf2646[200]; +char buf2647[200]; +char buf2648[200]; +char buf2649[200]; +char buf2650[200]; +char buf2651[200]; +char buf2652[200]; +char buf2653[200]; +char buf2654[200]; +char buf2655[200]; +char buf2656[200]; +char buf2657[200]; +char buf2658[200]; +char buf2659[200]; +char buf2660[200]; +char buf2661[200]; +char buf2662[200]; +char buf2663[200]; +char buf2664[200]; +char buf2665[200]; +char buf2666[200]; +char buf2667[200]; +char buf2668[200]; +char buf2669[200]; +char buf2670[200]; +char buf2671[200]; +char buf2672[200]; +char buf2673[200]; +char buf2674[200]; +char buf2675[200]; +char buf2676[200]; +char buf2677[200]; +char buf2678[200]; +char buf2679[200]; +char buf2680[200]; +char buf2681[200]; +char buf2682[200]; +char buf2683[200]; +char buf2684[200]; +char buf2685[200]; +char buf2686[200]; +char buf2687[200]; +char buf2688[200]; +char buf2689[200]; +char buf2690[200]; +char buf2691[200]; +char buf2692[200]; +char buf2693[200]; +char buf2694[200]; +char buf2695[200]; +char buf2696[200]; +char buf2697[200]; +char buf2698[200]; +char buf2699[200]; +char buf2700[200]; +char buf2701[200]; +char buf2702[200]; +char buf2703[200]; +char buf2704[200]; +char buf2705[200]; +char buf2706[200]; +char buf2707[200]; +char buf2708[200]; +char buf2709[200]; +char buf2710[200]; +char buf2711[200]; +char buf2712[200]; +char buf2713[200]; +char buf2714[200]; +char buf2715[200]; +char buf2716[200]; +char buf2717[200]; +char buf2718[200]; +char buf2719[200]; +char buf2720[200]; +char buf2721[200]; +char buf2722[200]; +char buf2723[200]; +char buf2724[200]; +char buf2725[200]; +char buf2726[200]; +char buf2727[200]; +char buf2728[200]; +char buf2729[200]; +char buf2730[200]; +char buf2731[200]; +char buf2732[200]; +char buf2733[200]; +char buf2734[200]; +char buf2735[200]; +char buf2736[200]; +char buf2737[200]; +char buf2738[200]; +char buf2739[200]; +char buf2740[200]; +char buf2741[200]; +char buf2742[200]; +char buf2743[200]; +char buf2744[200]; +char buf2745[200]; +char buf2746[200]; +char buf2747[200]; +char buf2748[200]; +char buf2749[200]; +char buf2750[200]; +char buf2751[200]; +char buf2752[200]; +char buf2753[200]; +char buf2754[200]; +char buf2755[200]; +char buf2756[200]; +char buf2757[200]; +char buf2758[200]; +char buf2759[200]; +char buf2760[200]; +char buf2761[200]; +char buf2762[200]; +char buf2763[200]; +char buf2764[200]; +char buf2765[200]; +char buf2766[200]; +char buf2767[200]; +char buf2768[200]; +char buf2769[200]; +char buf2770[200]; +char buf2771[200]; +char buf2772[200]; +char buf2773[200]; +char buf2774[200]; +char buf2775[200]; +char buf2776[200]; +char buf2777[200]; +char buf2778[200]; +char buf2779[200]; +char buf2780[200]; +char buf2781[200]; +char buf2782[200]; +char buf2783[200]; +char buf2784[200]; +char buf2785[200]; +char buf2786[200]; +char buf2787[200]; +char buf2788[200]; +char buf2789[200]; +char buf2790[200]; +char buf2791[200]; +char buf2792[200]; +char buf2793[200]; +char buf2794[200]; +char buf2795[200]; +char buf2796[200]; +char buf2797[200]; +char buf2798[200]; +char buf2799[200]; +char buf2800[200]; +char buf2801[200]; +char buf2802[200]; +char buf2803[200]; +char buf2804[200]; +char buf2805[200]; +char buf2806[200]; +char buf2807[200]; +char buf2808[200]; +char buf2809[200]; +char buf2810[200]; +char buf2811[200]; +char buf2812[200]; +char buf2813[200]; +char buf2814[200]; +char buf2815[200]; +char buf2816[200]; +char buf2817[200]; +char buf2818[200]; +char buf2819[200]; +char buf2820[200]; +char buf2821[200]; +char buf2822[200]; +char buf2823[200]; +char buf2824[200]; +char buf2825[200]; +char buf2826[200]; +char buf2827[200]; +char buf2828[200]; +char buf2829[200]; +char buf2830[200]; +char buf2831[200]; +char buf2832[200]; +char buf2833[200]; +char buf2834[200]; +char buf2835[200]; +char buf2836[200]; +char buf2837[200]; +char buf2838[200]; +char buf2839[200]; +char buf2840[200]; +char buf2841[200]; +char buf2842[200]; +char buf2843[200]; +char buf2844[200]; +char buf2845[200]; +char buf2846[200]; +char buf2847[200]; +char buf2848[200]; +char buf2849[200]; +char buf2850[200]; +char buf2851[200]; +char buf2852[200]; +char buf2853[200]; +char buf2854[200]; +char buf2855[200]; +char buf2856[200]; +char buf2857[200]; +char buf2858[200]; +char buf2859[200]; +char buf2860[200]; +char buf2861[200]; +char buf2862[200]; +char buf2863[200]; +char buf2864[200]; +char buf2865[200]; +char buf2866[200]; +char buf2867[200]; +char buf2868[200]; +char buf2869[200]; +char buf2870[200]; +char buf2871[200]; +char buf2872[200]; +char buf2873[200]; +char buf2874[200]; +char buf2875[200]; +char buf2876[200]; +char buf2877[200]; +char buf2878[200]; +char buf2879[200]; +char buf2880[200]; +char buf2881[200]; +char buf2882[200]; +char buf2883[200]; +char buf2884[200]; +char buf2885[200]; +char buf2886[200]; +char buf2887[200]; +char buf2888[200]; +char buf2889[200]; +char buf2890[200]; +char buf2891[200]; +char buf2892[200]; +char buf2893[200]; +char buf2894[200]; +char buf2895[200]; +char buf2896[200]; +char buf2897[200]; +char buf2898[200]; +char buf2899[200]; +char buf2900[200]; +char buf2901[200]; +char buf2902[200]; +char buf2903[200]; +char buf2904[200]; +char buf2905[200]; +char buf2906[200]; +char buf2907[200]; +char buf2908[200]; +char buf2909[200]; +char buf2910[200]; +char buf2911[200]; +char buf2912[200]; +char buf2913[200]; +char buf2914[200]; +char buf2915[200]; +char buf2916[200]; +char buf2917[200]; +char buf2918[200]; +char buf2919[200]; +char buf2920[200]; +char buf2921[200]; +char buf2922[200]; +char buf2923[200]; +char buf2924[200]; +char buf2925[200]; +char buf2926[200]; +char buf2927[200]; +char buf2928[200]; +char buf2929[200]; +char buf2930[200]; +char buf2931[200]; +char buf2932[200]; +char buf2933[200]; +char buf2934[200]; +char buf2935[200]; +char buf2936[200]; +char buf2937[200]; +char buf2938[200]; +char buf2939[200]; +char buf2940[200]; +char buf2941[200]; +char buf2942[200]; +char buf2943[200]; +char buf2944[200]; +char buf2945[200]; +char buf2946[200]; +char buf2947[200]; +char buf2948[200]; +char buf2949[200]; +char buf2950[200]; +char buf2951[200]; +char buf2952[200]; +char buf2953[200]; +char buf2954[200]; +char buf2955[200]; +char buf2956[200]; +char buf2957[200]; +char buf2958[200]; +char buf2959[200]; +char buf2960[200]; +char buf2961[200]; +char buf2962[200]; +char buf2963[200]; +char buf2964[200]; +char buf2965[200]; +char buf2966[200]; +char buf2967[200]; +char buf2968[200]; +char buf2969[200]; +char buf2970[200]; +char buf2971[200]; +char buf2972[200]; +char buf2973[200]; +char buf2974[200]; +char buf2975[200]; +char buf2976[200]; +char buf2977[200]; +char buf2978[200]; +char buf2979[200]; +char buf2980[200]; +char buf2981[200]; +char buf2982[200]; +char buf2983[200]; +char buf2984[200]; +char buf2985[200]; +char buf2986[200]; +char buf2987[200]; +char buf2988[200]; +char buf2989[200]; +char buf2990[200]; +char buf2991[200]; +char buf2992[200]; +char buf2993[200]; +char buf2994[200]; +char buf2995[200]; +char buf2996[200]; +char buf2997[200]; +char buf2998[200]; +char buf2999[200]; +char buf3000[200]; +char buf3001[200]; +char buf3002[200]; +char buf3003[200]; +char buf3004[200]; +char buf3005[200]; +char buf3006[200]; +char buf3007[200]; +char buf3008[200]; +char buf3009[200]; +char buf3010[200]; +char buf3011[200]; +char buf3012[200]; +char buf3013[200]; +char buf3014[200]; +char buf3015[200]; +char buf3016[200]; +char buf3017[200]; +char buf3018[200]; +char buf3019[200]; +char buf3020[200]; +char buf3021[200]; +char buf3022[200]; +char buf3023[200]; +char buf3024[200]; +char buf3025[200]; +char buf3026[200]; +char buf3027[200]; +char buf3028[200]; +char buf3029[200]; +char buf3030[200]; +char buf3031[200]; +char buf3032[200]; +char buf3033[200]; +char buf3034[200]; +char buf3035[200]; +char buf3036[200]; +char buf3037[200]; +char buf3038[200]; +char buf3039[200]; +char buf3040[200]; +char buf3041[200]; +char buf3042[200]; +char buf3043[200]; +char buf3044[200]; +char buf3045[200]; +char buf3046[200]; +char buf3047[200]; +char buf3048[200]; +char buf3049[200]; +char buf3050[200]; +char buf3051[200]; +char buf3052[200]; +char buf3053[200]; +char buf3054[200]; +char buf3055[200]; +char buf3056[200]; +char buf3057[200]; +char buf3058[200]; +char buf3059[200]; +char buf3060[200]; +char buf3061[200]; +char buf3062[200]; +char buf3063[200]; +char buf3064[200]; +char buf3065[200]; +char buf3066[200]; +char buf3067[200]; +char buf3068[200]; +char buf3069[200]; +char buf3070[200]; +char buf3071[200]; +char buf3072[200]; +char buf3073[200]; +char buf3074[200]; +char buf3075[200]; +char buf3076[200]; +char buf3077[200]; +char buf3078[200]; +char buf3079[200]; +char buf3080[200]; +char buf3081[200]; +char buf3082[200]; +char buf3083[200]; +char buf3084[200]; +char buf3085[200]; +char buf3086[200]; +char buf3087[200]; +char buf3088[200]; +char buf3089[200]; +char buf3090[200]; +char buf3091[200]; +char buf3092[200]; +char buf3093[200]; +char buf3094[200]; +char buf3095[200]; +char buf3096[200]; +char buf3097[200]; +char buf3098[200]; +char buf3099[200]; +char buf3100[200]; +char buf3101[200]; +char buf3102[200]; +char buf3103[200]; +char buf3104[200]; +char buf3105[200]; +char buf3106[200]; +char buf3107[200]; +char buf3108[200]; +char buf3109[200]; +char buf3110[200]; +char buf3111[200]; +char buf3112[200]; +char buf3113[200]; +char buf3114[200]; +char buf3115[200]; +char buf3116[200]; +char buf3117[200]; +char buf3118[200]; +char buf3119[200]; +char buf3120[200]; +char buf3121[200]; +char buf3122[200]; +char buf3123[200]; +char buf3124[200]; +char buf3125[200]; +char buf3126[200]; +char buf3127[200]; +char buf3128[200]; +char buf3129[200]; +char buf3130[200]; +char buf3131[200]; +char buf3132[200]; +char buf3133[200]; +char buf3134[200]; +char buf3135[200]; +char buf3136[200]; +char buf3137[200]; +char buf3138[200]; +char buf3139[200]; +char buf3140[200]; +char buf3141[200]; +char buf3142[200]; +char buf3143[200]; +char buf3144[200]; +char buf3145[200]; +char buf3146[200]; +char buf3147[200]; +char buf3148[200]; +char buf3149[200]; +char buf3150[200]; +char buf3151[200]; +char buf3152[200]; +char buf3153[200]; +char buf3154[200]; +char buf3155[200]; +char buf3156[200]; +char buf3157[200]; +char buf3158[200]; +char buf3159[200]; +char buf3160[200]; +char buf3161[200]; +char buf3162[200]; +char buf3163[200]; +char buf3164[200]; +char buf3165[200]; +char buf3166[200]; +char buf3167[200]; +char buf3168[200]; +char buf3169[200]; +char buf3170[200]; +char buf3171[200]; +char buf3172[200]; +char buf3173[200]; +char buf3174[200]; +char buf3175[200]; +char buf3176[200]; +char buf3177[200]; +char buf3178[200]; +char buf3179[200]; +char buf3180[200]; +char buf3181[200]; +char buf3182[200]; +char buf3183[200]; +char buf3184[200]; +char buf3185[200]; +char buf3186[200]; +char buf3187[200]; +char buf3188[200]; +char buf3189[200]; +char buf3190[200]; +char buf3191[200]; +char buf3192[200]; +char buf3193[200]; +char buf3194[200]; +char buf3195[200]; +char buf3196[200]; +char buf3197[200]; +char buf3198[200]; +char buf3199[200]; +char buf3200[200]; +char buf3201[200]; +char buf3202[200]; +char buf3203[200]; +char buf3204[200]; +char buf3205[200]; +char buf3206[200]; +char buf3207[200]; +char buf3208[200]; +char buf3209[200]; +char buf3210[200]; +char buf3211[200]; +char buf3212[200]; +char buf3213[200]; +char buf3214[200]; +char buf3215[200]; +char buf3216[200]; +char buf3217[200]; +char buf3218[200]; +char buf3219[200]; +char buf3220[200]; +char buf3221[200]; +char buf3222[200]; +char buf3223[200]; +char buf3224[200]; +char buf3225[200]; +char buf3226[200]; +char buf3227[200]; +char buf3228[200]; +char buf3229[200]; +char buf3230[200]; +char buf3231[200]; +char buf3232[200]; +char buf3233[200]; +char buf3234[200]; +char buf3235[200]; +char buf3236[200]; +char buf3237[200]; +char buf3238[200]; +char buf3239[200]; +char buf3240[200]; +char buf3241[200]; +char buf3242[200]; +char buf3243[200]; +char buf3244[200]; +char buf3245[200]; +char buf3246[200]; +char buf3247[200]; +char buf3248[200]; +char buf3249[200]; +char buf3250[200]; +char buf3251[200]; +char buf3252[200]; +char buf3253[200]; +char buf3254[200]; +char buf3255[200]; +char buf3256[200]; +char buf3257[200]; +char buf3258[200]; +char buf3259[200]; +char buf3260[200]; +char buf3261[200]; +char buf3262[200]; +char buf3263[200]; +char buf3264[200]; +char buf3265[200]; +char buf3266[200]; +char buf3267[200]; +char buf3268[200]; +char buf3269[200]; +char buf3270[200]; +char buf3271[200]; +char buf3272[200]; +char buf3273[200]; +char buf3274[200]; +char buf3275[200]; +char buf3276[200]; +char buf3277[200]; +char buf3278[200]; +char buf3279[200]; +char buf3280[200]; +char buf3281[200]; +char buf3282[200]; +char buf3283[200]; +char buf3284[200]; +char buf3285[200]; +char buf3286[200]; +char buf3287[200]; +char buf3288[200]; +char buf3289[200]; +char buf3290[200]; +char buf3291[200]; +char buf3292[200]; +char buf3293[200]; +char buf3294[200]; +char buf3295[200]; +char buf3296[200]; +char buf3297[200]; +char buf3298[200]; +char buf3299[200]; +char buf3300[200]; +char buf3301[200]; +char buf3302[200]; +char buf3303[200]; +char buf3304[200]; +char buf3305[200]; +char buf3306[200]; +char buf3307[200]; +char buf3308[200]; +char buf3309[200]; +char buf3310[200]; +char buf3311[200]; +char buf3312[200]; +char buf3313[200]; +char buf3314[200]; +char buf3315[200]; +char buf3316[200]; +char buf3317[200]; +char buf3318[200]; +char buf3319[200]; +char buf3320[200]; +char buf3321[200]; +char buf3322[200]; +char buf3323[200]; +char buf3324[200]; +char buf3325[200]; +char buf3326[200]; +char buf3327[200]; +char buf3328[200]; +char buf3329[200]; +char buf3330[200]; +char buf3331[200]; +char buf3332[200]; +char buf3333[200]; +char buf3334[200]; +char buf3335[200]; +char buf3336[200]; +char buf3337[200]; +char buf3338[200]; +char buf3339[200]; +char buf3340[200]; +char buf3341[200]; +char buf3342[200]; +char buf3343[200]; +char buf3344[200]; +char buf3345[200]; +char buf3346[200]; +char buf3347[200]; +char buf3348[200]; +char buf3349[200]; +char buf3350[200]; +char buf3351[200]; +char buf3352[200]; +char buf3353[200]; +char buf3354[200]; +char buf3355[200]; +char buf3356[200]; +char buf3357[200]; +char buf3358[200]; +char buf3359[200]; +char buf3360[200]; +char buf3361[200]; +char buf3362[200]; +char buf3363[200]; +char buf3364[200]; +char buf3365[200]; +char buf3366[200]; +char buf3367[200]; +char buf3368[200]; +char buf3369[200]; +char buf3370[200]; +char buf3371[200]; +char buf3372[200]; +char buf3373[200]; +char buf3374[200]; +char buf3375[200]; +char buf3376[200]; +char buf3377[200]; +char buf3378[200]; +char buf3379[200]; +char buf3380[200]; +char buf3381[200]; +char buf3382[200]; +char buf3383[200]; + +void RS_KERNEL test(int in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clamp(*(char*)buf165, *(char*)buf166, *(char*)buf167); + *(char2*)buf168 = clamp(*(char2*)buf169, *(char2*)buf170, *(char2*)buf171); + *(char3*)buf172 = clamp(*(char3*)buf173, *(char3*)buf174, *(char3*)buf175); + *(char4*)buf176 = clamp(*(char4*)buf177, *(char4*)buf178, *(char4*)buf179); + *(uchar*)buf180 = clamp(*(uchar*)buf181, *(uchar*)buf182, *(uchar*)buf183); + *(uchar2*)buf184 = clamp(*(uchar2*)buf185, *(uchar2*)buf186, *(uchar2*)buf187); + *(uchar3*)buf188 = clamp(*(uchar3*)buf189, *(uchar3*)buf190, *(uchar3*)buf191); + *(uchar4*)buf192 = clamp(*(uchar4*)buf193, *(uchar4*)buf194, *(uchar4*)buf195); + *(short*)buf196 = clamp(*(short*)buf197, *(short*)buf198, *(short*)buf199); + *(short2*)buf200 = clamp(*(short2*)buf201, *(short2*)buf202, *(short2*)buf203); + *(short3*)buf204 = clamp(*(short3*)buf205, *(short3*)buf206, *(short3*)buf207); + *(short4*)buf208 = clamp(*(short4*)buf209, *(short4*)buf210, *(short4*)buf211); + *(ushort*)buf212 = clamp(*(ushort*)buf213, *(ushort*)buf214, *(ushort*)buf215); + *(ushort2*)buf216 = clamp(*(ushort2*)buf217, *(ushort2*)buf218, *(ushort2*)buf219); + *(ushort3*)buf220 = clamp(*(ushort3*)buf221, *(ushort3*)buf222, *(ushort3*)buf223); + *(ushort4*)buf224 = clamp(*(ushort4*)buf225, *(ushort4*)buf226, *(ushort4*)buf227); + *(int*)buf228 = clamp(*(int*)buf229, *(int*)buf230, *(int*)buf231); + *(int2*)buf232 = clamp(*(int2*)buf233, *(int2*)buf234, *(int2*)buf235); + *(int3*)buf236 = clamp(*(int3*)buf237, *(int3*)buf238, *(int3*)buf239); + *(int4*)buf240 = clamp(*(int4*)buf241, *(int4*)buf242, *(int4*)buf243); + *(uint*)buf244 = clamp(*(uint*)buf245, *(uint*)buf246, *(uint*)buf247); + *(uint2*)buf248 = clamp(*(uint2*)buf249, *(uint2*)buf250, *(uint2*)buf251); + *(uint3*)buf252 = clamp(*(uint3*)buf253, *(uint3*)buf254, *(uint3*)buf255); + *(uint4*)buf256 = clamp(*(uint4*)buf257, *(uint4*)buf258, *(uint4*)buf259); + *(long*)buf260 = clamp(*(long*)buf261, *(long*)buf262, *(long*)buf263); + *(long2*)buf264 = clamp(*(long2*)buf265, *(long2*)buf266, *(long2*)buf267); + *(long3*)buf268 = clamp(*(long3*)buf269, *(long3*)buf270, *(long3*)buf271); + *(long4*)buf272 = clamp(*(long4*)buf273, *(long4*)buf274, *(long4*)buf275); + *(ulong*)buf276 = clamp(*(ulong*)buf277, *(ulong*)buf278, *(ulong*)buf279); + *(ulong2*)buf280 = clamp(*(ulong2*)buf281, *(ulong2*)buf282, *(ulong2*)buf283); + *(ulong3*)buf284 = clamp(*(ulong3*)buf285, *(ulong3*)buf286, *(ulong3*)buf287); + *(ulong4*)buf288 = clamp(*(ulong4*)buf289, *(ulong4*)buf290, *(ulong4*)buf291); + *(char2*)buf292 = clamp(*(char2*)buf293, *(char*)buf294, *(char*)buf295); + *(char3*)buf296 = clamp(*(char3*)buf297, *(char*)buf298, *(char*)buf299); + *(char4*)buf300 = clamp(*(char4*)buf301, *(char*)buf302, *(char*)buf303); + *(uchar2*)buf304 = clamp(*(uchar2*)buf305, *(uchar*)buf306, *(uchar*)buf307); + *(uchar3*)buf308 = clamp(*(uchar3*)buf309, *(uchar*)buf310, *(uchar*)buf311); + *(uchar4*)buf312 = clamp(*(uchar4*)buf313, *(uchar*)buf314, *(uchar*)buf315); + *(short2*)buf316 = clamp(*(short2*)buf317, *(short*)buf318, *(short*)buf319); + *(short3*)buf320 = clamp(*(short3*)buf321, *(short*)buf322, *(short*)buf323); + *(short4*)buf324 = clamp(*(short4*)buf325, *(short*)buf326, *(short*)buf327); + *(ushort2*)buf328 = clamp(*(ushort2*)buf329, *(ushort*)buf330, *(ushort*)buf331); + *(ushort3*)buf332 = clamp(*(ushort3*)buf333, *(ushort*)buf334, *(ushort*)buf335); + *(ushort4*)buf336 = clamp(*(ushort4*)buf337, *(ushort*)buf338, *(ushort*)buf339); + *(int2*)buf340 = clamp(*(int2*)buf341, *(int*)buf342, *(int*)buf343); + *(int3*)buf344 = clamp(*(int3*)buf345, *(int*)buf346, *(int*)buf347); + *(int4*)buf348 = clamp(*(int4*)buf349, *(int*)buf350, *(int*)buf351); + *(uint2*)buf352 = clamp(*(uint2*)buf353, *(uint*)buf354, *(uint*)buf355); + *(uint3*)buf356 = clamp(*(uint3*)buf357, *(uint*)buf358, *(uint*)buf359); + *(uint4*)buf360 = clamp(*(uint4*)buf361, *(uint*)buf362, *(uint*)buf363); + *(long2*)buf364 = clamp(*(long2*)buf365, *(long*)buf366, *(long*)buf367); + *(long3*)buf368 = clamp(*(long3*)buf369, *(long*)buf370, *(long*)buf371); + *(long4*)buf372 = clamp(*(long4*)buf373, *(long*)buf374, *(long*)buf375); + *(ulong2*)buf376 = clamp(*(ulong2*)buf377, *(ulong*)buf378, *(ulong*)buf379); + *(ulong3*)buf380 = clamp(*(ulong3*)buf381, *(ulong*)buf382, *(ulong*)buf383); + *(ulong4*)buf384 = clamp(*(ulong4*)buf385, *(ulong*)buf386, *(ulong*)buf387); + *(char*)buf388 = clz(*(char*)buf389); + *(char2*)buf390 = clz(*(char2*)buf391); + *(char3*)buf392 = clz(*(char3*)buf393); + *(char4*)buf394 = clz(*(char4*)buf395); + *(uchar*)buf396 = clz(*(uchar*)buf397); + *(uchar2*)buf398 = clz(*(uchar2*)buf399); + *(uchar3*)buf400 = clz(*(uchar3*)buf401); + *(uchar4*)buf402 = clz(*(uchar4*)buf403); + *(short*)buf404 = clz(*(short*)buf405); + *(short2*)buf406 = clz(*(short2*)buf407); + *(short3*)buf408 = clz(*(short3*)buf409); + *(short4*)buf410 = clz(*(short4*)buf411); + *(ushort*)buf412 = clz(*(ushort*)buf413); + *(ushort2*)buf414 = clz(*(ushort2*)buf415); + *(ushort3*)buf416 = clz(*(ushort3*)buf417); + *(ushort4*)buf418 = clz(*(ushort4*)buf419); + *(int*)buf420 = clz(*(int*)buf421); + *(int2*)buf422 = clz(*(int2*)buf423); + *(int3*)buf424 = clz(*(int3*)buf425); + *(int4*)buf426 = clz(*(int4*)buf427); + *(uint*)buf428 = clz(*(uint*)buf429); + *(uint2*)buf430 = clz(*(uint2*)buf431); + *(uint3*)buf432 = clz(*(uint3*)buf433); + *(uint4*)buf434 = clz(*(uint4*)buf435); + *(float2*)buf436 = convert_float2(*(float2*)buf437); + *(float3*)buf438 = convert_float3(*(float3*)buf439); + *(float4*)buf440 = convert_float4(*(float4*)buf441); + *(float2*)buf442 = convert_float2(*(char2*)buf443); + *(float3*)buf444 = convert_float3(*(char3*)buf445); + *(float4*)buf446 = convert_float4(*(char4*)buf447); + *(float2*)buf448 = convert_float2(*(uchar2*)buf449); + *(float3*)buf450 = convert_float3(*(uchar3*)buf451); + *(float4*)buf452 = convert_float4(*(uchar4*)buf453); + *(float2*)buf454 = convert_float2(*(short2*)buf455); + *(float3*)buf456 = convert_float3(*(short3*)buf457); + *(float4*)buf458 = convert_float4(*(short4*)buf459); + *(float2*)buf460 = convert_float2(*(ushort2*)buf461); + *(float3*)buf462 = convert_float3(*(ushort3*)buf463); + *(float4*)buf464 = convert_float4(*(ushort4*)buf465); + *(float2*)buf466 = convert_float2(*(int2*)buf467); + *(float3*)buf468 = convert_float3(*(int3*)buf469); + *(float4*)buf470 = convert_float4(*(int4*)buf471); + *(float2*)buf472 = convert_float2(*(uint2*)buf473); + *(float3*)buf474 = convert_float3(*(uint3*)buf475); + *(float4*)buf476 = convert_float4(*(uint4*)buf477); + *(char2*)buf478 = convert_char2(*(float2*)buf479); + *(char3*)buf480 = convert_char3(*(float3*)buf481); + *(char4*)buf482 = convert_char4(*(float4*)buf483); + *(char2*)buf484 = convert_char2(*(char2*)buf485); + *(char3*)buf486 = convert_char3(*(char3*)buf487); + *(char4*)buf488 = convert_char4(*(char4*)buf489); + *(char2*)buf490 = convert_char2(*(uchar2*)buf491); + *(char3*)buf492 = convert_char3(*(uchar3*)buf493); + *(char4*)buf494 = convert_char4(*(uchar4*)buf495); + *(char2*)buf496 = convert_char2(*(short2*)buf497); + *(char3*)buf498 = convert_char3(*(short3*)buf499); + *(char4*)buf500 = convert_char4(*(short4*)buf501); + *(char2*)buf502 = convert_char2(*(ushort2*)buf503); + *(char3*)buf504 = convert_char3(*(ushort3*)buf505); + *(char4*)buf506 = convert_char4(*(ushort4*)buf507); + *(char2*)buf508 = convert_char2(*(int2*)buf509); + *(char3*)buf510 = convert_char3(*(int3*)buf511); + *(char4*)buf512 = convert_char4(*(int4*)buf513); + *(char2*)buf514 = convert_char2(*(uint2*)buf515); + *(char3*)buf516 = convert_char3(*(uint3*)buf517); + *(char4*)buf518 = convert_char4(*(uint4*)buf519); + *(uchar2*)buf520 = convert_uchar2(*(float2*)buf521); + *(uchar3*)buf522 = convert_uchar3(*(float3*)buf523); + *(uchar4*)buf524 = convert_uchar4(*(float4*)buf525); + *(uchar2*)buf526 = convert_uchar2(*(char2*)buf527); + *(uchar3*)buf528 = convert_uchar3(*(char3*)buf529); + *(uchar4*)buf530 = convert_uchar4(*(char4*)buf531); + *(uchar2*)buf532 = convert_uchar2(*(uchar2*)buf533); + *(uchar3*)buf534 = convert_uchar3(*(uchar3*)buf535); + *(uchar4*)buf536 = convert_uchar4(*(uchar4*)buf537); + *(uchar2*)buf538 = convert_uchar2(*(short2*)buf539); + *(uchar3*)buf540 = convert_uchar3(*(short3*)buf541); + *(uchar4*)buf542 = convert_uchar4(*(short4*)buf543); + *(uchar2*)buf544 = convert_uchar2(*(ushort2*)buf545); + *(uchar3*)buf546 = convert_uchar3(*(ushort3*)buf547); + *(uchar4*)buf548 = convert_uchar4(*(ushort4*)buf549); + *(uchar2*)buf550 = convert_uchar2(*(int2*)buf551); + *(uchar3*)buf552 = convert_uchar3(*(int3*)buf553); + *(uchar4*)buf554 = convert_uchar4(*(int4*)buf555); + *(uchar2*)buf556 = convert_uchar2(*(uint2*)buf557); + *(uchar3*)buf558 = convert_uchar3(*(uint3*)buf559); + *(uchar4*)buf560 = convert_uchar4(*(uint4*)buf561); + *(short2*)buf562 = convert_short2(*(float2*)buf563); + *(short3*)buf564 = convert_short3(*(float3*)buf565); + *(short4*)buf566 = convert_short4(*(float4*)buf567); + *(short2*)buf568 = convert_short2(*(char2*)buf569); + *(short3*)buf570 = convert_short3(*(char3*)buf571); + *(short4*)buf572 = convert_short4(*(char4*)buf573); + *(short2*)buf574 = convert_short2(*(uchar2*)buf575); + *(short3*)buf576 = convert_short3(*(uchar3*)buf577); + *(short4*)buf578 = convert_short4(*(uchar4*)buf579); + *(short2*)buf580 = convert_short2(*(short2*)buf581); + *(short3*)buf582 = convert_short3(*(short3*)buf583); + *(short4*)buf584 = convert_short4(*(short4*)buf585); + *(short2*)buf586 = convert_short2(*(ushort2*)buf587); + *(short3*)buf588 = convert_short3(*(ushort3*)buf589); + *(short4*)buf590 = convert_short4(*(ushort4*)buf591); + *(short2*)buf592 = convert_short2(*(int2*)buf593); + *(short3*)buf594 = convert_short3(*(int3*)buf595); + *(short4*)buf596 = convert_short4(*(int4*)buf597); + *(short2*)buf598 = convert_short2(*(uint2*)buf599); + *(short3*)buf600 = convert_short3(*(uint3*)buf601); + *(short4*)buf602 = convert_short4(*(uint4*)buf603); + *(ushort2*)buf604 = convert_ushort2(*(float2*)buf605); + *(ushort3*)buf606 = convert_ushort3(*(float3*)buf607); + *(ushort4*)buf608 = convert_ushort4(*(float4*)buf609); + *(ushort2*)buf610 = convert_ushort2(*(char2*)buf611); + *(ushort3*)buf612 = convert_ushort3(*(char3*)buf613); + *(ushort4*)buf614 = convert_ushort4(*(char4*)buf615); + *(ushort2*)buf616 = convert_ushort2(*(uchar2*)buf617); + *(ushort3*)buf618 = convert_ushort3(*(uchar3*)buf619); + *(ushort4*)buf620 = convert_ushort4(*(uchar4*)buf621); + *(ushort2*)buf622 = convert_ushort2(*(short2*)buf623); + *(ushort3*)buf624 = convert_ushort3(*(short3*)buf625); + *(ushort4*)buf626 = convert_ushort4(*(short4*)buf627); + *(ushort2*)buf628 = convert_ushort2(*(ushort2*)buf629); + *(ushort3*)buf630 = convert_ushort3(*(ushort3*)buf631); + *(ushort4*)buf632 = convert_ushort4(*(ushort4*)buf633); + *(ushort2*)buf634 = convert_ushort2(*(int2*)buf635); + *(ushort3*)buf636 = convert_ushort3(*(int3*)buf637); + *(ushort4*)buf638 = convert_ushort4(*(int4*)buf639); + *(ushort2*)buf640 = convert_ushort2(*(uint2*)buf641); + *(ushort3*)buf642 = convert_ushort3(*(uint3*)buf643); + *(ushort4*)buf644 = convert_ushort4(*(uint4*)buf645); + *(int2*)buf646 = convert_int2(*(float2*)buf647); + *(int3*)buf648 = convert_int3(*(float3*)buf649); + *(int4*)buf650 = convert_int4(*(float4*)buf651); + *(int2*)buf652 = convert_int2(*(char2*)buf653); + *(int3*)buf654 = convert_int3(*(char3*)buf655); + *(int4*)buf656 = convert_int4(*(char4*)buf657); + *(int2*)buf658 = convert_int2(*(uchar2*)buf659); + *(int3*)buf660 = convert_int3(*(uchar3*)buf661); + *(int4*)buf662 = convert_int4(*(uchar4*)buf663); + *(int2*)buf664 = convert_int2(*(short2*)buf665); + *(int3*)buf666 = convert_int3(*(short3*)buf667); + *(int4*)buf668 = convert_int4(*(short4*)buf669); + *(int2*)buf670 = convert_int2(*(ushort2*)buf671); + *(int3*)buf672 = convert_int3(*(ushort3*)buf673); + *(int4*)buf674 = convert_int4(*(ushort4*)buf675); + *(int2*)buf676 = convert_int2(*(int2*)buf677); + *(int3*)buf678 = convert_int3(*(int3*)buf679); + *(int4*)buf680 = convert_int4(*(int4*)buf681); + *(int2*)buf682 = convert_int2(*(uint2*)buf683); + *(int3*)buf684 = convert_int3(*(uint3*)buf685); + *(int4*)buf686 = convert_int4(*(uint4*)buf687); + *(uint2*)buf688 = convert_uint2(*(float2*)buf689); + *(uint3*)buf690 = convert_uint3(*(float3*)buf691); + *(uint4*)buf692 = convert_uint4(*(float4*)buf693); + *(uint2*)buf694 = convert_uint2(*(char2*)buf695); + *(uint3*)buf696 = convert_uint3(*(char3*)buf697); + *(uint4*)buf698 = convert_uint4(*(char4*)buf699); + *(uint2*)buf700 = convert_uint2(*(uchar2*)buf701); + *(uint3*)buf702 = convert_uint3(*(uchar3*)buf703); + *(uint4*)buf704 = convert_uint4(*(uchar4*)buf705); + *(uint2*)buf706 = convert_uint2(*(short2*)buf707); + *(uint3*)buf708 = convert_uint3(*(short3*)buf709); + *(uint4*)buf710 = convert_uint4(*(short4*)buf711); + *(uint2*)buf712 = convert_uint2(*(ushort2*)buf713); + *(uint3*)buf714 = convert_uint3(*(ushort3*)buf715); + *(uint4*)buf716 = convert_uint4(*(ushort4*)buf717); + *(uint2*)buf718 = convert_uint2(*(int2*)buf719); + *(uint3*)buf720 = convert_uint3(*(int3*)buf721); + *(uint4*)buf722 = convert_uint4(*(int4*)buf723); + *(uint2*)buf724 = convert_uint2(*(uint2*)buf725); + *(uint3*)buf726 = convert_uint3(*(uint3*)buf727); + *(uint4*)buf728 = convert_uint4(*(uint4*)buf729); + *(float*)buf730 = copysign(*(float*)buf731, *(float*)buf732); + *(float2*)buf733 = copysign(*(float2*)buf734, *(float2*)buf735); + *(float3*)buf736 = copysign(*(float3*)buf737, *(float3*)buf738); + *(float4*)buf739 = copysign(*(float4*)buf740, *(float4*)buf741); + *(float*)buf742 = cos(*(float*)buf743); + *(float2*)buf744 = cos(*(float2*)buf745); + *(float3*)buf746 = cos(*(float3*)buf747); + *(float4*)buf748 = cos(*(float4*)buf749); + *(float*)buf750 = cosh(*(float*)buf751); + *(float2*)buf752 = cosh(*(float2*)buf753); + *(float3*)buf754 = cosh(*(float3*)buf755); + *(float4*)buf756 = cosh(*(float4*)buf757); + *(float*)buf758 = cospi(*(float*)buf759); + *(float2*)buf760 = cospi(*(float2*)buf761); + *(float3*)buf762 = cospi(*(float3*)buf763); + *(float4*)buf764 = cospi(*(float4*)buf765); + *(float3*)buf766 = cross(*(float3*)buf767, *(float3*)buf768); + *(float4*)buf769 = cross(*(float4*)buf770, *(float4*)buf771); + *(float*)buf772 = degrees(*(float*)buf773); + *(float2*)buf774 = degrees(*(float2*)buf775); + *(float3*)buf776 = degrees(*(float3*)buf777); + *(float4*)buf778 = degrees(*(float4*)buf779); + *(float*)buf780 = distance(*(float*)buf781, *(float*)buf782); + *(float*)buf783 = distance(*(float2*)buf784, *(float2*)buf785); + *(float*)buf786 = distance(*(float3*)buf787, *(float3*)buf788); + *(float*)buf789 = distance(*(float4*)buf790, *(float4*)buf791); + *(float*)buf792 = dot(*(float*)buf793, *(float*)buf794); + *(float*)buf795 = dot(*(float2*)buf796, *(float2*)buf797); + *(float*)buf798 = dot(*(float3*)buf799, *(float3*)buf800); + *(float*)buf801 = dot(*(float4*)buf802, *(float4*)buf803); + *(float*)buf804 = erf(*(float*)buf805); + *(float2*)buf806 = erf(*(float2*)buf807); + *(float3*)buf808 = erf(*(float3*)buf809); + *(float4*)buf810 = erf(*(float4*)buf811); + *(float*)buf812 = erfc(*(float*)buf813); + *(float2*)buf814 = erfc(*(float2*)buf815); + *(float3*)buf816 = erfc(*(float3*)buf817); + *(float4*)buf818 = erfc(*(float4*)buf819); + *(float*)buf820 = exp(*(float*)buf821); + *(float2*)buf822 = exp(*(float2*)buf823); + *(float3*)buf824 = exp(*(float3*)buf825); + *(float4*)buf826 = exp(*(float4*)buf827); + *(float*)buf828 = exp10(*(float*)buf829); + *(float2*)buf830 = exp10(*(float2*)buf831); + *(float3*)buf832 = exp10(*(float3*)buf833); + *(float4*)buf834 = exp10(*(float4*)buf835); + *(float*)buf836 = exp2(*(float*)buf837); + *(float2*)buf838 = exp2(*(float2*)buf839); + *(float3*)buf840 = exp2(*(float3*)buf841); + *(float4*)buf842 = exp2(*(float4*)buf843); + *(float*)buf844 = expm1(*(float*)buf845); + *(float2*)buf846 = expm1(*(float2*)buf847); + *(float3*)buf848 = expm1(*(float3*)buf849); + *(float4*)buf850 = expm1(*(float4*)buf851); + *(float*)buf852 = fabs(*(float*)buf853); + *(float2*)buf854 = fabs(*(float2*)buf855); + *(float3*)buf856 = fabs(*(float3*)buf857); + *(float4*)buf858 = fabs(*(float4*)buf859); + *(float*)buf860 = fast_distance(*(float*)buf861, *(float*)buf862); + *(float*)buf863 = fast_distance(*(float2*)buf864, *(float2*)buf865); + *(float*)buf866 = fast_distance(*(float3*)buf867, *(float3*)buf868); + *(float*)buf869 = fast_distance(*(float4*)buf870, *(float4*)buf871); + *(float*)buf872 = fast_length(*(float*)buf873); + *(float*)buf874 = fast_length(*(float2*)buf875); + *(float*)buf876 = fast_length(*(float3*)buf877); + *(float*)buf878 = fast_length(*(float4*)buf879); + *(float*)buf880 = fast_normalize(*(float*)buf881); + *(float2*)buf882 = fast_normalize(*(float2*)buf883); + *(float3*)buf884 = fast_normalize(*(float3*)buf885); + *(float4*)buf886 = fast_normalize(*(float4*)buf887); + *(float*)buf888 = fdim(*(float*)buf889, *(float*)buf890); + *(float2*)buf891 = fdim(*(float2*)buf892, *(float2*)buf893); + *(float3*)buf894 = fdim(*(float3*)buf895, *(float3*)buf896); + *(float4*)buf897 = fdim(*(float4*)buf898, *(float4*)buf899); + *(float*)buf900 = floor(*(float*)buf901); + *(float2*)buf902 = floor(*(float2*)buf903); + *(float3*)buf904 = floor(*(float3*)buf905); + *(float4*)buf906 = floor(*(float4*)buf907); + *(float*)buf908 = fma(*(float*)buf909, *(float*)buf910, *(float*)buf911); + *(float2*)buf912 = fma(*(float2*)buf913, *(float2*)buf914, *(float2*)buf915); + *(float3*)buf916 = fma(*(float3*)buf917, *(float3*)buf918, *(float3*)buf919); + *(float4*)buf920 = fma(*(float4*)buf921, *(float4*)buf922, *(float4*)buf923); + *(float*)buf924 = fmax(*(float*)buf925, *(float*)buf926); + *(float2*)buf927 = fmax(*(float2*)buf928, *(float2*)buf929); + *(float3*)buf930 = fmax(*(float3*)buf931, *(float3*)buf932); + *(float4*)buf933 = fmax(*(float4*)buf934, *(float4*)buf935); + *(float2*)buf936 = fmax(*(float2*)buf937, *(float*)buf938); + *(float3*)buf939 = fmax(*(float3*)buf940, *(float*)buf941); + *(float4*)buf942 = fmax(*(float4*)buf943, *(float*)buf944); + *(float*)buf945 = fmin(*(float*)buf946, *(float*)buf947); + *(float2*)buf948 = fmin(*(float2*)buf949, *(float2*)buf950); + *(float3*)buf951 = fmin(*(float3*)buf952, *(float3*)buf953); + *(float4*)buf954 = fmin(*(float4*)buf955, *(float4*)buf956); + *(float2*)buf957 = fmin(*(float2*)buf958, *(float*)buf959); + *(float3*)buf960 = fmin(*(float3*)buf961, *(float*)buf962); + *(float4*)buf963 = fmin(*(float4*)buf964, *(float*)buf965); + *(float*)buf966 = fmod(*(float*)buf967, *(float*)buf968); + *(float2*)buf969 = fmod(*(float2*)buf970, *(float2*)buf971); + *(float3*)buf972 = fmod(*(float3*)buf973, *(float3*)buf974); + *(float4*)buf975 = fmod(*(float4*)buf976, *(float4*)buf977); + *(float*)buf978 = fract(*(float*)buf979, (float*) buf980); + *(float2*)buf981 = fract(*(float2*)buf982, (float2*) buf983); + *(float3*)buf984 = fract(*(float3*)buf985, (float3*) buf986); + *(float4*)buf987 = fract(*(float4*)buf988, (float4*) buf989); + *(float*)buf990 = fract(*(float*)buf991); + *(float2*)buf992 = fract(*(float2*)buf993); + *(float3*)buf994 = fract(*(float3*)buf995); + *(float4*)buf996 = fract(*(float4*)buf997); + *(float*)buf998 = frexp(*(float*)buf999, (int*) buf1000); + *(float2*)buf1001 = frexp(*(float2*)buf1002, (int2*) buf1003); + *(float3*)buf1004 = frexp(*(float3*)buf1005, (int3*) buf1006); + *(float4*)buf1007 = frexp(*(float4*)buf1008, (int4*) buf1009); + *(float*)buf1010 = half_recip(*(float*)buf1011); + *(float2*)buf1012 = half_recip(*(float2*)buf1013); + *(float3*)buf1014 = half_recip(*(float3*)buf1015); + *(float4*)buf1016 = half_recip(*(float4*)buf1017); + *(float*)buf1018 = half_rsqrt(*(float*)buf1019); + *(float2*)buf1020 = half_rsqrt(*(float2*)buf1021); + *(float3*)buf1022 = half_rsqrt(*(float3*)buf1023); + *(float4*)buf1024 = half_rsqrt(*(float4*)buf1025); + *(float*)buf1026 = half_sqrt(*(float*)buf1027); + *(float2*)buf1028 = half_sqrt(*(float2*)buf1029); + *(float3*)buf1030 = half_sqrt(*(float3*)buf1031); + *(float4*)buf1032 = half_sqrt(*(float4*)buf1033); + *(float*)buf1034 = hypot(*(float*)buf1035, *(float*)buf1036); + *(float2*)buf1037 = hypot(*(float2*)buf1038, *(float2*)buf1039); + *(float3*)buf1040 = hypot(*(float3*)buf1041, *(float3*)buf1042); + *(float4*)buf1043 = hypot(*(float4*)buf1044, *(float4*)buf1045); + *(int*)buf1046 = ilogb(*(float*)buf1047); + *(int2*)buf1048 = ilogb(*(float2*)buf1049); + *(int3*)buf1050 = ilogb(*(float3*)buf1051); + *(int4*)buf1052 = ilogb(*(float4*)buf1053); + *(float*)buf1054 = ldexp(*(float*)buf1055, *(int*)buf1056); + *(float2*)buf1057 = ldexp(*(float2*)buf1058, *(int2*)buf1059); + *(float3*)buf1060 = ldexp(*(float3*)buf1061, *(int3*)buf1062); + *(float4*)buf1063 = ldexp(*(float4*)buf1064, *(int4*)buf1065); + *(float2*)buf1066 = ldexp(*(float2*)buf1067, *(int*)buf1068); + *(float3*)buf1069 = ldexp(*(float3*)buf1070, *(int*)buf1071); + *(float4*)buf1072 = ldexp(*(float4*)buf1073, *(int*)buf1074); + *(float*)buf1075 = length(*(float*)buf1076); + *(float*)buf1077 = length(*(float2*)buf1078); + *(float*)buf1079 = length(*(float3*)buf1080); + *(float*)buf1081 = length(*(float4*)buf1082); + *(float*)buf1083 = lgamma(*(float*)buf1084); + *(float2*)buf1085 = lgamma(*(float2*)buf1086); + *(float3*)buf1087 = lgamma(*(float3*)buf1088); + *(float4*)buf1089 = lgamma(*(float4*)buf1090); + *(float*)buf1091 = lgamma(*(float*)buf1092, (int*) buf1093); + *(float2*)buf1094 = lgamma(*(float2*)buf1095, (int2*) buf1096); + *(float3*)buf1097 = lgamma(*(float3*)buf1098, (int3*) buf1099); + *(float4*)buf1100 = lgamma(*(float4*)buf1101, (int4*) buf1102); + *(float*)buf1103 = log(*(float*)buf1104); + *(float2*)buf1105 = log(*(float2*)buf1106); + *(float3*)buf1107 = log(*(float3*)buf1108); + *(float4*)buf1109 = log(*(float4*)buf1110); + *(float*)buf1111 = log10(*(float*)buf1112); + *(float2*)buf1113 = log10(*(float2*)buf1114); + *(float3*)buf1115 = log10(*(float3*)buf1116); + *(float4*)buf1117 = log10(*(float4*)buf1118); + *(float*)buf1119 = log1p(*(float*)buf1120); + *(float2*)buf1121 = log1p(*(float2*)buf1122); + *(float3*)buf1123 = log1p(*(float3*)buf1124); + *(float4*)buf1125 = log1p(*(float4*)buf1126); + *(float*)buf1127 = log2(*(float*)buf1128); + *(float2*)buf1129 = log2(*(float2*)buf1130); + *(float3*)buf1131 = log2(*(float3*)buf1132); + *(float4*)buf1133 = log2(*(float4*)buf1134); + *(float*)buf1135 = logb(*(float*)buf1136); + *(float2*)buf1137 = logb(*(float2*)buf1138); + *(float3*)buf1139 = logb(*(float3*)buf1140); + *(float4*)buf1141 = logb(*(float4*)buf1142); + *(float*)buf1143 = mad(*(float*)buf1144, *(float*)buf1145, *(float*)buf1146); + *(float2*)buf1147 = mad(*(float2*)buf1148, *(float2*)buf1149, *(float2*)buf1150); + *(float3*)buf1151 = mad(*(float3*)buf1152, *(float3*)buf1153, *(float3*)buf1154); + *(float4*)buf1155 = mad(*(float4*)buf1156, *(float4*)buf1157, *(float4*)buf1158); + *(float*)buf1159 = max(*(float*)buf1160, *(float*)buf1161); + *(float2*)buf1162 = max(*(float2*)buf1163, *(float2*)buf1164); + *(float3*)buf1165 = max(*(float3*)buf1166, *(float3*)buf1167); + *(float4*)buf1168 = max(*(float4*)buf1169, *(float4*)buf1170); + *(float2*)buf1171 = max(*(float2*)buf1172, *(float*)buf1173); + *(float3*)buf1174 = max(*(float3*)buf1175, *(float*)buf1176); + *(float4*)buf1177 = max(*(float4*)buf1178, *(float*)buf1179); + *(char*)buf1180 = max(*(char*)buf1181, *(char*)buf1182); + *(uchar*)buf1183 = max(*(uchar*)buf1184, *(uchar*)buf1185); + *(short*)buf1186 = max(*(short*)buf1187, *(short*)buf1188); + *(ushort*)buf1189 = max(*(ushort*)buf1190, *(ushort*)buf1191); + *(int*)buf1192 = max(*(int*)buf1193, *(int*)buf1194); + *(uint*)buf1195 = max(*(uint*)buf1196, *(uint*)buf1197); + *(char2*)buf1198 = max(*(char2*)buf1199, *(char2*)buf1200); + *(uchar2*)buf1201 = max(*(uchar2*)buf1202, *(uchar2*)buf1203); + *(short2*)buf1204 = max(*(short2*)buf1205, *(short2*)buf1206); + *(ushort2*)buf1207 = max(*(ushort2*)buf1208, *(ushort2*)buf1209); + *(int2*)buf1210 = max(*(int2*)buf1211, *(int2*)buf1212); + *(uint2*)buf1213 = max(*(uint2*)buf1214, *(uint2*)buf1215); + *(char3*)buf1216 = max(*(char3*)buf1217, *(char3*)buf1218); + *(uchar3*)buf1219 = max(*(uchar3*)buf1220, *(uchar3*)buf1221); + *(short3*)buf1222 = max(*(short3*)buf1223, *(short3*)buf1224); + *(ushort3*)buf1225 = max(*(ushort3*)buf1226, *(ushort3*)buf1227); + *(int3*)buf1228 = max(*(int3*)buf1229, *(int3*)buf1230); + *(uint3*)buf1231 = max(*(uint3*)buf1232, *(uint3*)buf1233); + *(char4*)buf1234 = max(*(char4*)buf1235, *(char4*)buf1236); + *(uchar4*)buf1237 = max(*(uchar4*)buf1238, *(uchar4*)buf1239); + *(short4*)buf1240 = max(*(short4*)buf1241, *(short4*)buf1242); + *(ushort4*)buf1243 = max(*(ushort4*)buf1244, *(ushort4*)buf1245); + *(int4*)buf1246 = max(*(int4*)buf1247, *(int4*)buf1248); + *(uint4*)buf1249 = max(*(uint4*)buf1250, *(uint4*)buf1251); + *(float*)buf1252 = min(*(float*)buf1253, *(float*)buf1254); + *(float2*)buf1255 = min(*(float2*)buf1256, *(float2*)buf1257); + *(float3*)buf1258 = min(*(float3*)buf1259, *(float3*)buf1260); + *(float4*)buf1261 = min(*(float4*)buf1262, *(float4*)buf1263); + *(float2*)buf1264 = min(*(float2*)buf1265, *(float*)buf1266); + *(float3*)buf1267 = min(*(float3*)buf1268, *(float*)buf1269); + *(float4*)buf1270 = min(*(float4*)buf1271, *(float*)buf1272); + *(char*)buf1273 = min(*(char*)buf1274, *(char*)buf1275); + *(uchar*)buf1276 = min(*(uchar*)buf1277, *(uchar*)buf1278); + *(short*)buf1279 = min(*(short*)buf1280, *(short*)buf1281); + *(ushort*)buf1282 = min(*(ushort*)buf1283, *(ushort*)buf1284); + *(int*)buf1285 = min(*(int*)buf1286, *(int*)buf1287); + *(uint*)buf1288 = min(*(uint*)buf1289, *(uint*)buf1290); + *(char2*)buf1291 = min(*(char2*)buf1292, *(char2*)buf1293); + *(uchar2*)buf1294 = min(*(uchar2*)buf1295, *(uchar2*)buf1296); + *(short2*)buf1297 = min(*(short2*)buf1298, *(short2*)buf1299); + *(ushort2*)buf1300 = min(*(ushort2*)buf1301, *(ushort2*)buf1302); + *(int2*)buf1303 = min(*(int2*)buf1304, *(int2*)buf1305); + *(uint2*)buf1306 = min(*(uint2*)buf1307, *(uint2*)buf1308); + *(char3*)buf1309 = min(*(char3*)buf1310, *(char3*)buf1311); + *(uchar3*)buf1312 = min(*(uchar3*)buf1313, *(uchar3*)buf1314); + *(short3*)buf1315 = min(*(short3*)buf1316, *(short3*)buf1317); + *(ushort3*)buf1318 = min(*(ushort3*)buf1319, *(ushort3*)buf1320); + *(int3*)buf1321 = min(*(int3*)buf1322, *(int3*)buf1323); + *(uint3*)buf1324 = min(*(uint3*)buf1325, *(uint3*)buf1326); + *(char4*)buf1327 = min(*(char4*)buf1328, *(char4*)buf1329); + *(uchar4*)buf1330 = min(*(uchar4*)buf1331, *(uchar4*)buf1332); + *(short4*)buf1333 = min(*(short4*)buf1334, *(short4*)buf1335); + *(ushort4*)buf1336 = min(*(ushort4*)buf1337, *(ushort4*)buf1338); + *(int4*)buf1339 = min(*(int4*)buf1340, *(int4*)buf1341); + *(uint4*)buf1342 = min(*(uint4*)buf1343, *(uint4*)buf1344); + *(float*)buf1345 = mix(*(float*)buf1346, *(float*)buf1347, *(float*)buf1348); + *(float2*)buf1349 = mix(*(float2*)buf1350, *(float2*)buf1351, *(float2*)buf1352); + *(float3*)buf1353 = mix(*(float3*)buf1354, *(float3*)buf1355, *(float3*)buf1356); + *(float4*)buf1357 = mix(*(float4*)buf1358, *(float4*)buf1359, *(float4*)buf1360); + *(float2*)buf1361 = mix(*(float2*)buf1362, *(float2*)buf1363, *(float*)buf1364); + *(float3*)buf1365 = mix(*(float3*)buf1366, *(float3*)buf1367, *(float*)buf1368); + *(float4*)buf1369 = mix(*(float4*)buf1370, *(float4*)buf1371, *(float*)buf1372); + *(float*)buf1373 = modf(*(float*)buf1374, (float*) buf1375); + *(float2*)buf1376 = modf(*(float2*)buf1377, (float2*) buf1378); + *(float3*)buf1379 = modf(*(float3*)buf1380, (float3*) buf1381); + *(float4*)buf1382 = modf(*(float4*)buf1383, (float4*) buf1384); + *(float*)buf1385 = nan(*(uint*)buf1386); + *(float*)buf1387 = native_exp(*(float*)buf1388); + *(float2*)buf1389 = native_exp(*(float2*)buf1390); + *(float3*)buf1391 = native_exp(*(float3*)buf1392); + *(float4*)buf1393 = native_exp(*(float4*)buf1394); + *(float*)buf1395 = native_exp10(*(float*)buf1396); + *(float2*)buf1397 = native_exp10(*(float2*)buf1398); + *(float3*)buf1399 = native_exp10(*(float3*)buf1400); + *(float4*)buf1401 = native_exp10(*(float4*)buf1402); + *(float*)buf1403 = native_exp2(*(float*)buf1404); + *(float2*)buf1405 = native_exp2(*(float2*)buf1406); + *(float3*)buf1407 = native_exp2(*(float3*)buf1408); + *(float4*)buf1409 = native_exp2(*(float4*)buf1410); + *(float*)buf1411 = native_log(*(float*)buf1412); + *(float2*)buf1413 = native_log(*(float2*)buf1414); + *(float3*)buf1415 = native_log(*(float3*)buf1416); + *(float4*)buf1417 = native_log(*(float4*)buf1418); + *(float*)buf1419 = native_log10(*(float*)buf1420); + *(float2*)buf1421 = native_log10(*(float2*)buf1422); + *(float3*)buf1423 = native_log10(*(float3*)buf1424); + *(float4*)buf1425 = native_log10(*(float4*)buf1426); + *(float*)buf1427 = native_log2(*(float*)buf1428); + *(float2*)buf1429 = native_log2(*(float2*)buf1430); + *(float3*)buf1431 = native_log2(*(float3*)buf1432); + *(float4*)buf1433 = native_log2(*(float4*)buf1434); + *(float*)buf1435 = native_powr(*(float*)buf1436, *(float*)buf1437); + *(float2*)buf1438 = native_powr(*(float2*)buf1439, *(float2*)buf1440); + *(float3*)buf1441 = native_powr(*(float3*)buf1442, *(float3*)buf1443); + *(float4*)buf1444 = native_powr(*(float4*)buf1445, *(float4*)buf1446); + *(float*)buf1447 = nextafter(*(float*)buf1448, *(float*)buf1449); + *(float2*)buf1450 = nextafter(*(float2*)buf1451, *(float2*)buf1452); + *(float3*)buf1453 = nextafter(*(float3*)buf1454, *(float3*)buf1455); + *(float4*)buf1456 = nextafter(*(float4*)buf1457, *(float4*)buf1458); + *(float*)buf1459 = normalize(*(float*)buf1460); + *(float2*)buf1461 = normalize(*(float2*)buf1462); + *(float3*)buf1463 = normalize(*(float3*)buf1464); + *(float4*)buf1465 = normalize(*(float4*)buf1466); + *(float*)buf1467 = pow(*(float*)buf1468, *(float*)buf1469); + *(float2*)buf1470 = pow(*(float2*)buf1471, *(float2*)buf1472); + *(float3*)buf1473 = pow(*(float3*)buf1474, *(float3*)buf1475); + *(float4*)buf1476 = pow(*(float4*)buf1477, *(float4*)buf1478); + *(float*)buf1479 = pown(*(float*)buf1480, *(int*)buf1481); + *(float2*)buf1482 = pown(*(float2*)buf1483, *(int2*)buf1484); + *(float3*)buf1485 = pown(*(float3*)buf1486, *(int3*)buf1487); + *(float4*)buf1488 = pown(*(float4*)buf1489, *(int4*)buf1490); + *(float*)buf1491 = powr(*(float*)buf1492, *(float*)buf1493); + *(float2*)buf1494 = powr(*(float2*)buf1495, *(float2*)buf1496); + *(float3*)buf1497 = powr(*(float3*)buf1498, *(float3*)buf1499); + *(float4*)buf1500 = powr(*(float4*)buf1501, *(float4*)buf1502); + *(float*)buf1503 = radians(*(float*)buf1504); + *(float2*)buf1505 = radians(*(float2*)buf1506); + *(float3*)buf1507 = radians(*(float3*)buf1508); + *(float4*)buf1509 = radians(*(float4*)buf1510); + *(float*)buf1511 = remainder(*(float*)buf1512, *(float*)buf1513); + *(float2*)buf1514 = remainder(*(float2*)buf1515, *(float2*)buf1516); + *(float3*)buf1517 = remainder(*(float3*)buf1518, *(float3*)buf1519); + *(float4*)buf1520 = remainder(*(float4*)buf1521, *(float4*)buf1522); + *(float*)buf1523 = remquo(*(float*)buf1524, *(float*)buf1525, (int*) buf1526); + *(float2*)buf1527 = remquo(*(float2*)buf1528, *(float2*)buf1529, (int2*) buf1530); + *(float3*)buf1531 = remquo(*(float3*)buf1532, *(float3*)buf1533, (int3*) buf1534); + *(float4*)buf1535 = remquo(*(float4*)buf1536, *(float4*)buf1537, (int4*) buf1538); + *(float*)buf1539 = rint(*(float*)buf1540); + *(float2*)buf1541 = rint(*(float2*)buf1542); + *(float3*)buf1543 = rint(*(float3*)buf1544); + *(float4*)buf1545 = rint(*(float4*)buf1546); + *(float*)buf1547 = rootn(*(float*)buf1548, *(int*)buf1549); + *(float2*)buf1550 = rootn(*(float2*)buf1551, *(int2*)buf1552); + *(float3*)buf1553 = rootn(*(float3*)buf1554, *(int3*)buf1555); + *(float4*)buf1556 = rootn(*(float4*)buf1557, *(int4*)buf1558); + *(float*)buf1559 = round(*(float*)buf1560); + *(float2*)buf1561 = round(*(float2*)buf1562); + *(float3*)buf1563 = round(*(float3*)buf1564); + *(float4*)buf1565 = round(*(float4*)buf1566); + rsAllocationCopy1DRange(*(rs_allocation*)buf1567, *(uint32_t*)buf1568, *(uint32_t*)buf1569, *(uint32_t*)buf1570, *(rs_allocation*)buf1571, *(uint32_t*)buf1572, *(uint32_t*)buf1573); + rsAllocationCopy2DRange(*(rs_allocation*)buf1574, *(uint32_t*)buf1575, *(uint32_t*)buf1576, *(uint32_t*)buf1577, *(rs_allocation_cubemap_face*)buf1578, *(uint32_t*)buf1579, *(uint32_t*)buf1580, *(rs_allocation*)buf1581, *(uint32_t*)buf1582, *(uint32_t*)buf1583, *(uint32_t*)buf1584, *(rs_allocation_cubemap_face*)buf1585); + *(uint32_t*)buf1586 = rsAllocationGetDimFaces(*(rs_allocation*)buf1587); + *(uint32_t*)buf1588 = rsAllocationGetDimLOD(*(rs_allocation*)buf1589); + *(uint32_t*)buf1590 = rsAllocationGetDimX(*(rs_allocation*)buf1591); + *(uint32_t*)buf1592 = rsAllocationGetDimY(*(rs_allocation*)buf1593); + *(uint32_t*)buf1594 = rsAllocationGetDimZ(*(rs_allocation*)buf1595); + *(rs_element*)buf1596 = rsAllocationGetElement(*(rs_allocation*)buf1597); + rsAllocationIoReceive(*(rs_allocation*)buf1598); + rsAllocationIoSend(*(rs_allocation*)buf1599); + *(int32_t*)buf1600 = rsAtomicAdd((volatile int32_t*) buf1601, *(int32_t*)buf1602); + *(int32_t*)buf1603 = rsAtomicAnd((volatile int32_t*) buf1604, *(int32_t*)buf1605); + *(int32_t*)buf1606 = rsAtomicCas((volatile int32_t*) buf1607, *(int32_t*)buf1608, *(int32_t*)buf1609); + *(uint32_t*)buf1610 = rsAtomicCas((volatile uint32_t*) buf1611, *(uint32_t*)buf1612, *(uint32_t*)buf1613); + *(int32_t*)buf1614 = rsAtomicDec((volatile int32_t*) buf1615); + *(int32_t*)buf1616 = rsAtomicInc((volatile int32_t*) buf1617); + *(uint32_t*)buf1618 = rsAtomicMax((volatile uint32_t*) buf1619, *(uint32_t*)buf1620); + *(int32_t*)buf1621 = rsAtomicMax((volatile int32_t*) buf1622, *(int32_t*)buf1623); + *(uint32_t*)buf1624 = rsAtomicMin((volatile uint32_t*) buf1625, *(uint32_t*)buf1626); + *(int32_t*)buf1627 = rsAtomicMin((volatile int32_t*) buf1628, *(int32_t*)buf1629); + *(int32_t*)buf1630 = rsAtomicOr((volatile int32_t*) buf1631, *(int32_t*)buf1632); + *(int32_t*)buf1633 = rsAtomicSub((volatile int32_t*) buf1634, *(int32_t*)buf1635); + *(int32_t*)buf1636 = rsAtomicXor((volatile int32_t*) buf1637, *(int32_t*)buf1638); + *(char*)buf1639 = rsClamp(*(char*)buf1640, *(char*)buf1641, *(char*)buf1642); + *(uchar*)buf1643 = rsClamp(*(uchar*)buf1644, *(uchar*)buf1645, *(uchar*)buf1646); + *(short*)buf1647 = rsClamp(*(short*)buf1648, *(short*)buf1649, *(short*)buf1650); + *(ushort*)buf1651 = rsClamp(*(ushort*)buf1652, *(ushort*)buf1653, *(ushort*)buf1654); + *(int*)buf1655 = rsClamp(*(int*)buf1656, *(int*)buf1657, *(int*)buf1658); + *(uint*)buf1659 = rsClamp(*(uint*)buf1660, *(uint*)buf1661, *(uint*)buf1662); + rsClearObject((rs_element*) buf1663); + rsClearObject((rs_type*) buf1664); + rsClearObject((rs_allocation*) buf1665); + rsClearObject((rs_sampler*) buf1666); + rsClearObject((rs_script*) buf1667); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1668); + rsClearObject((rs_program_fragment*) buf1669); + rsClearObject((rs_program_vertex*) buf1670); + rsClearObject((rs_program_raster*) buf1671); + rsClearObject((rs_program_store*) buf1672); + rsClearObject((rs_font*) buf1673); +#endif + rsDebug((const char*) buf1674, *(double*)buf1675); + rsDebug((const char*) buf1676, *(int*)buf1677); + rsDebug((const char*) buf1678, *(uint*)buf1679); + rsDebug((const char*) buf1680, *(long*)buf1681); + rsDebug((const char*) buf1682, *(ulong*)buf1683); + rsDebug((const char*) buf1684, *(int2*)buf1685); + rsDebug((const char*) buf1686, *(int3*)buf1687); + rsDebug((const char*) buf1688, *(int4*)buf1689); + rsDebug((const char*) buf1690, *(uint2*)buf1691); + rsDebug((const char*) buf1692, *(uint3*)buf1693); + rsDebug((const char*) buf1694, *(uint4*)buf1695); + rsDebug((const char*) buf1696, *(long2*)buf1697); + rsDebug((const char*) buf1698, *(long3*)buf1699); + rsDebug((const char*) buf1700, *(long4*)buf1701); + rsDebug((const char*) buf1702, *(ulong2*)buf1703); + rsDebug((const char*) buf1704, *(ulong3*)buf1705); + rsDebug((const char*) buf1706, *(ulong4*)buf1707); + rsDebug((const char*) buf1708, *(float*)buf1709); + rsDebug((const char*) buf1710, *(float2*)buf1711); + rsDebug((const char*) buf1712, *(float3*)buf1713); + rsDebug((const char*) buf1714, *(float4*)buf1715); + rsDebug((const char*) buf1716, *(char*)buf1717); + rsDebug((const char*) buf1718, *(char2*)buf1719); + rsDebug((const char*) buf1720, *(char3*)buf1721); + rsDebug((const char*) buf1722, *(char4*)buf1723); + rsDebug((const char*) buf1724, *(uchar*)buf1725); + rsDebug((const char*) buf1726, *(uchar2*)buf1727); + rsDebug((const char*) buf1728, *(uchar3*)buf1729); + rsDebug((const char*) buf1730, *(uchar4*)buf1731); + rsDebug((const char*) buf1732, *(short*)buf1733); + rsDebug((const char*) buf1734, *(short2*)buf1735); + rsDebug((const char*) buf1736, *(short3*)buf1737); + rsDebug((const char*) buf1738, *(short4*)buf1739); + rsDebug((const char*) buf1740, *(ushort*)buf1741); + rsDebug((const char*) buf1742, *(ushort2*)buf1743); + rsDebug((const char*) buf1744, *(ushort3*)buf1745); + rsDebug((const char*) buf1746, *(ushort4*)buf1747); + rsDebug((const char*) buf1748, *(float*)buf1749, *(float*)buf1750); + rsDebug((const char*) buf1751, *(float*)buf1752, *(float*)buf1753, *(float*)buf1754); + rsDebug((const char*) buf1755, *(float*)buf1756, *(float*)buf1757, *(float*)buf1758, *(float*)buf1759); + rsDebug((const char*) buf1760, *(long long*)buf1761); + rsDebug((const char*) buf1762, *(unsigned long long*)buf1763); + rsDebug((const char*) buf1764, (const void*) buf1765); + rsDebug((const char*) buf1766, (const rs_matrix4x4*) buf1767); + rsDebug((const char*) buf1768, (const rs_matrix3x3*) buf1769); + rsDebug((const char*) buf1770, (const rs_matrix2x2*) buf1771); + *(uint32_t*)buf1772 = rsElementGetBytesSize(*(rs_element*)buf1773); + *(rs_data_kind*)buf1774 = rsElementGetDataKind(*(rs_element*)buf1775); + *(rs_data_type*)buf1776 = rsElementGetDataType(*(rs_element*)buf1777); + *(rs_element*)buf1778 = rsElementGetSubElement(*(rs_element*)buf1779, *(uint32_t*)buf1780); + *(uint32_t*)buf1781 = rsElementGetSubElementArraySize(*(rs_element*)buf1782, *(uint32_t*)buf1783); + *(uint32_t*)buf1784 = rsElementGetSubElementCount(*(rs_element*)buf1785); + *(uint32_t*)buf1786 = rsElementGetSubElementName(*(rs_element*)buf1787, *(uint32_t*)buf1788, (char*) buf1789, *(uint32_t*)buf1790); + *(uint32_t*)buf1791 = rsElementGetSubElementNameLength(*(rs_element*)buf1792, *(uint32_t*)buf1793); + *(uint32_t*)buf1794 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf1795, *(uint32_t*)buf1796); + *(uint32_t*)buf1797 = rsElementGetVectorSize(*(rs_element*)buf1798); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1799, (float4*) buf1800, (float4*) buf1801, (float4*) buf1802, (float4*) buf1803, (float4*) buf1804, (float4*) buf1805); + rsForEach(*(rs_script*)buf1806, *(rs_allocation*)buf1807, *(rs_allocation*)buf1808, (const void*) buf1809, *(size_t*)buf1810, (const rs_script_call_t*) buf1811); + rsForEach(*(rs_script*)buf1812, *(rs_allocation*)buf1813, *(rs_allocation*)buf1814, (const void*) buf1815, *(size_t*)buf1816); + rsForEach(*(rs_script*)buf1817, *(rs_allocation*)buf1818, *(rs_allocation*)buf1819); + *(float*)buf1820 = rsFrac(*(float*)buf1821); + *(rs_allocation*)buf1822 = rsGetAllocation((const void*) buf1823); + *(float*)buf1824 = rsGetDt(); + *(const void**)buf1825 = rsGetElementAt(*(rs_allocation*)buf1826, *(uint32_t*)buf1827); + *(const void**)buf1828 = rsGetElementAt(*(rs_allocation*)buf1829, *(uint32_t*)buf1830, *(uint32_t*)buf1831); + *(const void**)buf1832 = rsGetElementAt(*(rs_allocation*)buf1833, *(uint32_t*)buf1834, *(uint32_t*)buf1835, *(uint32_t*)buf1836); + *(float*)buf1837 = rsGetElementAt_float(*(rs_allocation*)buf1838, *(uint32_t*)buf1839); + *(float2*)buf1840 = rsGetElementAt_float2(*(rs_allocation*)buf1841, *(uint32_t*)buf1842); + *(float3*)buf1843 = rsGetElementAt_float3(*(rs_allocation*)buf1844, *(uint32_t*)buf1845); + *(float4*)buf1846 = rsGetElementAt_float4(*(rs_allocation*)buf1847, *(uint32_t*)buf1848); + *(double*)buf1849 = rsGetElementAt_double(*(rs_allocation*)buf1850, *(uint32_t*)buf1851); + *(double2*)buf1852 = rsGetElementAt_double2(*(rs_allocation*)buf1853, *(uint32_t*)buf1854); + *(double3*)buf1855 = rsGetElementAt_double3(*(rs_allocation*)buf1856, *(uint32_t*)buf1857); + *(double4*)buf1858 = rsGetElementAt_double4(*(rs_allocation*)buf1859, *(uint32_t*)buf1860); + *(char*)buf1861 = rsGetElementAt_char(*(rs_allocation*)buf1862, *(uint32_t*)buf1863); + *(char2*)buf1864 = rsGetElementAt_char2(*(rs_allocation*)buf1865, *(uint32_t*)buf1866); + *(char3*)buf1867 = rsGetElementAt_char3(*(rs_allocation*)buf1868, *(uint32_t*)buf1869); + *(char4*)buf1870 = rsGetElementAt_char4(*(rs_allocation*)buf1871, *(uint32_t*)buf1872); + *(uchar*)buf1873 = rsGetElementAt_uchar(*(rs_allocation*)buf1874, *(uint32_t*)buf1875); + *(uchar2*)buf1876 = rsGetElementAt_uchar2(*(rs_allocation*)buf1877, *(uint32_t*)buf1878); + *(uchar3*)buf1879 = rsGetElementAt_uchar3(*(rs_allocation*)buf1880, *(uint32_t*)buf1881); + *(uchar4*)buf1882 = rsGetElementAt_uchar4(*(rs_allocation*)buf1883, *(uint32_t*)buf1884); + *(short*)buf1885 = rsGetElementAt_short(*(rs_allocation*)buf1886, *(uint32_t*)buf1887); + *(short2*)buf1888 = rsGetElementAt_short2(*(rs_allocation*)buf1889, *(uint32_t*)buf1890); + *(short3*)buf1891 = rsGetElementAt_short3(*(rs_allocation*)buf1892, *(uint32_t*)buf1893); + *(short4*)buf1894 = rsGetElementAt_short4(*(rs_allocation*)buf1895, *(uint32_t*)buf1896); + *(ushort*)buf1897 = rsGetElementAt_ushort(*(rs_allocation*)buf1898, *(uint32_t*)buf1899); + *(ushort2*)buf1900 = rsGetElementAt_ushort2(*(rs_allocation*)buf1901, *(uint32_t*)buf1902); + *(ushort3*)buf1903 = rsGetElementAt_ushort3(*(rs_allocation*)buf1904, *(uint32_t*)buf1905); + *(ushort4*)buf1906 = rsGetElementAt_ushort4(*(rs_allocation*)buf1907, *(uint32_t*)buf1908); + *(int*)buf1909 = rsGetElementAt_int(*(rs_allocation*)buf1910, *(uint32_t*)buf1911); + *(int2*)buf1912 = rsGetElementAt_int2(*(rs_allocation*)buf1913, *(uint32_t*)buf1914); + *(int3*)buf1915 = rsGetElementAt_int3(*(rs_allocation*)buf1916, *(uint32_t*)buf1917); + *(int4*)buf1918 = rsGetElementAt_int4(*(rs_allocation*)buf1919, *(uint32_t*)buf1920); + *(uint*)buf1921 = rsGetElementAt_uint(*(rs_allocation*)buf1922, *(uint32_t*)buf1923); + *(uint2*)buf1924 = rsGetElementAt_uint2(*(rs_allocation*)buf1925, *(uint32_t*)buf1926); + *(uint3*)buf1927 = rsGetElementAt_uint3(*(rs_allocation*)buf1928, *(uint32_t*)buf1929); + *(uint4*)buf1930 = rsGetElementAt_uint4(*(rs_allocation*)buf1931, *(uint32_t*)buf1932); + *(long*)buf1933 = rsGetElementAt_long(*(rs_allocation*)buf1934, *(uint32_t*)buf1935); + *(long2*)buf1936 = rsGetElementAt_long2(*(rs_allocation*)buf1937, *(uint32_t*)buf1938); + *(long3*)buf1939 = rsGetElementAt_long3(*(rs_allocation*)buf1940, *(uint32_t*)buf1941); + *(long4*)buf1942 = rsGetElementAt_long4(*(rs_allocation*)buf1943, *(uint32_t*)buf1944); + *(ulong*)buf1945 = rsGetElementAt_ulong(*(rs_allocation*)buf1946, *(uint32_t*)buf1947); + *(ulong2*)buf1948 = rsGetElementAt_ulong2(*(rs_allocation*)buf1949, *(uint32_t*)buf1950); + *(ulong3*)buf1951 = rsGetElementAt_ulong3(*(rs_allocation*)buf1952, *(uint32_t*)buf1953); + *(ulong4*)buf1954 = rsGetElementAt_ulong4(*(rs_allocation*)buf1955, *(uint32_t*)buf1956); + *(float*)buf1957 = rsGetElementAt_float(*(rs_allocation*)buf1958, *(uint32_t*)buf1959, *(uint32_t*)buf1960); + *(float2*)buf1961 = rsGetElementAt_float2(*(rs_allocation*)buf1962, *(uint32_t*)buf1963, *(uint32_t*)buf1964); + *(float3*)buf1965 = rsGetElementAt_float3(*(rs_allocation*)buf1966, *(uint32_t*)buf1967, *(uint32_t*)buf1968); + *(float4*)buf1969 = rsGetElementAt_float4(*(rs_allocation*)buf1970, *(uint32_t*)buf1971, *(uint32_t*)buf1972); + *(double*)buf1973 = rsGetElementAt_double(*(rs_allocation*)buf1974, *(uint32_t*)buf1975, *(uint32_t*)buf1976); + *(double2*)buf1977 = rsGetElementAt_double2(*(rs_allocation*)buf1978, *(uint32_t*)buf1979, *(uint32_t*)buf1980); + *(double3*)buf1981 = rsGetElementAt_double3(*(rs_allocation*)buf1982, *(uint32_t*)buf1983, *(uint32_t*)buf1984); + *(double4*)buf1985 = rsGetElementAt_double4(*(rs_allocation*)buf1986, *(uint32_t*)buf1987, *(uint32_t*)buf1988); + *(char*)buf1989 = rsGetElementAt_char(*(rs_allocation*)buf1990, *(uint32_t*)buf1991, *(uint32_t*)buf1992); + *(char2*)buf1993 = rsGetElementAt_char2(*(rs_allocation*)buf1994, *(uint32_t*)buf1995, *(uint32_t*)buf1996); + *(char3*)buf1997 = rsGetElementAt_char3(*(rs_allocation*)buf1998, *(uint32_t*)buf1999, *(uint32_t*)buf2000); + *(char4*)buf2001 = rsGetElementAt_char4(*(rs_allocation*)buf2002, *(uint32_t*)buf2003, *(uint32_t*)buf2004); + *(uchar*)buf2005 = rsGetElementAt_uchar(*(rs_allocation*)buf2006, *(uint32_t*)buf2007, *(uint32_t*)buf2008); + *(uchar2*)buf2009 = rsGetElementAt_uchar2(*(rs_allocation*)buf2010, *(uint32_t*)buf2011, *(uint32_t*)buf2012); + *(uchar3*)buf2013 = rsGetElementAt_uchar3(*(rs_allocation*)buf2014, *(uint32_t*)buf2015, *(uint32_t*)buf2016); + *(uchar4*)buf2017 = rsGetElementAt_uchar4(*(rs_allocation*)buf2018, *(uint32_t*)buf2019, *(uint32_t*)buf2020); + *(short*)buf2021 = rsGetElementAt_short(*(rs_allocation*)buf2022, *(uint32_t*)buf2023, *(uint32_t*)buf2024); + *(short2*)buf2025 = rsGetElementAt_short2(*(rs_allocation*)buf2026, *(uint32_t*)buf2027, *(uint32_t*)buf2028); + *(short3*)buf2029 = rsGetElementAt_short3(*(rs_allocation*)buf2030, *(uint32_t*)buf2031, *(uint32_t*)buf2032); + *(short4*)buf2033 = rsGetElementAt_short4(*(rs_allocation*)buf2034, *(uint32_t*)buf2035, *(uint32_t*)buf2036); + *(ushort*)buf2037 = rsGetElementAt_ushort(*(rs_allocation*)buf2038, *(uint32_t*)buf2039, *(uint32_t*)buf2040); + *(ushort2*)buf2041 = rsGetElementAt_ushort2(*(rs_allocation*)buf2042, *(uint32_t*)buf2043, *(uint32_t*)buf2044); + *(ushort3*)buf2045 = rsGetElementAt_ushort3(*(rs_allocation*)buf2046, *(uint32_t*)buf2047, *(uint32_t*)buf2048); + *(ushort4*)buf2049 = rsGetElementAt_ushort4(*(rs_allocation*)buf2050, *(uint32_t*)buf2051, *(uint32_t*)buf2052); + *(int*)buf2053 = rsGetElementAt_int(*(rs_allocation*)buf2054, *(uint32_t*)buf2055, *(uint32_t*)buf2056); + *(int2*)buf2057 = rsGetElementAt_int2(*(rs_allocation*)buf2058, *(uint32_t*)buf2059, *(uint32_t*)buf2060); + *(int3*)buf2061 = rsGetElementAt_int3(*(rs_allocation*)buf2062, *(uint32_t*)buf2063, *(uint32_t*)buf2064); + *(int4*)buf2065 = rsGetElementAt_int4(*(rs_allocation*)buf2066, *(uint32_t*)buf2067, *(uint32_t*)buf2068); + *(uint*)buf2069 = rsGetElementAt_uint(*(rs_allocation*)buf2070, *(uint32_t*)buf2071, *(uint32_t*)buf2072); + *(uint2*)buf2073 = rsGetElementAt_uint2(*(rs_allocation*)buf2074, *(uint32_t*)buf2075, *(uint32_t*)buf2076); + *(uint3*)buf2077 = rsGetElementAt_uint3(*(rs_allocation*)buf2078, *(uint32_t*)buf2079, *(uint32_t*)buf2080); + *(uint4*)buf2081 = rsGetElementAt_uint4(*(rs_allocation*)buf2082, *(uint32_t*)buf2083, *(uint32_t*)buf2084); + *(long*)buf2085 = rsGetElementAt_long(*(rs_allocation*)buf2086, *(uint32_t*)buf2087, *(uint32_t*)buf2088); + *(long2*)buf2089 = rsGetElementAt_long2(*(rs_allocation*)buf2090, *(uint32_t*)buf2091, *(uint32_t*)buf2092); + *(long3*)buf2093 = rsGetElementAt_long3(*(rs_allocation*)buf2094, *(uint32_t*)buf2095, *(uint32_t*)buf2096); + *(long4*)buf2097 = rsGetElementAt_long4(*(rs_allocation*)buf2098, *(uint32_t*)buf2099, *(uint32_t*)buf2100); + *(ulong*)buf2101 = rsGetElementAt_ulong(*(rs_allocation*)buf2102, *(uint32_t*)buf2103, *(uint32_t*)buf2104); + *(ulong2*)buf2105 = rsGetElementAt_ulong2(*(rs_allocation*)buf2106, *(uint32_t*)buf2107, *(uint32_t*)buf2108); + *(ulong3*)buf2109 = rsGetElementAt_ulong3(*(rs_allocation*)buf2110, *(uint32_t*)buf2111, *(uint32_t*)buf2112); + *(ulong4*)buf2113 = rsGetElementAt_ulong4(*(rs_allocation*)buf2114, *(uint32_t*)buf2115, *(uint32_t*)buf2116); + *(float*)buf2117 = rsGetElementAt_float(*(rs_allocation*)buf2118, *(uint32_t*)buf2119, *(uint32_t*)buf2120, *(uint32_t*)buf2121); + *(float2*)buf2122 = rsGetElementAt_float2(*(rs_allocation*)buf2123, *(uint32_t*)buf2124, *(uint32_t*)buf2125, *(uint32_t*)buf2126); + *(float3*)buf2127 = rsGetElementAt_float3(*(rs_allocation*)buf2128, *(uint32_t*)buf2129, *(uint32_t*)buf2130, *(uint32_t*)buf2131); + *(float4*)buf2132 = rsGetElementAt_float4(*(rs_allocation*)buf2133, *(uint32_t*)buf2134, *(uint32_t*)buf2135, *(uint32_t*)buf2136); + *(double*)buf2137 = rsGetElementAt_double(*(rs_allocation*)buf2138, *(uint32_t*)buf2139, *(uint32_t*)buf2140, *(uint32_t*)buf2141); + *(double2*)buf2142 = rsGetElementAt_double2(*(rs_allocation*)buf2143, *(uint32_t*)buf2144, *(uint32_t*)buf2145, *(uint32_t*)buf2146); + *(double3*)buf2147 = rsGetElementAt_double3(*(rs_allocation*)buf2148, *(uint32_t*)buf2149, *(uint32_t*)buf2150, *(uint32_t*)buf2151); + *(double4*)buf2152 = rsGetElementAt_double4(*(rs_allocation*)buf2153, *(uint32_t*)buf2154, *(uint32_t*)buf2155, *(uint32_t*)buf2156); + *(char*)buf2157 = rsGetElementAt_char(*(rs_allocation*)buf2158, *(uint32_t*)buf2159, *(uint32_t*)buf2160, *(uint32_t*)buf2161); + *(char2*)buf2162 = rsGetElementAt_char2(*(rs_allocation*)buf2163, *(uint32_t*)buf2164, *(uint32_t*)buf2165, *(uint32_t*)buf2166); + *(char3*)buf2167 = rsGetElementAt_char3(*(rs_allocation*)buf2168, *(uint32_t*)buf2169, *(uint32_t*)buf2170, *(uint32_t*)buf2171); + *(char4*)buf2172 = rsGetElementAt_char4(*(rs_allocation*)buf2173, *(uint32_t*)buf2174, *(uint32_t*)buf2175, *(uint32_t*)buf2176); + *(uchar*)buf2177 = rsGetElementAt_uchar(*(rs_allocation*)buf2178, *(uint32_t*)buf2179, *(uint32_t*)buf2180, *(uint32_t*)buf2181); + *(uchar2*)buf2182 = rsGetElementAt_uchar2(*(rs_allocation*)buf2183, *(uint32_t*)buf2184, *(uint32_t*)buf2185, *(uint32_t*)buf2186); + *(uchar3*)buf2187 = rsGetElementAt_uchar3(*(rs_allocation*)buf2188, *(uint32_t*)buf2189, *(uint32_t*)buf2190, *(uint32_t*)buf2191); + *(uchar4*)buf2192 = rsGetElementAt_uchar4(*(rs_allocation*)buf2193, *(uint32_t*)buf2194, *(uint32_t*)buf2195, *(uint32_t*)buf2196); + *(short*)buf2197 = rsGetElementAt_short(*(rs_allocation*)buf2198, *(uint32_t*)buf2199, *(uint32_t*)buf2200, *(uint32_t*)buf2201); + *(short2*)buf2202 = rsGetElementAt_short2(*(rs_allocation*)buf2203, *(uint32_t*)buf2204, *(uint32_t*)buf2205, *(uint32_t*)buf2206); + *(short3*)buf2207 = rsGetElementAt_short3(*(rs_allocation*)buf2208, *(uint32_t*)buf2209, *(uint32_t*)buf2210, *(uint32_t*)buf2211); + *(short4*)buf2212 = rsGetElementAt_short4(*(rs_allocation*)buf2213, *(uint32_t*)buf2214, *(uint32_t*)buf2215, *(uint32_t*)buf2216); + *(ushort*)buf2217 = rsGetElementAt_ushort(*(rs_allocation*)buf2218, *(uint32_t*)buf2219, *(uint32_t*)buf2220, *(uint32_t*)buf2221); + *(ushort2*)buf2222 = rsGetElementAt_ushort2(*(rs_allocation*)buf2223, *(uint32_t*)buf2224, *(uint32_t*)buf2225, *(uint32_t*)buf2226); + *(ushort3*)buf2227 = rsGetElementAt_ushort3(*(rs_allocation*)buf2228, *(uint32_t*)buf2229, *(uint32_t*)buf2230, *(uint32_t*)buf2231); + *(ushort4*)buf2232 = rsGetElementAt_ushort4(*(rs_allocation*)buf2233, *(uint32_t*)buf2234, *(uint32_t*)buf2235, *(uint32_t*)buf2236); + *(int*)buf2237 = rsGetElementAt_int(*(rs_allocation*)buf2238, *(uint32_t*)buf2239, *(uint32_t*)buf2240, *(uint32_t*)buf2241); + *(int2*)buf2242 = rsGetElementAt_int2(*(rs_allocation*)buf2243, *(uint32_t*)buf2244, *(uint32_t*)buf2245, *(uint32_t*)buf2246); + *(int3*)buf2247 = rsGetElementAt_int3(*(rs_allocation*)buf2248, *(uint32_t*)buf2249, *(uint32_t*)buf2250, *(uint32_t*)buf2251); + *(int4*)buf2252 = rsGetElementAt_int4(*(rs_allocation*)buf2253, *(uint32_t*)buf2254, *(uint32_t*)buf2255, *(uint32_t*)buf2256); + *(uint*)buf2257 = rsGetElementAt_uint(*(rs_allocation*)buf2258, *(uint32_t*)buf2259, *(uint32_t*)buf2260, *(uint32_t*)buf2261); + *(uint2*)buf2262 = rsGetElementAt_uint2(*(rs_allocation*)buf2263, *(uint32_t*)buf2264, *(uint32_t*)buf2265, *(uint32_t*)buf2266); + *(uint3*)buf2267 = rsGetElementAt_uint3(*(rs_allocation*)buf2268, *(uint32_t*)buf2269, *(uint32_t*)buf2270, *(uint32_t*)buf2271); + *(uint4*)buf2272 = rsGetElementAt_uint4(*(rs_allocation*)buf2273, *(uint32_t*)buf2274, *(uint32_t*)buf2275, *(uint32_t*)buf2276); + *(long*)buf2277 = rsGetElementAt_long(*(rs_allocation*)buf2278, *(uint32_t*)buf2279, *(uint32_t*)buf2280, *(uint32_t*)buf2281); + *(long2*)buf2282 = rsGetElementAt_long2(*(rs_allocation*)buf2283, *(uint32_t*)buf2284, *(uint32_t*)buf2285, *(uint32_t*)buf2286); + *(long3*)buf2287 = rsGetElementAt_long3(*(rs_allocation*)buf2288, *(uint32_t*)buf2289, *(uint32_t*)buf2290, *(uint32_t*)buf2291); + *(long4*)buf2292 = rsGetElementAt_long4(*(rs_allocation*)buf2293, *(uint32_t*)buf2294, *(uint32_t*)buf2295, *(uint32_t*)buf2296); + *(ulong*)buf2297 = rsGetElementAt_ulong(*(rs_allocation*)buf2298, *(uint32_t*)buf2299, *(uint32_t*)buf2300, *(uint32_t*)buf2301); + *(ulong2*)buf2302 = rsGetElementAt_ulong2(*(rs_allocation*)buf2303, *(uint32_t*)buf2304, *(uint32_t*)buf2305, *(uint32_t*)buf2306); + *(ulong3*)buf2307 = rsGetElementAt_ulong3(*(rs_allocation*)buf2308, *(uint32_t*)buf2309, *(uint32_t*)buf2310, *(uint32_t*)buf2311); + *(ulong4*)buf2312 = rsGetElementAt_ulong4(*(rs_allocation*)buf2313, *(uint32_t*)buf2314, *(uint32_t*)buf2315, *(uint32_t*)buf2316); + *(uchar*)buf2317 = rsGetElementAtYuv_uchar_U(*(rs_allocation*)buf2318, *(uint32_t*)buf2319, *(uint32_t*)buf2320); + *(uchar*)buf2321 = rsGetElementAtYuv_uchar_V(*(rs_allocation*)buf2322, *(uint32_t*)buf2323, *(uint32_t*)buf2324); + *(uchar*)buf2325 = rsGetElementAtYuv_uchar_Y(*(rs_allocation*)buf2326, *(uint32_t*)buf2327, *(uint32_t*)buf2328); + *(bool*)buf2329 = rsIsObject(*(rs_element*)buf2330); + *(bool*)buf2331 = rsIsObject(*(rs_type*)buf2332); + *(bool*)buf2333 = rsIsObject(*(rs_allocation*)buf2334); + *(bool*)buf2335 = rsIsObject(*(rs_sampler*)buf2336); + *(bool*)buf2337 = rsIsObject(*(rs_script*)buf2338); +#ifndef __LP64__ + *(bool*)buf2339 = rsIsObject(*(rs_mesh*)buf2340); + *(bool*)buf2341 = rsIsObject(*(rs_program_fragment*)buf2342); + *(bool*)buf2343 = rsIsObject(*(rs_program_vertex*)buf2344); + *(bool*)buf2345 = rsIsObject(*(rs_program_raster*)buf2346); + *(bool*)buf2347 = rsIsObject(*(rs_program_store*)buf2348); + *(bool*)buf2349 = rsIsObject(*(rs_font*)buf2350); +#endif + *(bool*)buf2351 = rsIsSphereInFrustum((float4*) buf2352, (float4*) buf2353, (float4*) buf2354, (float4*) buf2355, (float4*) buf2356, (float4*) buf2357, (float4*) buf2358); + *(rs_tm**)buf2359 = rsLocaltime((rs_tm*) buf2360, (const rs_time_t*) buf2361); + *(float*)buf2362 = rsMatrixGet((const rs_matrix4x4*) buf2363, *(uint32_t*)buf2364, *(uint32_t*)buf2365); + *(float*)buf2366 = rsMatrixGet((const rs_matrix3x3*) buf2367, *(uint32_t*)buf2368, *(uint32_t*)buf2369); + *(float*)buf2370 = rsMatrixGet((const rs_matrix2x2*) buf2371, *(uint32_t*)buf2372, *(uint32_t*)buf2373); + *(bool*)buf2374 = rsMatrixInverse((rs_matrix4x4*) buf2375); + *(bool*)buf2376 = rsMatrixInverseTranspose((rs_matrix4x4*) buf2377); + rsMatrixLoad((rs_matrix4x4*) buf2378, (const float*) buf2379); + rsMatrixLoad((rs_matrix3x3*) buf2380, (const float*) buf2381); + rsMatrixLoad((rs_matrix2x2*) buf2382, (const float*) buf2383); + rsMatrixLoad((rs_matrix4x4*) buf2384, (const rs_matrix4x4*) buf2385); + rsMatrixLoad((rs_matrix3x3*) buf2386, (const rs_matrix3x3*) buf2387); + rsMatrixLoad((rs_matrix2x2*) buf2388, (const rs_matrix2x2*) buf2389); + rsMatrixLoad((rs_matrix4x4*) buf2390, (const rs_matrix3x3*) buf2391); + rsMatrixLoad((rs_matrix4x4*) buf2392, (const rs_matrix2x2*) buf2393); + rsMatrixLoadFrustum((rs_matrix4x4*) buf2394, *(float*)buf2395, *(float*)buf2396, *(float*)buf2397, *(float*)buf2398, *(float*)buf2399, *(float*)buf2400); + rsMatrixLoadIdentity((rs_matrix4x4*) buf2401); + rsMatrixLoadIdentity((rs_matrix3x3*) buf2402); + rsMatrixLoadIdentity((rs_matrix2x2*) buf2403); + rsMatrixLoadMultiply((rs_matrix4x4*) buf2404, (const rs_matrix4x4*) buf2405, (const rs_matrix4x4*) buf2406); + rsMatrixLoadMultiply((rs_matrix3x3*) buf2407, (const rs_matrix3x3*) buf2408, (const rs_matrix3x3*) buf2409); + rsMatrixLoadMultiply((rs_matrix2x2*) buf2410, (const rs_matrix2x2*) buf2411, (const rs_matrix2x2*) buf2412); + rsMatrixLoadOrtho((rs_matrix4x4*) buf2413, *(float*)buf2414, *(float*)buf2415, *(float*)buf2416, *(float*)buf2417, *(float*)buf2418, *(float*)buf2419); + rsMatrixLoadPerspective((rs_matrix4x4*) buf2420, *(float*)buf2421, *(float*)buf2422, *(float*)buf2423, *(float*)buf2424); + rsMatrixLoadRotate((rs_matrix4x4*) buf2425, *(float*)buf2426, *(float*)buf2427, *(float*)buf2428, *(float*)buf2429); + rsMatrixLoadScale((rs_matrix4x4*) buf2430, *(float*)buf2431, *(float*)buf2432, *(float*)buf2433); + rsMatrixLoadTranslate((rs_matrix4x4*) buf2434, *(float*)buf2435, *(float*)buf2436, *(float*)buf2437); + rsMatrixMultiply((rs_matrix4x4*) buf2438, (const rs_matrix4x4*) buf2439); + rsMatrixMultiply((rs_matrix3x3*) buf2440, (const rs_matrix3x3*) buf2441); + rsMatrixMultiply((rs_matrix2x2*) buf2442, (const rs_matrix2x2*) buf2443); + *(float4*)buf2444 = rsMatrixMultiply((const rs_matrix4x4*) buf2445, *(float4*)buf2446); + *(float4*)buf2447 = rsMatrixMultiply((const rs_matrix4x4*) buf2448, *(float3*)buf2449); + *(float4*)buf2450 = rsMatrixMultiply((const rs_matrix4x4*) buf2451, *(float2*)buf2452); + *(float3*)buf2453 = rsMatrixMultiply((const rs_matrix3x3*) buf2454, *(float3*)buf2455); + *(float3*)buf2456 = rsMatrixMultiply((const rs_matrix3x3*) buf2457, *(float2*)buf2458); + *(float2*)buf2459 = rsMatrixMultiply((const rs_matrix2x2*) buf2460, *(float2*)buf2461); + rsMatrixRotate((rs_matrix4x4*) buf2462, *(float*)buf2463, *(float*)buf2464, *(float*)buf2465, *(float*)buf2466); + rsMatrixScale((rs_matrix4x4*) buf2467, *(float*)buf2468, *(float*)buf2469, *(float*)buf2470); + rsMatrixSet((rs_matrix4x4*) buf2471, *(uint32_t*)buf2472, *(uint32_t*)buf2473, *(float*)buf2474); + rsMatrixSet((rs_matrix3x3*) buf2475, *(uint32_t*)buf2476, *(uint32_t*)buf2477, *(float*)buf2478); + rsMatrixSet((rs_matrix2x2*) buf2479, *(uint32_t*)buf2480, *(uint32_t*)buf2481, *(float*)buf2482); + rsMatrixTranslate((rs_matrix4x4*) buf2483, *(float*)buf2484, *(float*)buf2485, *(float*)buf2486); + rsMatrixTranspose((rs_matrix4x4*) buf2487); + rsMatrixTranspose((rs_matrix3x3*) buf2488); + rsMatrixTranspose((rs_matrix2x2*) buf2489); + *(uchar4*)buf2490 = rsPackColorTo8888(*(float*)buf2491, *(float*)buf2492, *(float*)buf2493); + *(uchar4*)buf2494 = rsPackColorTo8888(*(float*)buf2495, *(float*)buf2496, *(float*)buf2497, *(float*)buf2498); + *(uchar4*)buf2499 = rsPackColorTo8888(*(float3*)buf2500); + *(uchar4*)buf2501 = rsPackColorTo8888(*(float4*)buf2502); + rsQuaternionAdd((rs_quaternion*) buf2503, (const rs_quaternion*) buf2504); + rsQuaternionConjugate((rs_quaternion*) buf2505); + *(float*)buf2506 = rsQuaternionDot((const rs_quaternion*) buf2507, (const rs_quaternion*) buf2508); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2509, (const rs_quaternion*) buf2510); + rsQuaternionLoadRotate((rs_quaternion*) buf2511, *(float*)buf2512, *(float*)buf2513, *(float*)buf2514, *(float*)buf2515); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2516, *(float*)buf2517, *(float*)buf2518, *(float*)buf2519, *(float*)buf2520); + rsQuaternionMultiply((rs_quaternion*) buf2521, *(float*)buf2522); + rsQuaternionMultiply((rs_quaternion*) buf2523, (const rs_quaternion*) buf2524); + rsQuaternionNormalize((rs_quaternion*) buf2525); + rsQuaternionSet((rs_quaternion*) buf2526, *(float*)buf2527, *(float*)buf2528, *(float*)buf2529, *(float*)buf2530); + rsQuaternionSet((rs_quaternion*) buf2531, (const rs_quaternion*) buf2532); + rsQuaternionSlerp((rs_quaternion*) buf2533, (const rs_quaternion*) buf2534, (const rs_quaternion*) buf2535, *(float*)buf2536); + *(int*)buf2537 = rsRand(*(int*)buf2538); + *(int*)buf2539 = rsRand(*(int*)buf2540, *(int*)buf2541); + *(float*)buf2542 = rsRand(*(float*)buf2543); + *(float*)buf2544 = rsRand(*(float*)buf2545, *(float*)buf2546); + *(float4*)buf2547 = rsSample(*(rs_allocation*)buf2548, *(rs_sampler*)buf2549, *(float*)buf2550); + *(float4*)buf2551 = rsSample(*(rs_allocation*)buf2552, *(rs_sampler*)buf2553, *(float*)buf2554, *(float*)buf2555); + *(float4*)buf2556 = rsSample(*(rs_allocation*)buf2557, *(rs_sampler*)buf2558, *(float2*)buf2559); + *(float4*)buf2560 = rsSample(*(rs_allocation*)buf2561, *(rs_sampler*)buf2562, *(float2*)buf2563, *(float*)buf2564); + *(float*)buf2565 = rsSamplerGetAnisotropy(*(rs_sampler*)buf2566); + *(rs_sampler_value*)buf2567 = rsSamplerGetMagnification(*(rs_sampler*)buf2568); + *(rs_sampler_value*)buf2569 = rsSamplerGetMinification(*(rs_sampler*)buf2570); + *(rs_sampler_value*)buf2571 = rsSamplerGetWrapS(*(rs_sampler*)buf2572); + *(rs_sampler_value*)buf2573 = rsSamplerGetWrapT(*(rs_sampler*)buf2574); + *(bool*)buf2575 = rsSendToClient(*(int*)buf2576); + *(bool*)buf2577 = rsSendToClient(*(int*)buf2578, (const void*) buf2579, *(uint*)buf2580); + rsSendToClientBlocking(*(int*)buf2581); + rsSendToClientBlocking(*(int*)buf2582, (const void*) buf2583, *(uint*)buf2584); + rsSetElementAt(*(rs_allocation*)buf2585, (void*) buf2586, *(uint32_t*)buf2587); + rsSetElementAt(*(rs_allocation*)buf2588, (void*) buf2589, *(uint32_t*)buf2590, *(uint32_t*)buf2591); + rsSetElementAt_float(*(rs_allocation*)buf2592, *(float*)buf2593, *(uint32_t*)buf2594); + rsSetElementAt_float2(*(rs_allocation*)buf2595, *(float2*)buf2596, *(uint32_t*)buf2597); + rsSetElementAt_float3(*(rs_allocation*)buf2598, *(float3*)buf2599, *(uint32_t*)buf2600); + rsSetElementAt_float4(*(rs_allocation*)buf2601, *(float4*)buf2602, *(uint32_t*)buf2603); + rsSetElementAt_double(*(rs_allocation*)buf2604, *(double*)buf2605, *(uint32_t*)buf2606); + rsSetElementAt_double2(*(rs_allocation*)buf2607, *(double2*)buf2608, *(uint32_t*)buf2609); + rsSetElementAt_double3(*(rs_allocation*)buf2610, *(double3*)buf2611, *(uint32_t*)buf2612); + rsSetElementAt_double4(*(rs_allocation*)buf2613, *(double4*)buf2614, *(uint32_t*)buf2615); + rsSetElementAt_char(*(rs_allocation*)buf2616, *(char*)buf2617, *(uint32_t*)buf2618); + rsSetElementAt_char2(*(rs_allocation*)buf2619, *(char2*)buf2620, *(uint32_t*)buf2621); + rsSetElementAt_char3(*(rs_allocation*)buf2622, *(char3*)buf2623, *(uint32_t*)buf2624); + rsSetElementAt_char4(*(rs_allocation*)buf2625, *(char4*)buf2626, *(uint32_t*)buf2627); + rsSetElementAt_uchar(*(rs_allocation*)buf2628, *(uchar*)buf2629, *(uint32_t*)buf2630); + rsSetElementAt_uchar2(*(rs_allocation*)buf2631, *(uchar2*)buf2632, *(uint32_t*)buf2633); + rsSetElementAt_uchar3(*(rs_allocation*)buf2634, *(uchar3*)buf2635, *(uint32_t*)buf2636); + rsSetElementAt_uchar4(*(rs_allocation*)buf2637, *(uchar4*)buf2638, *(uint32_t*)buf2639); + rsSetElementAt_short(*(rs_allocation*)buf2640, *(short*)buf2641, *(uint32_t*)buf2642); + rsSetElementAt_short2(*(rs_allocation*)buf2643, *(short2*)buf2644, *(uint32_t*)buf2645); + rsSetElementAt_short3(*(rs_allocation*)buf2646, *(short3*)buf2647, *(uint32_t*)buf2648); + rsSetElementAt_short4(*(rs_allocation*)buf2649, *(short4*)buf2650, *(uint32_t*)buf2651); + rsSetElementAt_ushort(*(rs_allocation*)buf2652, *(ushort*)buf2653, *(uint32_t*)buf2654); + rsSetElementAt_ushort2(*(rs_allocation*)buf2655, *(ushort2*)buf2656, *(uint32_t*)buf2657); + rsSetElementAt_ushort3(*(rs_allocation*)buf2658, *(ushort3*)buf2659, *(uint32_t*)buf2660); + rsSetElementAt_ushort4(*(rs_allocation*)buf2661, *(ushort4*)buf2662, *(uint32_t*)buf2663); + rsSetElementAt_int(*(rs_allocation*)buf2664, *(int*)buf2665, *(uint32_t*)buf2666); + rsSetElementAt_int2(*(rs_allocation*)buf2667, *(int2*)buf2668, *(uint32_t*)buf2669); + rsSetElementAt_int3(*(rs_allocation*)buf2670, *(int3*)buf2671, *(uint32_t*)buf2672); + rsSetElementAt_int4(*(rs_allocation*)buf2673, *(int4*)buf2674, *(uint32_t*)buf2675); + rsSetElementAt_uint(*(rs_allocation*)buf2676, *(uint*)buf2677, *(uint32_t*)buf2678); + rsSetElementAt_uint2(*(rs_allocation*)buf2679, *(uint2*)buf2680, *(uint32_t*)buf2681); + rsSetElementAt_uint3(*(rs_allocation*)buf2682, *(uint3*)buf2683, *(uint32_t*)buf2684); + rsSetElementAt_uint4(*(rs_allocation*)buf2685, *(uint4*)buf2686, *(uint32_t*)buf2687); + rsSetElementAt_long(*(rs_allocation*)buf2688, *(long*)buf2689, *(uint32_t*)buf2690); + rsSetElementAt_long2(*(rs_allocation*)buf2691, *(long2*)buf2692, *(uint32_t*)buf2693); + rsSetElementAt_long3(*(rs_allocation*)buf2694, *(long3*)buf2695, *(uint32_t*)buf2696); + rsSetElementAt_long4(*(rs_allocation*)buf2697, *(long4*)buf2698, *(uint32_t*)buf2699); + rsSetElementAt_ulong(*(rs_allocation*)buf2700, *(ulong*)buf2701, *(uint32_t*)buf2702); + rsSetElementAt_ulong2(*(rs_allocation*)buf2703, *(ulong2*)buf2704, *(uint32_t*)buf2705); + rsSetElementAt_ulong3(*(rs_allocation*)buf2706, *(ulong3*)buf2707, *(uint32_t*)buf2708); + rsSetElementAt_ulong4(*(rs_allocation*)buf2709, *(ulong4*)buf2710, *(uint32_t*)buf2711); + rsSetElementAt_float(*(rs_allocation*)buf2712, *(float*)buf2713, *(uint32_t*)buf2714, *(uint32_t*)buf2715); + rsSetElementAt_float2(*(rs_allocation*)buf2716, *(float2*)buf2717, *(uint32_t*)buf2718, *(uint32_t*)buf2719); + rsSetElementAt_float3(*(rs_allocation*)buf2720, *(float3*)buf2721, *(uint32_t*)buf2722, *(uint32_t*)buf2723); + rsSetElementAt_float4(*(rs_allocation*)buf2724, *(float4*)buf2725, *(uint32_t*)buf2726, *(uint32_t*)buf2727); + rsSetElementAt_double(*(rs_allocation*)buf2728, *(double*)buf2729, *(uint32_t*)buf2730, *(uint32_t*)buf2731); + rsSetElementAt_double2(*(rs_allocation*)buf2732, *(double2*)buf2733, *(uint32_t*)buf2734, *(uint32_t*)buf2735); + rsSetElementAt_double3(*(rs_allocation*)buf2736, *(double3*)buf2737, *(uint32_t*)buf2738, *(uint32_t*)buf2739); + rsSetElementAt_double4(*(rs_allocation*)buf2740, *(double4*)buf2741, *(uint32_t*)buf2742, *(uint32_t*)buf2743); + rsSetElementAt_char(*(rs_allocation*)buf2744, *(char*)buf2745, *(uint32_t*)buf2746, *(uint32_t*)buf2747); + rsSetElementAt_char2(*(rs_allocation*)buf2748, *(char2*)buf2749, *(uint32_t*)buf2750, *(uint32_t*)buf2751); + rsSetElementAt_char3(*(rs_allocation*)buf2752, *(char3*)buf2753, *(uint32_t*)buf2754, *(uint32_t*)buf2755); + rsSetElementAt_char4(*(rs_allocation*)buf2756, *(char4*)buf2757, *(uint32_t*)buf2758, *(uint32_t*)buf2759); + rsSetElementAt_uchar(*(rs_allocation*)buf2760, *(uchar*)buf2761, *(uint32_t*)buf2762, *(uint32_t*)buf2763); + rsSetElementAt_uchar2(*(rs_allocation*)buf2764, *(uchar2*)buf2765, *(uint32_t*)buf2766, *(uint32_t*)buf2767); + rsSetElementAt_uchar3(*(rs_allocation*)buf2768, *(uchar3*)buf2769, *(uint32_t*)buf2770, *(uint32_t*)buf2771); + rsSetElementAt_uchar4(*(rs_allocation*)buf2772, *(uchar4*)buf2773, *(uint32_t*)buf2774, *(uint32_t*)buf2775); + rsSetElementAt_short(*(rs_allocation*)buf2776, *(short*)buf2777, *(uint32_t*)buf2778, *(uint32_t*)buf2779); + rsSetElementAt_short2(*(rs_allocation*)buf2780, *(short2*)buf2781, *(uint32_t*)buf2782, *(uint32_t*)buf2783); + rsSetElementAt_short3(*(rs_allocation*)buf2784, *(short3*)buf2785, *(uint32_t*)buf2786, *(uint32_t*)buf2787); + rsSetElementAt_short4(*(rs_allocation*)buf2788, *(short4*)buf2789, *(uint32_t*)buf2790, *(uint32_t*)buf2791); + rsSetElementAt_ushort(*(rs_allocation*)buf2792, *(ushort*)buf2793, *(uint32_t*)buf2794, *(uint32_t*)buf2795); + rsSetElementAt_ushort2(*(rs_allocation*)buf2796, *(ushort2*)buf2797, *(uint32_t*)buf2798, *(uint32_t*)buf2799); + rsSetElementAt_ushort3(*(rs_allocation*)buf2800, *(ushort3*)buf2801, *(uint32_t*)buf2802, *(uint32_t*)buf2803); + rsSetElementAt_ushort4(*(rs_allocation*)buf2804, *(ushort4*)buf2805, *(uint32_t*)buf2806, *(uint32_t*)buf2807); + rsSetElementAt_int(*(rs_allocation*)buf2808, *(int*)buf2809, *(uint32_t*)buf2810, *(uint32_t*)buf2811); + rsSetElementAt_int2(*(rs_allocation*)buf2812, *(int2*)buf2813, *(uint32_t*)buf2814, *(uint32_t*)buf2815); + rsSetElementAt_int3(*(rs_allocation*)buf2816, *(int3*)buf2817, *(uint32_t*)buf2818, *(uint32_t*)buf2819); + rsSetElementAt_int4(*(rs_allocation*)buf2820, *(int4*)buf2821, *(uint32_t*)buf2822, *(uint32_t*)buf2823); + rsSetElementAt_uint(*(rs_allocation*)buf2824, *(uint*)buf2825, *(uint32_t*)buf2826, *(uint32_t*)buf2827); + rsSetElementAt_uint2(*(rs_allocation*)buf2828, *(uint2*)buf2829, *(uint32_t*)buf2830, *(uint32_t*)buf2831); + rsSetElementAt_uint3(*(rs_allocation*)buf2832, *(uint3*)buf2833, *(uint32_t*)buf2834, *(uint32_t*)buf2835); + rsSetElementAt_uint4(*(rs_allocation*)buf2836, *(uint4*)buf2837, *(uint32_t*)buf2838, *(uint32_t*)buf2839); + rsSetElementAt_long(*(rs_allocation*)buf2840, *(long*)buf2841, *(uint32_t*)buf2842, *(uint32_t*)buf2843); + rsSetElementAt_long2(*(rs_allocation*)buf2844, *(long2*)buf2845, *(uint32_t*)buf2846, *(uint32_t*)buf2847); + rsSetElementAt_long3(*(rs_allocation*)buf2848, *(long3*)buf2849, *(uint32_t*)buf2850, *(uint32_t*)buf2851); + rsSetElementAt_long4(*(rs_allocation*)buf2852, *(long4*)buf2853, *(uint32_t*)buf2854, *(uint32_t*)buf2855); + rsSetElementAt_ulong(*(rs_allocation*)buf2856, *(ulong*)buf2857, *(uint32_t*)buf2858, *(uint32_t*)buf2859); + rsSetElementAt_ulong2(*(rs_allocation*)buf2860, *(ulong2*)buf2861, *(uint32_t*)buf2862, *(uint32_t*)buf2863); + rsSetElementAt_ulong3(*(rs_allocation*)buf2864, *(ulong3*)buf2865, *(uint32_t*)buf2866, *(uint32_t*)buf2867); + rsSetElementAt_ulong4(*(rs_allocation*)buf2868, *(ulong4*)buf2869, *(uint32_t*)buf2870, *(uint32_t*)buf2871); + rsSetElementAt_float(*(rs_allocation*)buf2872, *(float*)buf2873, *(uint32_t*)buf2874, *(uint32_t*)buf2875, *(uint32_t*)buf2876); + rsSetElementAt_float2(*(rs_allocation*)buf2877, *(float2*)buf2878, *(uint32_t*)buf2879, *(uint32_t*)buf2880, *(uint32_t*)buf2881); + rsSetElementAt_float3(*(rs_allocation*)buf2882, *(float3*)buf2883, *(uint32_t*)buf2884, *(uint32_t*)buf2885, *(uint32_t*)buf2886); + rsSetElementAt_float4(*(rs_allocation*)buf2887, *(float4*)buf2888, *(uint32_t*)buf2889, *(uint32_t*)buf2890, *(uint32_t*)buf2891); + rsSetElementAt_double(*(rs_allocation*)buf2892, *(double*)buf2893, *(uint32_t*)buf2894, *(uint32_t*)buf2895, *(uint32_t*)buf2896); + rsSetElementAt_double2(*(rs_allocation*)buf2897, *(double2*)buf2898, *(uint32_t*)buf2899, *(uint32_t*)buf2900, *(uint32_t*)buf2901); + rsSetElementAt_double3(*(rs_allocation*)buf2902, *(double3*)buf2903, *(uint32_t*)buf2904, *(uint32_t*)buf2905, *(uint32_t*)buf2906); + rsSetElementAt_double4(*(rs_allocation*)buf2907, *(double4*)buf2908, *(uint32_t*)buf2909, *(uint32_t*)buf2910, *(uint32_t*)buf2911); + rsSetElementAt_char(*(rs_allocation*)buf2912, *(char*)buf2913, *(uint32_t*)buf2914, *(uint32_t*)buf2915, *(uint32_t*)buf2916); + rsSetElementAt_char2(*(rs_allocation*)buf2917, *(char2*)buf2918, *(uint32_t*)buf2919, *(uint32_t*)buf2920, *(uint32_t*)buf2921); + rsSetElementAt_char3(*(rs_allocation*)buf2922, *(char3*)buf2923, *(uint32_t*)buf2924, *(uint32_t*)buf2925, *(uint32_t*)buf2926); + rsSetElementAt_char4(*(rs_allocation*)buf2927, *(char4*)buf2928, *(uint32_t*)buf2929, *(uint32_t*)buf2930, *(uint32_t*)buf2931); + rsSetElementAt_uchar(*(rs_allocation*)buf2932, *(uchar*)buf2933, *(uint32_t*)buf2934, *(uint32_t*)buf2935, *(uint32_t*)buf2936); + rsSetElementAt_uchar2(*(rs_allocation*)buf2937, *(uchar2*)buf2938, *(uint32_t*)buf2939, *(uint32_t*)buf2940, *(uint32_t*)buf2941); + rsSetElementAt_uchar3(*(rs_allocation*)buf2942, *(uchar3*)buf2943, *(uint32_t*)buf2944, *(uint32_t*)buf2945, *(uint32_t*)buf2946); + rsSetElementAt_uchar4(*(rs_allocation*)buf2947, *(uchar4*)buf2948, *(uint32_t*)buf2949, *(uint32_t*)buf2950, *(uint32_t*)buf2951); + rsSetElementAt_short(*(rs_allocation*)buf2952, *(short*)buf2953, *(uint32_t*)buf2954, *(uint32_t*)buf2955, *(uint32_t*)buf2956); + rsSetElementAt_short2(*(rs_allocation*)buf2957, *(short2*)buf2958, *(uint32_t*)buf2959, *(uint32_t*)buf2960, *(uint32_t*)buf2961); + rsSetElementAt_short3(*(rs_allocation*)buf2962, *(short3*)buf2963, *(uint32_t*)buf2964, *(uint32_t*)buf2965, *(uint32_t*)buf2966); + rsSetElementAt_short4(*(rs_allocation*)buf2967, *(short4*)buf2968, *(uint32_t*)buf2969, *(uint32_t*)buf2970, *(uint32_t*)buf2971); + rsSetElementAt_ushort(*(rs_allocation*)buf2972, *(ushort*)buf2973, *(uint32_t*)buf2974, *(uint32_t*)buf2975, *(uint32_t*)buf2976); + rsSetElementAt_ushort2(*(rs_allocation*)buf2977, *(ushort2*)buf2978, *(uint32_t*)buf2979, *(uint32_t*)buf2980, *(uint32_t*)buf2981); + rsSetElementAt_ushort3(*(rs_allocation*)buf2982, *(ushort3*)buf2983, *(uint32_t*)buf2984, *(uint32_t*)buf2985, *(uint32_t*)buf2986); + rsSetElementAt_ushort4(*(rs_allocation*)buf2987, *(ushort4*)buf2988, *(uint32_t*)buf2989, *(uint32_t*)buf2990, *(uint32_t*)buf2991); + rsSetElementAt_int(*(rs_allocation*)buf2992, *(int*)buf2993, *(uint32_t*)buf2994, *(uint32_t*)buf2995, *(uint32_t*)buf2996); + rsSetElementAt_int2(*(rs_allocation*)buf2997, *(int2*)buf2998, *(uint32_t*)buf2999, *(uint32_t*)buf3000, *(uint32_t*)buf3001); + rsSetElementAt_int3(*(rs_allocation*)buf3002, *(int3*)buf3003, *(uint32_t*)buf3004, *(uint32_t*)buf3005, *(uint32_t*)buf3006); + rsSetElementAt_int4(*(rs_allocation*)buf3007, *(int4*)buf3008, *(uint32_t*)buf3009, *(uint32_t*)buf3010, *(uint32_t*)buf3011); + rsSetElementAt_uint(*(rs_allocation*)buf3012, *(uint*)buf3013, *(uint32_t*)buf3014, *(uint32_t*)buf3015, *(uint32_t*)buf3016); + rsSetElementAt_uint2(*(rs_allocation*)buf3017, *(uint2*)buf3018, *(uint32_t*)buf3019, *(uint32_t*)buf3020, *(uint32_t*)buf3021); + rsSetElementAt_uint3(*(rs_allocation*)buf3022, *(uint3*)buf3023, *(uint32_t*)buf3024, *(uint32_t*)buf3025, *(uint32_t*)buf3026); + rsSetElementAt_uint4(*(rs_allocation*)buf3027, *(uint4*)buf3028, *(uint32_t*)buf3029, *(uint32_t*)buf3030, *(uint32_t*)buf3031); + rsSetElementAt_long(*(rs_allocation*)buf3032, *(long*)buf3033, *(uint32_t*)buf3034, *(uint32_t*)buf3035, *(uint32_t*)buf3036); + rsSetElementAt_long2(*(rs_allocation*)buf3037, *(long2*)buf3038, *(uint32_t*)buf3039, *(uint32_t*)buf3040, *(uint32_t*)buf3041); + rsSetElementAt_long3(*(rs_allocation*)buf3042, *(long3*)buf3043, *(uint32_t*)buf3044, *(uint32_t*)buf3045, *(uint32_t*)buf3046); + rsSetElementAt_long4(*(rs_allocation*)buf3047, *(long4*)buf3048, *(uint32_t*)buf3049, *(uint32_t*)buf3050, *(uint32_t*)buf3051); + rsSetElementAt_ulong(*(rs_allocation*)buf3052, *(ulong*)buf3053, *(uint32_t*)buf3054, *(uint32_t*)buf3055, *(uint32_t*)buf3056); + rsSetElementAt_ulong2(*(rs_allocation*)buf3057, *(ulong2*)buf3058, *(uint32_t*)buf3059, *(uint32_t*)buf3060, *(uint32_t*)buf3061); + rsSetElementAt_ulong3(*(rs_allocation*)buf3062, *(ulong3*)buf3063, *(uint32_t*)buf3064, *(uint32_t*)buf3065, *(uint32_t*)buf3066); + rsSetElementAt_ulong4(*(rs_allocation*)buf3067, *(ulong4*)buf3068, *(uint32_t*)buf3069, *(uint32_t*)buf3070, *(uint32_t*)buf3071); + rsSetObject((rs_element*) buf3072, *(rs_element*)buf3073); + rsSetObject((rs_type*) buf3074, *(rs_type*)buf3075); + rsSetObject((rs_allocation*) buf3076, *(rs_allocation*)buf3077); + rsSetObject((rs_sampler*) buf3078, *(rs_sampler*)buf3079); + rsSetObject((rs_script*) buf3080, *(rs_script*)buf3081); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf3082, *(rs_mesh*)buf3083); + rsSetObject((rs_program_fragment*) buf3084, *(rs_program_fragment*)buf3085); + rsSetObject((rs_program_vertex*) buf3086, *(rs_program_vertex*)buf3087); + rsSetObject((rs_program_raster*) buf3088, *(rs_program_raster*)buf3089); + rsSetObject((rs_program_store*) buf3090, *(rs_program_store*)buf3091); + rsSetObject((rs_font*) buf3092, *(rs_font*)buf3093); +#endif + *(rs_time_t*)buf3094 = rsTime((rs_time_t*) buf3095); + *(float4*)buf3096 = rsUnpackColor8888(*(uchar4*)buf3097); + *(int64_t*)buf3098 = rsUptimeMillis(); + *(int64_t*)buf3099 = rsUptimeNanos(); + *(float4*)buf3100 = rsYuvToRGBA_float4(*(uchar*)buf3101, *(uchar*)buf3102, *(uchar*)buf3103); + *(uchar4*)buf3104 = rsYuvToRGBA_uchar4(*(uchar*)buf3105, *(uchar*)buf3106, *(uchar*)buf3107); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf3108); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf3109, *(rs_allocation_usage_type*)buf3110); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf3111, *(uint*)buf3112); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf3113, *(uint*)buf3114, *(rs_allocation*)buf3115); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf3116, *(uint*)buf3117, *(rs_allocation*)buf3118); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf3119); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf3120); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf3121); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf3122); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf3123); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf3124); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf3125, *(uint*)buf3126, *(rs_sampler*)buf3127); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf3128, *(uint*)buf3129, *(rs_allocation*)buf3130); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf3131, *(float*)buf3132, *(float*)buf3133, *(float*)buf3134); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf3135); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf3136); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3137); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3138, *(uint*)buf3139); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3140, *(uint*)buf3141, *(uint*)buf3142, *(uint*)buf3143); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf3144, *(float*)buf3145, *(float*)buf3146, *(float*)buf3147, *(float*)buf3148, *(float*)buf3149, *(float*)buf3150, *(float*)buf3151, *(float*)buf3152, *(float*)buf3153, *(float*)buf3154, *(float*)buf3155); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf3156, *(float*)buf3157, *(float*)buf3158, *(float*)buf3159, *(float*)buf3160, *(float*)buf3161, *(float*)buf3162, *(float*)buf3163, *(float*)buf3164, *(float*)buf3165, *(float*)buf3166, *(float*)buf3167, *(float*)buf3168, *(float*)buf3169, *(float*)buf3170, *(float*)buf3171, *(float*)buf3172, *(float*)buf3173, *(float*)buf3174, *(float*)buf3175); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf3176, *(float*)buf3177, *(float*)buf3178, *(float*)buf3179, *(float*)buf3180); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf3181, *(float*)buf3182, *(float*)buf3183, *(float*)buf3184, *(float*)buf3185); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf3186, *(int*)buf3187, *(int*)buf3188); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf3189, *(int*)buf3190, *(int*)buf3191); +#endif +#ifndef __LP64__ + *(uint*)buf3192 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf3193, *(float*)buf3194, *(float*)buf3195, *(float*)buf3196); +#endif +#ifndef __LP64__ + *(uint*)buf3197 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf3198 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf3199, (int*) buf3200, (int*) buf3201, (int*) buf3202, (int*) buf3203); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf3204, (int*) buf3205, (int*) buf3206, (int*) buf3207, (int*) buf3208); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf3209, (float*) buf3210, (float*) buf3211, (float*) buf3212, (float*) buf3213, (float*) buf3214, (float*) buf3215); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf3216, (float3*) buf3217, (float3*) buf3218); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf3219 = rsgMeshGetIndexAllocation(*(rs_mesh*)buf3220, *(uint32_t*)buf3221); +#endif +#ifndef __LP64__ + *(rs_primitive*)buf3222 = rsgMeshGetPrimitive(*(rs_mesh*)buf3223, *(uint32_t*)buf3224); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3225 = rsgMeshGetPrimitiveCount(*(rs_mesh*)buf3226); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf3227 = rsgMeshGetVertexAllocation(*(rs_mesh*)buf3228, *(uint32_t*)buf3229); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3230 = rsgMeshGetVertexAllocationCount(*(rs_mesh*)buf3231); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf3232, *(float*)buf3233, *(float*)buf3234, *(float*)buf3235, *(float*)buf3236); +#endif +#ifndef __LP64__ + *(rs_cull_mode*)buf3237 = rsgProgramRasterGetCullMode(*(rs_program_raster*)buf3238); +#endif +#ifndef __LP64__ + *(bool*)buf3239 = rsgProgramRasterIsPointSpriteEnabled(*(rs_program_raster*)buf3240); +#endif +#ifndef __LP64__ + *(rs_blend_dst_func*)buf3241 = rsgProgramStoreGetBlendDstFunc(*(rs_program_store*)buf3242); +#endif +#ifndef __LP64__ + *(rs_blend_src_func*)buf3243 = rsgProgramStoreGetBlendSrcFunc(*(rs_program_store*)buf3244); +#endif +#ifndef __LP64__ + *(rs_depth_func*)buf3245 = rsgProgramStoreGetDepthFunc(*(rs_program_store*)buf3246); +#endif +#ifndef __LP64__ + *(bool*)buf3247 = rsgProgramStoreIsColorMaskAlphaEnabled(*(rs_program_store*)buf3248); +#endif +#ifndef __LP64__ + *(bool*)buf3249 = rsgProgramStoreIsColorMaskBlueEnabled(*(rs_program_store*)buf3250); +#endif +#ifndef __LP64__ + *(bool*)buf3251 = rsgProgramStoreIsColorMaskGreenEnabled(*(rs_program_store*)buf3252); +#endif +#ifndef __LP64__ + *(bool*)buf3253 = rsgProgramStoreIsColorMaskRedEnabled(*(rs_program_store*)buf3254); +#endif +#ifndef __LP64__ + *(bool*)buf3255 = rsgProgramStoreIsDepthMaskEnabled(*(rs_program_store*)buf3256); +#endif +#ifndef __LP64__ + *(bool*)buf3257 = rsgProgramStoreIsDitherEnabled(*(rs_program_store*)buf3258); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf3259); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf3260); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf3261); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf3262); +#endif + *(float*)buf3263 = rsqrt(*(float*)buf3264); + *(float2*)buf3265 = rsqrt(*(float2*)buf3266); + *(float3*)buf3267 = rsqrt(*(float3*)buf3268); + *(float4*)buf3269 = rsqrt(*(float4*)buf3270); + *(float*)buf3271 = sign(*(float*)buf3272); + *(float2*)buf3273 = sign(*(float2*)buf3274); + *(float3*)buf3275 = sign(*(float3*)buf3276); + *(float4*)buf3277 = sign(*(float4*)buf3278); + *(float*)buf3279 = sin(*(float*)buf3280); + *(float2*)buf3281 = sin(*(float2*)buf3282); + *(float3*)buf3283 = sin(*(float3*)buf3284); + *(float4*)buf3285 = sin(*(float4*)buf3286); + *(float*)buf3287 = sincos(*(float*)buf3288, (float*) buf3289); + *(float2*)buf3290 = sincos(*(float2*)buf3291, (float2*) buf3292); + *(float3*)buf3293 = sincos(*(float3*)buf3294, (float3*) buf3295); + *(float4*)buf3296 = sincos(*(float4*)buf3297, (float4*) buf3298); + *(float*)buf3299 = sinh(*(float*)buf3300); + *(float2*)buf3301 = sinh(*(float2*)buf3302); + *(float3*)buf3303 = sinh(*(float3*)buf3304); + *(float4*)buf3305 = sinh(*(float4*)buf3306); + *(float*)buf3307 = sinpi(*(float*)buf3308); + *(float2*)buf3309 = sinpi(*(float2*)buf3310); + *(float3*)buf3311 = sinpi(*(float3*)buf3312); + *(float4*)buf3313 = sinpi(*(float4*)buf3314); + *(float*)buf3315 = sqrt(*(float*)buf3316); + *(float2*)buf3317 = sqrt(*(float2*)buf3318); + *(float3*)buf3319 = sqrt(*(float3*)buf3320); + *(float4*)buf3321 = sqrt(*(float4*)buf3322); + *(float*)buf3323 = step(*(float*)buf3324, *(float*)buf3325); + *(float2*)buf3326 = step(*(float2*)buf3327, *(float2*)buf3328); + *(float3*)buf3329 = step(*(float3*)buf3330, *(float3*)buf3331); + *(float4*)buf3332 = step(*(float4*)buf3333, *(float4*)buf3334); + *(float2*)buf3335 = step(*(float2*)buf3336, *(float*)buf3337); + *(float3*)buf3338 = step(*(float3*)buf3339, *(float*)buf3340); + *(float4*)buf3341 = step(*(float4*)buf3342, *(float*)buf3343); + *(float*)buf3344 = tan(*(float*)buf3345); + *(float2*)buf3346 = tan(*(float2*)buf3347); + *(float3*)buf3348 = tan(*(float3*)buf3349); + *(float4*)buf3350 = tan(*(float4*)buf3351); + *(float*)buf3352 = tanh(*(float*)buf3353); + *(float2*)buf3354 = tanh(*(float2*)buf3355); + *(float3*)buf3356 = tanh(*(float3*)buf3357); + *(float4*)buf3358 = tanh(*(float4*)buf3359); + *(float*)buf3360 = tanpi(*(float*)buf3361); + *(float2*)buf3362 = tanpi(*(float2*)buf3363); + *(float3*)buf3364 = tanpi(*(float3*)buf3365); + *(float4*)buf3366 = tanpi(*(float4*)buf3367); + *(float*)buf3368 = tgamma(*(float*)buf3369); + *(float2*)buf3370 = tgamma(*(float2*)buf3371); + *(float3*)buf3372 = tgamma(*(float3*)buf3373); + *(float4*)buf3374 = tgamma(*(float4*)buf3375); + *(float*)buf3376 = trunc(*(float*)buf3377); + *(float2*)buf3378 = trunc(*(float2*)buf3379); + *(float3*)buf3380 = trunc(*(float3*)buf3381); + *(float4*)buf3382 = trunc(*(float4*)buf3383); +}
diff --git a/slang/tests/P_all_api_19/stderr.txt.expect b/slang/tests/P_all_api_19/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_19/stderr.txt.expect
diff --git a/slang/tests/P_all_api_19/stdout.txt.expect b/slang/tests/P_all_api_19/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_19/stdout.txt.expect
diff --git a/slang/tests/P_all_api_20/all20.rs b/slang/tests/P_all_api_20/all20.rs new file mode 100644 index 0000000..d3a53e4 --- /dev/null +++ b/slang/tests/P_all_api_20/all20.rs
@@ -0,0 +1,4742 @@ +// -target-api 20 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; +char buf2493[200]; +char buf2494[200]; +char buf2495[200]; +char buf2496[200]; +char buf2497[200]; +char buf2498[200]; +char buf2499[200]; +char buf2500[200]; +char buf2501[200]; +char buf2502[200]; +char buf2503[200]; +char buf2504[200]; +char buf2505[200]; +char buf2506[200]; +char buf2507[200]; +char buf2508[200]; +char buf2509[200]; +char buf2510[200]; +char buf2511[200]; +char buf2512[200]; +char buf2513[200]; +char buf2514[200]; +char buf2515[200]; +char buf2516[200]; +char buf2517[200]; +char buf2518[200]; +char buf2519[200]; +char buf2520[200]; +char buf2521[200]; +char buf2522[200]; +char buf2523[200]; +char buf2524[200]; +char buf2525[200]; +char buf2526[200]; +char buf2527[200]; +char buf2528[200]; +char buf2529[200]; +char buf2530[200]; +char buf2531[200]; +char buf2532[200]; +char buf2533[200]; +char buf2534[200]; +char buf2535[200]; +char buf2536[200]; +char buf2537[200]; +char buf2538[200]; +char buf2539[200]; +char buf2540[200]; +char buf2541[200]; +char buf2542[200]; +char buf2543[200]; +char buf2544[200]; +char buf2545[200]; +char buf2546[200]; +char buf2547[200]; +char buf2548[200]; +char buf2549[200]; +char buf2550[200]; +char buf2551[200]; +char buf2552[200]; +char buf2553[200]; +char buf2554[200]; +char buf2555[200]; +char buf2556[200]; +char buf2557[200]; +char buf2558[200]; +char buf2559[200]; +char buf2560[200]; +char buf2561[200]; +char buf2562[200]; +char buf2563[200]; +char buf2564[200]; +char buf2565[200]; +char buf2566[200]; +char buf2567[200]; +char buf2568[200]; +char buf2569[200]; +char buf2570[200]; +char buf2571[200]; +char buf2572[200]; +char buf2573[200]; +char buf2574[200]; +char buf2575[200]; +char buf2576[200]; +char buf2577[200]; +char buf2578[200]; +char buf2579[200]; +char buf2580[200]; +char buf2581[200]; +char buf2582[200]; +char buf2583[200]; +char buf2584[200]; +char buf2585[200]; +char buf2586[200]; +char buf2587[200]; +char buf2588[200]; +char buf2589[200]; +char buf2590[200]; +char buf2591[200]; +char buf2592[200]; +char buf2593[200]; +char buf2594[200]; +char buf2595[200]; +char buf2596[200]; +char buf2597[200]; +char buf2598[200]; +char buf2599[200]; +char buf2600[200]; +char buf2601[200]; +char buf2602[200]; +char buf2603[200]; +char buf2604[200]; +char buf2605[200]; +char buf2606[200]; +char buf2607[200]; +char buf2608[200]; +char buf2609[200]; +char buf2610[200]; +char buf2611[200]; +char buf2612[200]; +char buf2613[200]; +char buf2614[200]; +char buf2615[200]; +char buf2616[200]; +char buf2617[200]; +char buf2618[200]; +char buf2619[200]; +char buf2620[200]; +char buf2621[200]; +char buf2622[200]; +char buf2623[200]; +char buf2624[200]; +char buf2625[200]; +char buf2626[200]; +char buf2627[200]; +char buf2628[200]; +char buf2629[200]; +char buf2630[200]; +char buf2631[200]; +char buf2632[200]; +char buf2633[200]; +char buf2634[200]; +char buf2635[200]; +char buf2636[200]; +char buf2637[200]; +char buf2638[200]; +char buf2639[200]; +char buf2640[200]; +char buf2641[200]; +char buf2642[200]; +char buf2643[200]; +char buf2644[200]; +char buf2645[200]; +char buf2646[200]; +char buf2647[200]; +char buf2648[200]; +char buf2649[200]; +char buf2650[200]; +char buf2651[200]; +char buf2652[200]; +char buf2653[200]; +char buf2654[200]; +char buf2655[200]; +char buf2656[200]; +char buf2657[200]; +char buf2658[200]; +char buf2659[200]; +char buf2660[200]; +char buf2661[200]; +char buf2662[200]; +char buf2663[200]; +char buf2664[200]; +char buf2665[200]; +char buf2666[200]; +char buf2667[200]; +char buf2668[200]; +char buf2669[200]; +char buf2670[200]; +char buf2671[200]; +char buf2672[200]; +char buf2673[200]; +char buf2674[200]; +char buf2675[200]; +char buf2676[200]; +char buf2677[200]; +char buf2678[200]; +char buf2679[200]; +char buf2680[200]; +char buf2681[200]; +char buf2682[200]; +char buf2683[200]; +char buf2684[200]; +char buf2685[200]; +char buf2686[200]; +char buf2687[200]; +char buf2688[200]; +char buf2689[200]; +char buf2690[200]; +char buf2691[200]; +char buf2692[200]; +char buf2693[200]; +char buf2694[200]; +char buf2695[200]; +char buf2696[200]; +char buf2697[200]; +char buf2698[200]; +char buf2699[200]; +char buf2700[200]; +char buf2701[200]; +char buf2702[200]; +char buf2703[200]; +char buf2704[200]; +char buf2705[200]; +char buf2706[200]; +char buf2707[200]; +char buf2708[200]; +char buf2709[200]; +char buf2710[200]; +char buf2711[200]; +char buf2712[200]; +char buf2713[200]; +char buf2714[200]; +char buf2715[200]; +char buf2716[200]; +char buf2717[200]; +char buf2718[200]; +char buf2719[200]; +char buf2720[200]; +char buf2721[200]; +char buf2722[200]; +char buf2723[200]; +char buf2724[200]; +char buf2725[200]; +char buf2726[200]; +char buf2727[200]; +char buf2728[200]; +char buf2729[200]; +char buf2730[200]; +char buf2731[200]; +char buf2732[200]; +char buf2733[200]; +char buf2734[200]; +char buf2735[200]; +char buf2736[200]; +char buf2737[200]; +char buf2738[200]; +char buf2739[200]; +char buf2740[200]; +char buf2741[200]; +char buf2742[200]; +char buf2743[200]; +char buf2744[200]; +char buf2745[200]; +char buf2746[200]; +char buf2747[200]; +char buf2748[200]; +char buf2749[200]; +char buf2750[200]; +char buf2751[200]; +char buf2752[200]; +char buf2753[200]; +char buf2754[200]; +char buf2755[200]; +char buf2756[200]; +char buf2757[200]; +char buf2758[200]; +char buf2759[200]; +char buf2760[200]; +char buf2761[200]; +char buf2762[200]; +char buf2763[200]; +char buf2764[200]; +char buf2765[200]; +char buf2766[200]; +char buf2767[200]; +char buf2768[200]; +char buf2769[200]; +char buf2770[200]; +char buf2771[200]; +char buf2772[200]; +char buf2773[200]; +char buf2774[200]; +char buf2775[200]; +char buf2776[200]; +char buf2777[200]; +char buf2778[200]; +char buf2779[200]; +char buf2780[200]; +char buf2781[200]; +char buf2782[200]; +char buf2783[200]; +char buf2784[200]; +char buf2785[200]; +char buf2786[200]; +char buf2787[200]; +char buf2788[200]; +char buf2789[200]; +char buf2790[200]; +char buf2791[200]; +char buf2792[200]; +char buf2793[200]; +char buf2794[200]; +char buf2795[200]; +char buf2796[200]; +char buf2797[200]; +char buf2798[200]; +char buf2799[200]; +char buf2800[200]; +char buf2801[200]; +char buf2802[200]; +char buf2803[200]; +char buf2804[200]; +char buf2805[200]; +char buf2806[200]; +char buf2807[200]; +char buf2808[200]; +char buf2809[200]; +char buf2810[200]; +char buf2811[200]; +char buf2812[200]; +char buf2813[200]; +char buf2814[200]; +char buf2815[200]; +char buf2816[200]; +char buf2817[200]; +char buf2818[200]; +char buf2819[200]; +char buf2820[200]; +char buf2821[200]; +char buf2822[200]; +char buf2823[200]; +char buf2824[200]; +char buf2825[200]; +char buf2826[200]; +char buf2827[200]; +char buf2828[200]; +char buf2829[200]; +char buf2830[200]; +char buf2831[200]; +char buf2832[200]; +char buf2833[200]; +char buf2834[200]; +char buf2835[200]; +char buf2836[200]; +char buf2837[200]; +char buf2838[200]; +char buf2839[200]; +char buf2840[200]; +char buf2841[200]; +char buf2842[200]; +char buf2843[200]; +char buf2844[200]; +char buf2845[200]; +char buf2846[200]; +char buf2847[200]; +char buf2848[200]; +char buf2849[200]; +char buf2850[200]; +char buf2851[200]; +char buf2852[200]; +char buf2853[200]; +char buf2854[200]; +char buf2855[200]; +char buf2856[200]; +char buf2857[200]; +char buf2858[200]; +char buf2859[200]; +char buf2860[200]; +char buf2861[200]; +char buf2862[200]; +char buf2863[200]; +char buf2864[200]; +char buf2865[200]; +char buf2866[200]; +char buf2867[200]; +char buf2868[200]; +char buf2869[200]; +char buf2870[200]; +char buf2871[200]; +char buf2872[200]; +char buf2873[200]; +char buf2874[200]; +char buf2875[200]; +char buf2876[200]; +char buf2877[200]; +char buf2878[200]; +char buf2879[200]; +char buf2880[200]; +char buf2881[200]; +char buf2882[200]; +char buf2883[200]; +char buf2884[200]; +char buf2885[200]; +char buf2886[200]; +char buf2887[200]; +char buf2888[200]; +char buf2889[200]; +char buf2890[200]; +char buf2891[200]; +char buf2892[200]; +char buf2893[200]; +char buf2894[200]; +char buf2895[200]; +char buf2896[200]; +char buf2897[200]; +char buf2898[200]; +char buf2899[200]; +char buf2900[200]; +char buf2901[200]; +char buf2902[200]; +char buf2903[200]; +char buf2904[200]; +char buf2905[200]; +char buf2906[200]; +char buf2907[200]; +char buf2908[200]; +char buf2909[200]; +char buf2910[200]; +char buf2911[200]; +char buf2912[200]; +char buf2913[200]; +char buf2914[200]; +char buf2915[200]; +char buf2916[200]; +char buf2917[200]; +char buf2918[200]; +char buf2919[200]; +char buf2920[200]; +char buf2921[200]; +char buf2922[200]; +char buf2923[200]; +char buf2924[200]; +char buf2925[200]; +char buf2926[200]; +char buf2927[200]; +char buf2928[200]; +char buf2929[200]; +char buf2930[200]; +char buf2931[200]; +char buf2932[200]; +char buf2933[200]; +char buf2934[200]; +char buf2935[200]; +char buf2936[200]; +char buf2937[200]; +char buf2938[200]; +char buf2939[200]; +char buf2940[200]; +char buf2941[200]; +char buf2942[200]; +char buf2943[200]; +char buf2944[200]; +char buf2945[200]; +char buf2946[200]; +char buf2947[200]; +char buf2948[200]; +char buf2949[200]; +char buf2950[200]; +char buf2951[200]; +char buf2952[200]; +char buf2953[200]; +char buf2954[200]; +char buf2955[200]; +char buf2956[200]; +char buf2957[200]; +char buf2958[200]; +char buf2959[200]; +char buf2960[200]; +char buf2961[200]; +char buf2962[200]; +char buf2963[200]; +char buf2964[200]; +char buf2965[200]; +char buf2966[200]; +char buf2967[200]; +char buf2968[200]; +char buf2969[200]; +char buf2970[200]; +char buf2971[200]; +char buf2972[200]; +char buf2973[200]; +char buf2974[200]; +char buf2975[200]; +char buf2976[200]; +char buf2977[200]; +char buf2978[200]; +char buf2979[200]; +char buf2980[200]; +char buf2981[200]; +char buf2982[200]; +char buf2983[200]; +char buf2984[200]; +char buf2985[200]; +char buf2986[200]; +char buf2987[200]; +char buf2988[200]; +char buf2989[200]; +char buf2990[200]; +char buf2991[200]; +char buf2992[200]; +char buf2993[200]; +char buf2994[200]; +char buf2995[200]; +char buf2996[200]; +char buf2997[200]; +char buf2998[200]; +char buf2999[200]; +char buf3000[200]; +char buf3001[200]; +char buf3002[200]; +char buf3003[200]; +char buf3004[200]; +char buf3005[200]; +char buf3006[200]; +char buf3007[200]; +char buf3008[200]; +char buf3009[200]; +char buf3010[200]; +char buf3011[200]; +char buf3012[200]; +char buf3013[200]; +char buf3014[200]; +char buf3015[200]; +char buf3016[200]; +char buf3017[200]; +char buf3018[200]; +char buf3019[200]; +char buf3020[200]; +char buf3021[200]; +char buf3022[200]; +char buf3023[200]; +char buf3024[200]; +char buf3025[200]; +char buf3026[200]; +char buf3027[200]; +char buf3028[200]; +char buf3029[200]; +char buf3030[200]; +char buf3031[200]; +char buf3032[200]; +char buf3033[200]; +char buf3034[200]; +char buf3035[200]; +char buf3036[200]; +char buf3037[200]; +char buf3038[200]; +char buf3039[200]; +char buf3040[200]; +char buf3041[200]; +char buf3042[200]; +char buf3043[200]; +char buf3044[200]; +char buf3045[200]; +char buf3046[200]; +char buf3047[200]; +char buf3048[200]; +char buf3049[200]; +char buf3050[200]; +char buf3051[200]; +char buf3052[200]; +char buf3053[200]; +char buf3054[200]; +char buf3055[200]; +char buf3056[200]; +char buf3057[200]; +char buf3058[200]; +char buf3059[200]; +char buf3060[200]; +char buf3061[200]; +char buf3062[200]; +char buf3063[200]; +char buf3064[200]; +char buf3065[200]; +char buf3066[200]; +char buf3067[200]; +char buf3068[200]; +char buf3069[200]; +char buf3070[200]; +char buf3071[200]; +char buf3072[200]; +char buf3073[200]; +char buf3074[200]; +char buf3075[200]; +char buf3076[200]; +char buf3077[200]; +char buf3078[200]; +char buf3079[200]; +char buf3080[200]; +char buf3081[200]; +char buf3082[200]; +char buf3083[200]; +char buf3084[200]; +char buf3085[200]; +char buf3086[200]; +char buf3087[200]; +char buf3088[200]; +char buf3089[200]; +char buf3090[200]; +char buf3091[200]; +char buf3092[200]; +char buf3093[200]; +char buf3094[200]; +char buf3095[200]; +char buf3096[200]; +char buf3097[200]; +char buf3098[200]; +char buf3099[200]; +char buf3100[200]; +char buf3101[200]; +char buf3102[200]; +char buf3103[200]; +char buf3104[200]; +char buf3105[200]; +char buf3106[200]; +char buf3107[200]; +char buf3108[200]; +char buf3109[200]; +char buf3110[200]; +char buf3111[200]; +char buf3112[200]; +char buf3113[200]; +char buf3114[200]; +char buf3115[200]; +char buf3116[200]; +char buf3117[200]; +char buf3118[200]; +char buf3119[200]; +char buf3120[200]; +char buf3121[200]; +char buf3122[200]; +char buf3123[200]; +char buf3124[200]; +char buf3125[200]; +char buf3126[200]; +char buf3127[200]; +char buf3128[200]; +char buf3129[200]; +char buf3130[200]; +char buf3131[200]; +char buf3132[200]; +char buf3133[200]; +char buf3134[200]; +char buf3135[200]; +char buf3136[200]; +char buf3137[200]; +char buf3138[200]; +char buf3139[200]; +char buf3140[200]; +char buf3141[200]; +char buf3142[200]; +char buf3143[200]; +char buf3144[200]; +char buf3145[200]; +char buf3146[200]; +char buf3147[200]; +char buf3148[200]; +char buf3149[200]; +char buf3150[200]; +char buf3151[200]; +char buf3152[200]; +char buf3153[200]; +char buf3154[200]; +char buf3155[200]; +char buf3156[200]; +char buf3157[200]; +char buf3158[200]; +char buf3159[200]; +char buf3160[200]; +char buf3161[200]; +char buf3162[200]; +char buf3163[200]; +char buf3164[200]; +char buf3165[200]; +char buf3166[200]; +char buf3167[200]; +char buf3168[200]; +char buf3169[200]; +char buf3170[200]; +char buf3171[200]; +char buf3172[200]; +char buf3173[200]; +char buf3174[200]; +char buf3175[200]; +char buf3176[200]; +char buf3177[200]; +char buf3178[200]; +char buf3179[200]; +char buf3180[200]; +char buf3181[200]; +char buf3182[200]; +char buf3183[200]; +char buf3184[200]; +char buf3185[200]; +char buf3186[200]; +char buf3187[200]; +char buf3188[200]; +char buf3189[200]; +char buf3190[200]; +char buf3191[200]; +char buf3192[200]; +char buf3193[200]; +char buf3194[200]; +char buf3195[200]; +char buf3196[200]; +char buf3197[200]; +char buf3198[200]; +char buf3199[200]; +char buf3200[200]; +char buf3201[200]; +char buf3202[200]; +char buf3203[200]; +char buf3204[200]; +char buf3205[200]; +char buf3206[200]; +char buf3207[200]; +char buf3208[200]; +char buf3209[200]; +char buf3210[200]; +char buf3211[200]; +char buf3212[200]; +char buf3213[200]; +char buf3214[200]; +char buf3215[200]; +char buf3216[200]; +char buf3217[200]; +char buf3218[200]; +char buf3219[200]; +char buf3220[200]; +char buf3221[200]; +char buf3222[200]; +char buf3223[200]; +char buf3224[200]; +char buf3225[200]; +char buf3226[200]; +char buf3227[200]; +char buf3228[200]; +char buf3229[200]; +char buf3230[200]; +char buf3231[200]; +char buf3232[200]; +char buf3233[200]; +char buf3234[200]; +char buf3235[200]; +char buf3236[200]; +char buf3237[200]; +char buf3238[200]; +char buf3239[200]; +char buf3240[200]; +char buf3241[200]; +char buf3242[200]; +char buf3243[200]; +char buf3244[200]; +char buf3245[200]; +char buf3246[200]; +char buf3247[200]; +char buf3248[200]; +char buf3249[200]; +char buf3250[200]; +char buf3251[200]; +char buf3252[200]; +char buf3253[200]; +char buf3254[200]; +char buf3255[200]; +char buf3256[200]; +char buf3257[200]; +char buf3258[200]; +char buf3259[200]; +char buf3260[200]; +char buf3261[200]; +char buf3262[200]; +char buf3263[200]; +char buf3264[200]; +char buf3265[200]; +char buf3266[200]; +char buf3267[200]; +char buf3268[200]; +char buf3269[200]; +char buf3270[200]; +char buf3271[200]; +char buf3272[200]; +char buf3273[200]; +char buf3274[200]; +char buf3275[200]; +char buf3276[200]; +char buf3277[200]; +char buf3278[200]; +char buf3279[200]; +char buf3280[200]; +char buf3281[200]; +char buf3282[200]; +char buf3283[200]; +char buf3284[200]; +char buf3285[200]; +char buf3286[200]; +char buf3287[200]; +char buf3288[200]; +char buf3289[200]; +char buf3290[200]; +char buf3291[200]; +char buf3292[200]; +char buf3293[200]; +char buf3294[200]; +char buf3295[200]; +char buf3296[200]; +char buf3297[200]; +char buf3298[200]; +char buf3299[200]; +char buf3300[200]; +char buf3301[200]; +char buf3302[200]; +char buf3303[200]; +char buf3304[200]; +char buf3305[200]; +char buf3306[200]; +char buf3307[200]; +char buf3308[200]; +char buf3309[200]; +char buf3310[200]; +char buf3311[200]; +char buf3312[200]; +char buf3313[200]; +char buf3314[200]; +char buf3315[200]; +char buf3316[200]; +char buf3317[200]; +char buf3318[200]; +char buf3319[200]; +char buf3320[200]; +char buf3321[200]; +char buf3322[200]; +char buf3323[200]; +char buf3324[200]; +char buf3325[200]; +char buf3326[200]; +char buf3327[200]; +char buf3328[200]; +char buf3329[200]; +char buf3330[200]; +char buf3331[200]; +char buf3332[200]; +char buf3333[200]; +char buf3334[200]; +char buf3335[200]; +char buf3336[200]; +char buf3337[200]; +char buf3338[200]; +char buf3339[200]; +char buf3340[200]; +char buf3341[200]; +char buf3342[200]; +char buf3343[200]; +char buf3344[200]; +char buf3345[200]; +char buf3346[200]; +char buf3347[200]; +char buf3348[200]; +char buf3349[200]; +char buf3350[200]; +char buf3351[200]; +char buf3352[200]; +char buf3353[200]; +char buf3354[200]; +char buf3355[200]; +char buf3356[200]; +char buf3357[200]; +char buf3358[200]; +char buf3359[200]; +char buf3360[200]; +char buf3361[200]; +char buf3362[200]; +char buf3363[200]; +char buf3364[200]; +char buf3365[200]; +char buf3366[200]; +char buf3367[200]; +char buf3368[200]; +char buf3369[200]; +char buf3370[200]; +char buf3371[200]; +char buf3372[200]; +char buf3373[200]; +char buf3374[200]; +char buf3375[200]; +char buf3376[200]; +char buf3377[200]; +char buf3378[200]; +char buf3379[200]; +char buf3380[200]; +char buf3381[200]; +char buf3382[200]; +char buf3383[200]; +char buf3384[200]; +char buf3385[200]; +char buf3386[200]; +char buf3387[200]; +char buf3388[200]; +char buf3389[200]; +char buf3390[200]; +char buf3391[200]; +char buf3392[200]; +char buf3393[200]; +char buf3394[200]; +char buf3395[200]; +char buf3396[200]; +char buf3397[200]; +char buf3398[200]; +char buf3399[200]; +char buf3400[200]; +char buf3401[200]; +char buf3402[200]; + +void RS_KERNEL test(int in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clamp(*(char*)buf165, *(char*)buf166, *(char*)buf167); + *(char2*)buf168 = clamp(*(char2*)buf169, *(char2*)buf170, *(char2*)buf171); + *(char3*)buf172 = clamp(*(char3*)buf173, *(char3*)buf174, *(char3*)buf175); + *(char4*)buf176 = clamp(*(char4*)buf177, *(char4*)buf178, *(char4*)buf179); + *(uchar*)buf180 = clamp(*(uchar*)buf181, *(uchar*)buf182, *(uchar*)buf183); + *(uchar2*)buf184 = clamp(*(uchar2*)buf185, *(uchar2*)buf186, *(uchar2*)buf187); + *(uchar3*)buf188 = clamp(*(uchar3*)buf189, *(uchar3*)buf190, *(uchar3*)buf191); + *(uchar4*)buf192 = clamp(*(uchar4*)buf193, *(uchar4*)buf194, *(uchar4*)buf195); + *(short*)buf196 = clamp(*(short*)buf197, *(short*)buf198, *(short*)buf199); + *(short2*)buf200 = clamp(*(short2*)buf201, *(short2*)buf202, *(short2*)buf203); + *(short3*)buf204 = clamp(*(short3*)buf205, *(short3*)buf206, *(short3*)buf207); + *(short4*)buf208 = clamp(*(short4*)buf209, *(short4*)buf210, *(short4*)buf211); + *(ushort*)buf212 = clamp(*(ushort*)buf213, *(ushort*)buf214, *(ushort*)buf215); + *(ushort2*)buf216 = clamp(*(ushort2*)buf217, *(ushort2*)buf218, *(ushort2*)buf219); + *(ushort3*)buf220 = clamp(*(ushort3*)buf221, *(ushort3*)buf222, *(ushort3*)buf223); + *(ushort4*)buf224 = clamp(*(ushort4*)buf225, *(ushort4*)buf226, *(ushort4*)buf227); + *(int*)buf228 = clamp(*(int*)buf229, *(int*)buf230, *(int*)buf231); + *(int2*)buf232 = clamp(*(int2*)buf233, *(int2*)buf234, *(int2*)buf235); + *(int3*)buf236 = clamp(*(int3*)buf237, *(int3*)buf238, *(int3*)buf239); + *(int4*)buf240 = clamp(*(int4*)buf241, *(int4*)buf242, *(int4*)buf243); + *(uint*)buf244 = clamp(*(uint*)buf245, *(uint*)buf246, *(uint*)buf247); + *(uint2*)buf248 = clamp(*(uint2*)buf249, *(uint2*)buf250, *(uint2*)buf251); + *(uint3*)buf252 = clamp(*(uint3*)buf253, *(uint3*)buf254, *(uint3*)buf255); + *(uint4*)buf256 = clamp(*(uint4*)buf257, *(uint4*)buf258, *(uint4*)buf259); + *(long*)buf260 = clamp(*(long*)buf261, *(long*)buf262, *(long*)buf263); + *(long2*)buf264 = clamp(*(long2*)buf265, *(long2*)buf266, *(long2*)buf267); + *(long3*)buf268 = clamp(*(long3*)buf269, *(long3*)buf270, *(long3*)buf271); + *(long4*)buf272 = clamp(*(long4*)buf273, *(long4*)buf274, *(long4*)buf275); + *(ulong*)buf276 = clamp(*(ulong*)buf277, *(ulong*)buf278, *(ulong*)buf279); + *(ulong2*)buf280 = clamp(*(ulong2*)buf281, *(ulong2*)buf282, *(ulong2*)buf283); + *(ulong3*)buf284 = clamp(*(ulong3*)buf285, *(ulong3*)buf286, *(ulong3*)buf287); + *(ulong4*)buf288 = clamp(*(ulong4*)buf289, *(ulong4*)buf290, *(ulong4*)buf291); + *(char2*)buf292 = clamp(*(char2*)buf293, *(char*)buf294, *(char*)buf295); + *(char3*)buf296 = clamp(*(char3*)buf297, *(char*)buf298, *(char*)buf299); + *(char4*)buf300 = clamp(*(char4*)buf301, *(char*)buf302, *(char*)buf303); + *(uchar2*)buf304 = clamp(*(uchar2*)buf305, *(uchar*)buf306, *(uchar*)buf307); + *(uchar3*)buf308 = clamp(*(uchar3*)buf309, *(uchar*)buf310, *(uchar*)buf311); + *(uchar4*)buf312 = clamp(*(uchar4*)buf313, *(uchar*)buf314, *(uchar*)buf315); + *(short2*)buf316 = clamp(*(short2*)buf317, *(short*)buf318, *(short*)buf319); + *(short3*)buf320 = clamp(*(short3*)buf321, *(short*)buf322, *(short*)buf323); + *(short4*)buf324 = clamp(*(short4*)buf325, *(short*)buf326, *(short*)buf327); + *(ushort2*)buf328 = clamp(*(ushort2*)buf329, *(ushort*)buf330, *(ushort*)buf331); + *(ushort3*)buf332 = clamp(*(ushort3*)buf333, *(ushort*)buf334, *(ushort*)buf335); + *(ushort4*)buf336 = clamp(*(ushort4*)buf337, *(ushort*)buf338, *(ushort*)buf339); + *(int2*)buf340 = clamp(*(int2*)buf341, *(int*)buf342, *(int*)buf343); + *(int3*)buf344 = clamp(*(int3*)buf345, *(int*)buf346, *(int*)buf347); + *(int4*)buf348 = clamp(*(int4*)buf349, *(int*)buf350, *(int*)buf351); + *(uint2*)buf352 = clamp(*(uint2*)buf353, *(uint*)buf354, *(uint*)buf355); + *(uint3*)buf356 = clamp(*(uint3*)buf357, *(uint*)buf358, *(uint*)buf359); + *(uint4*)buf360 = clamp(*(uint4*)buf361, *(uint*)buf362, *(uint*)buf363); + *(long2*)buf364 = clamp(*(long2*)buf365, *(long*)buf366, *(long*)buf367); + *(long3*)buf368 = clamp(*(long3*)buf369, *(long*)buf370, *(long*)buf371); + *(long4*)buf372 = clamp(*(long4*)buf373, *(long*)buf374, *(long*)buf375); + *(ulong2*)buf376 = clamp(*(ulong2*)buf377, *(ulong*)buf378, *(ulong*)buf379); + *(ulong3*)buf380 = clamp(*(ulong3*)buf381, *(ulong*)buf382, *(ulong*)buf383); + *(ulong4*)buf384 = clamp(*(ulong4*)buf385, *(ulong*)buf386, *(ulong*)buf387); + *(char*)buf388 = clz(*(char*)buf389); + *(char2*)buf390 = clz(*(char2*)buf391); + *(char3*)buf392 = clz(*(char3*)buf393); + *(char4*)buf394 = clz(*(char4*)buf395); + *(uchar*)buf396 = clz(*(uchar*)buf397); + *(uchar2*)buf398 = clz(*(uchar2*)buf399); + *(uchar3*)buf400 = clz(*(uchar3*)buf401); + *(uchar4*)buf402 = clz(*(uchar4*)buf403); + *(short*)buf404 = clz(*(short*)buf405); + *(short2*)buf406 = clz(*(short2*)buf407); + *(short3*)buf408 = clz(*(short3*)buf409); + *(short4*)buf410 = clz(*(short4*)buf411); + *(ushort*)buf412 = clz(*(ushort*)buf413); + *(ushort2*)buf414 = clz(*(ushort2*)buf415); + *(ushort3*)buf416 = clz(*(ushort3*)buf417); + *(ushort4*)buf418 = clz(*(ushort4*)buf419); + *(int*)buf420 = clz(*(int*)buf421); + *(int2*)buf422 = clz(*(int2*)buf423); + *(int3*)buf424 = clz(*(int3*)buf425); + *(int4*)buf426 = clz(*(int4*)buf427); + *(uint*)buf428 = clz(*(uint*)buf429); + *(uint2*)buf430 = clz(*(uint2*)buf431); + *(uint3*)buf432 = clz(*(uint3*)buf433); + *(uint4*)buf434 = clz(*(uint4*)buf435); + *(float2*)buf436 = convert_float2(*(float2*)buf437); + *(float3*)buf438 = convert_float3(*(float3*)buf439); + *(float4*)buf440 = convert_float4(*(float4*)buf441); + *(float2*)buf442 = convert_float2(*(char2*)buf443); + *(float3*)buf444 = convert_float3(*(char3*)buf445); + *(float4*)buf446 = convert_float4(*(char4*)buf447); + *(float2*)buf448 = convert_float2(*(uchar2*)buf449); + *(float3*)buf450 = convert_float3(*(uchar3*)buf451); + *(float4*)buf452 = convert_float4(*(uchar4*)buf453); + *(float2*)buf454 = convert_float2(*(short2*)buf455); + *(float3*)buf456 = convert_float3(*(short3*)buf457); + *(float4*)buf458 = convert_float4(*(short4*)buf459); + *(float2*)buf460 = convert_float2(*(ushort2*)buf461); + *(float3*)buf462 = convert_float3(*(ushort3*)buf463); + *(float4*)buf464 = convert_float4(*(ushort4*)buf465); + *(float2*)buf466 = convert_float2(*(int2*)buf467); + *(float3*)buf468 = convert_float3(*(int3*)buf469); + *(float4*)buf470 = convert_float4(*(int4*)buf471); + *(float2*)buf472 = convert_float2(*(uint2*)buf473); + *(float3*)buf474 = convert_float3(*(uint3*)buf475); + *(float4*)buf476 = convert_float4(*(uint4*)buf477); + *(char2*)buf478 = convert_char2(*(float2*)buf479); + *(char3*)buf480 = convert_char3(*(float3*)buf481); + *(char4*)buf482 = convert_char4(*(float4*)buf483); + *(char2*)buf484 = convert_char2(*(char2*)buf485); + *(char3*)buf486 = convert_char3(*(char3*)buf487); + *(char4*)buf488 = convert_char4(*(char4*)buf489); + *(char2*)buf490 = convert_char2(*(uchar2*)buf491); + *(char3*)buf492 = convert_char3(*(uchar3*)buf493); + *(char4*)buf494 = convert_char4(*(uchar4*)buf495); + *(char2*)buf496 = convert_char2(*(short2*)buf497); + *(char3*)buf498 = convert_char3(*(short3*)buf499); + *(char4*)buf500 = convert_char4(*(short4*)buf501); + *(char2*)buf502 = convert_char2(*(ushort2*)buf503); + *(char3*)buf504 = convert_char3(*(ushort3*)buf505); + *(char4*)buf506 = convert_char4(*(ushort4*)buf507); + *(char2*)buf508 = convert_char2(*(int2*)buf509); + *(char3*)buf510 = convert_char3(*(int3*)buf511); + *(char4*)buf512 = convert_char4(*(int4*)buf513); + *(char2*)buf514 = convert_char2(*(uint2*)buf515); + *(char3*)buf516 = convert_char3(*(uint3*)buf517); + *(char4*)buf518 = convert_char4(*(uint4*)buf519); + *(uchar2*)buf520 = convert_uchar2(*(float2*)buf521); + *(uchar3*)buf522 = convert_uchar3(*(float3*)buf523); + *(uchar4*)buf524 = convert_uchar4(*(float4*)buf525); + *(uchar2*)buf526 = convert_uchar2(*(char2*)buf527); + *(uchar3*)buf528 = convert_uchar3(*(char3*)buf529); + *(uchar4*)buf530 = convert_uchar4(*(char4*)buf531); + *(uchar2*)buf532 = convert_uchar2(*(uchar2*)buf533); + *(uchar3*)buf534 = convert_uchar3(*(uchar3*)buf535); + *(uchar4*)buf536 = convert_uchar4(*(uchar4*)buf537); + *(uchar2*)buf538 = convert_uchar2(*(short2*)buf539); + *(uchar3*)buf540 = convert_uchar3(*(short3*)buf541); + *(uchar4*)buf542 = convert_uchar4(*(short4*)buf543); + *(uchar2*)buf544 = convert_uchar2(*(ushort2*)buf545); + *(uchar3*)buf546 = convert_uchar3(*(ushort3*)buf547); + *(uchar4*)buf548 = convert_uchar4(*(ushort4*)buf549); + *(uchar2*)buf550 = convert_uchar2(*(int2*)buf551); + *(uchar3*)buf552 = convert_uchar3(*(int3*)buf553); + *(uchar4*)buf554 = convert_uchar4(*(int4*)buf555); + *(uchar2*)buf556 = convert_uchar2(*(uint2*)buf557); + *(uchar3*)buf558 = convert_uchar3(*(uint3*)buf559); + *(uchar4*)buf560 = convert_uchar4(*(uint4*)buf561); + *(short2*)buf562 = convert_short2(*(float2*)buf563); + *(short3*)buf564 = convert_short3(*(float3*)buf565); + *(short4*)buf566 = convert_short4(*(float4*)buf567); + *(short2*)buf568 = convert_short2(*(char2*)buf569); + *(short3*)buf570 = convert_short3(*(char3*)buf571); + *(short4*)buf572 = convert_short4(*(char4*)buf573); + *(short2*)buf574 = convert_short2(*(uchar2*)buf575); + *(short3*)buf576 = convert_short3(*(uchar3*)buf577); + *(short4*)buf578 = convert_short4(*(uchar4*)buf579); + *(short2*)buf580 = convert_short2(*(short2*)buf581); + *(short3*)buf582 = convert_short3(*(short3*)buf583); + *(short4*)buf584 = convert_short4(*(short4*)buf585); + *(short2*)buf586 = convert_short2(*(ushort2*)buf587); + *(short3*)buf588 = convert_short3(*(ushort3*)buf589); + *(short4*)buf590 = convert_short4(*(ushort4*)buf591); + *(short2*)buf592 = convert_short2(*(int2*)buf593); + *(short3*)buf594 = convert_short3(*(int3*)buf595); + *(short4*)buf596 = convert_short4(*(int4*)buf597); + *(short2*)buf598 = convert_short2(*(uint2*)buf599); + *(short3*)buf600 = convert_short3(*(uint3*)buf601); + *(short4*)buf602 = convert_short4(*(uint4*)buf603); + *(ushort2*)buf604 = convert_ushort2(*(float2*)buf605); + *(ushort3*)buf606 = convert_ushort3(*(float3*)buf607); + *(ushort4*)buf608 = convert_ushort4(*(float4*)buf609); + *(ushort2*)buf610 = convert_ushort2(*(char2*)buf611); + *(ushort3*)buf612 = convert_ushort3(*(char3*)buf613); + *(ushort4*)buf614 = convert_ushort4(*(char4*)buf615); + *(ushort2*)buf616 = convert_ushort2(*(uchar2*)buf617); + *(ushort3*)buf618 = convert_ushort3(*(uchar3*)buf619); + *(ushort4*)buf620 = convert_ushort4(*(uchar4*)buf621); + *(ushort2*)buf622 = convert_ushort2(*(short2*)buf623); + *(ushort3*)buf624 = convert_ushort3(*(short3*)buf625); + *(ushort4*)buf626 = convert_ushort4(*(short4*)buf627); + *(ushort2*)buf628 = convert_ushort2(*(ushort2*)buf629); + *(ushort3*)buf630 = convert_ushort3(*(ushort3*)buf631); + *(ushort4*)buf632 = convert_ushort4(*(ushort4*)buf633); + *(ushort2*)buf634 = convert_ushort2(*(int2*)buf635); + *(ushort3*)buf636 = convert_ushort3(*(int3*)buf637); + *(ushort4*)buf638 = convert_ushort4(*(int4*)buf639); + *(ushort2*)buf640 = convert_ushort2(*(uint2*)buf641); + *(ushort3*)buf642 = convert_ushort3(*(uint3*)buf643); + *(ushort4*)buf644 = convert_ushort4(*(uint4*)buf645); + *(int2*)buf646 = convert_int2(*(float2*)buf647); + *(int3*)buf648 = convert_int3(*(float3*)buf649); + *(int4*)buf650 = convert_int4(*(float4*)buf651); + *(int2*)buf652 = convert_int2(*(char2*)buf653); + *(int3*)buf654 = convert_int3(*(char3*)buf655); + *(int4*)buf656 = convert_int4(*(char4*)buf657); + *(int2*)buf658 = convert_int2(*(uchar2*)buf659); + *(int3*)buf660 = convert_int3(*(uchar3*)buf661); + *(int4*)buf662 = convert_int4(*(uchar4*)buf663); + *(int2*)buf664 = convert_int2(*(short2*)buf665); + *(int3*)buf666 = convert_int3(*(short3*)buf667); + *(int4*)buf668 = convert_int4(*(short4*)buf669); + *(int2*)buf670 = convert_int2(*(ushort2*)buf671); + *(int3*)buf672 = convert_int3(*(ushort3*)buf673); + *(int4*)buf674 = convert_int4(*(ushort4*)buf675); + *(int2*)buf676 = convert_int2(*(int2*)buf677); + *(int3*)buf678 = convert_int3(*(int3*)buf679); + *(int4*)buf680 = convert_int4(*(int4*)buf681); + *(int2*)buf682 = convert_int2(*(uint2*)buf683); + *(int3*)buf684 = convert_int3(*(uint3*)buf685); + *(int4*)buf686 = convert_int4(*(uint4*)buf687); + *(uint2*)buf688 = convert_uint2(*(float2*)buf689); + *(uint3*)buf690 = convert_uint3(*(float3*)buf691); + *(uint4*)buf692 = convert_uint4(*(float4*)buf693); + *(uint2*)buf694 = convert_uint2(*(char2*)buf695); + *(uint3*)buf696 = convert_uint3(*(char3*)buf697); + *(uint4*)buf698 = convert_uint4(*(char4*)buf699); + *(uint2*)buf700 = convert_uint2(*(uchar2*)buf701); + *(uint3*)buf702 = convert_uint3(*(uchar3*)buf703); + *(uint4*)buf704 = convert_uint4(*(uchar4*)buf705); + *(uint2*)buf706 = convert_uint2(*(short2*)buf707); + *(uint3*)buf708 = convert_uint3(*(short3*)buf709); + *(uint4*)buf710 = convert_uint4(*(short4*)buf711); + *(uint2*)buf712 = convert_uint2(*(ushort2*)buf713); + *(uint3*)buf714 = convert_uint3(*(ushort3*)buf715); + *(uint4*)buf716 = convert_uint4(*(ushort4*)buf717); + *(uint2*)buf718 = convert_uint2(*(int2*)buf719); + *(uint3*)buf720 = convert_uint3(*(int3*)buf721); + *(uint4*)buf722 = convert_uint4(*(int4*)buf723); + *(uint2*)buf724 = convert_uint2(*(uint2*)buf725); + *(uint3*)buf726 = convert_uint3(*(uint3*)buf727); + *(uint4*)buf728 = convert_uint4(*(uint4*)buf729); + *(float*)buf730 = copysign(*(float*)buf731, *(float*)buf732); + *(float2*)buf733 = copysign(*(float2*)buf734, *(float2*)buf735); + *(float3*)buf736 = copysign(*(float3*)buf737, *(float3*)buf738); + *(float4*)buf739 = copysign(*(float4*)buf740, *(float4*)buf741); + *(float*)buf742 = cos(*(float*)buf743); + *(float2*)buf744 = cos(*(float2*)buf745); + *(float3*)buf746 = cos(*(float3*)buf747); + *(float4*)buf748 = cos(*(float4*)buf749); + *(float*)buf750 = cosh(*(float*)buf751); + *(float2*)buf752 = cosh(*(float2*)buf753); + *(float3*)buf754 = cosh(*(float3*)buf755); + *(float4*)buf756 = cosh(*(float4*)buf757); + *(float*)buf758 = cospi(*(float*)buf759); + *(float2*)buf760 = cospi(*(float2*)buf761); + *(float3*)buf762 = cospi(*(float3*)buf763); + *(float4*)buf764 = cospi(*(float4*)buf765); + *(float3*)buf766 = cross(*(float3*)buf767, *(float3*)buf768); + *(float4*)buf769 = cross(*(float4*)buf770, *(float4*)buf771); + *(float*)buf772 = degrees(*(float*)buf773); + *(float2*)buf774 = degrees(*(float2*)buf775); + *(float3*)buf776 = degrees(*(float3*)buf777); + *(float4*)buf778 = degrees(*(float4*)buf779); + *(float*)buf780 = distance(*(float*)buf781, *(float*)buf782); + *(float*)buf783 = distance(*(float2*)buf784, *(float2*)buf785); + *(float*)buf786 = distance(*(float3*)buf787, *(float3*)buf788); + *(float*)buf789 = distance(*(float4*)buf790, *(float4*)buf791); + *(float*)buf792 = dot(*(float*)buf793, *(float*)buf794); + *(float*)buf795 = dot(*(float2*)buf796, *(float2*)buf797); + *(float*)buf798 = dot(*(float3*)buf799, *(float3*)buf800); + *(float*)buf801 = dot(*(float4*)buf802, *(float4*)buf803); + *(float*)buf804 = erf(*(float*)buf805); + *(float2*)buf806 = erf(*(float2*)buf807); + *(float3*)buf808 = erf(*(float3*)buf809); + *(float4*)buf810 = erf(*(float4*)buf811); + *(float*)buf812 = erfc(*(float*)buf813); + *(float2*)buf814 = erfc(*(float2*)buf815); + *(float3*)buf816 = erfc(*(float3*)buf817); + *(float4*)buf818 = erfc(*(float4*)buf819); + *(float*)buf820 = exp(*(float*)buf821); + *(float2*)buf822 = exp(*(float2*)buf823); + *(float3*)buf824 = exp(*(float3*)buf825); + *(float4*)buf826 = exp(*(float4*)buf827); + *(float*)buf828 = exp10(*(float*)buf829); + *(float2*)buf830 = exp10(*(float2*)buf831); + *(float3*)buf832 = exp10(*(float3*)buf833); + *(float4*)buf834 = exp10(*(float4*)buf835); + *(float*)buf836 = exp2(*(float*)buf837); + *(float2*)buf838 = exp2(*(float2*)buf839); + *(float3*)buf840 = exp2(*(float3*)buf841); + *(float4*)buf842 = exp2(*(float4*)buf843); + *(float*)buf844 = expm1(*(float*)buf845); + *(float2*)buf846 = expm1(*(float2*)buf847); + *(float3*)buf848 = expm1(*(float3*)buf849); + *(float4*)buf850 = expm1(*(float4*)buf851); + *(float*)buf852 = fabs(*(float*)buf853); + *(float2*)buf854 = fabs(*(float2*)buf855); + *(float3*)buf856 = fabs(*(float3*)buf857); + *(float4*)buf858 = fabs(*(float4*)buf859); + *(float*)buf860 = fast_distance(*(float*)buf861, *(float*)buf862); + *(float*)buf863 = fast_distance(*(float2*)buf864, *(float2*)buf865); + *(float*)buf866 = fast_distance(*(float3*)buf867, *(float3*)buf868); + *(float*)buf869 = fast_distance(*(float4*)buf870, *(float4*)buf871); + *(float*)buf872 = fast_length(*(float*)buf873); + *(float*)buf874 = fast_length(*(float2*)buf875); + *(float*)buf876 = fast_length(*(float3*)buf877); + *(float*)buf878 = fast_length(*(float4*)buf879); + *(float*)buf880 = fast_normalize(*(float*)buf881); + *(float2*)buf882 = fast_normalize(*(float2*)buf883); + *(float3*)buf884 = fast_normalize(*(float3*)buf885); + *(float4*)buf886 = fast_normalize(*(float4*)buf887); + *(float*)buf888 = fdim(*(float*)buf889, *(float*)buf890); + *(float2*)buf891 = fdim(*(float2*)buf892, *(float2*)buf893); + *(float3*)buf894 = fdim(*(float3*)buf895, *(float3*)buf896); + *(float4*)buf897 = fdim(*(float4*)buf898, *(float4*)buf899); + *(float*)buf900 = floor(*(float*)buf901); + *(float2*)buf902 = floor(*(float2*)buf903); + *(float3*)buf904 = floor(*(float3*)buf905); + *(float4*)buf906 = floor(*(float4*)buf907); + *(float*)buf908 = fma(*(float*)buf909, *(float*)buf910, *(float*)buf911); + *(float2*)buf912 = fma(*(float2*)buf913, *(float2*)buf914, *(float2*)buf915); + *(float3*)buf916 = fma(*(float3*)buf917, *(float3*)buf918, *(float3*)buf919); + *(float4*)buf920 = fma(*(float4*)buf921, *(float4*)buf922, *(float4*)buf923); + *(float*)buf924 = fmax(*(float*)buf925, *(float*)buf926); + *(float2*)buf927 = fmax(*(float2*)buf928, *(float2*)buf929); + *(float3*)buf930 = fmax(*(float3*)buf931, *(float3*)buf932); + *(float4*)buf933 = fmax(*(float4*)buf934, *(float4*)buf935); + *(float2*)buf936 = fmax(*(float2*)buf937, *(float*)buf938); + *(float3*)buf939 = fmax(*(float3*)buf940, *(float*)buf941); + *(float4*)buf942 = fmax(*(float4*)buf943, *(float*)buf944); + *(float*)buf945 = fmin(*(float*)buf946, *(float*)buf947); + *(float2*)buf948 = fmin(*(float2*)buf949, *(float2*)buf950); + *(float3*)buf951 = fmin(*(float3*)buf952, *(float3*)buf953); + *(float4*)buf954 = fmin(*(float4*)buf955, *(float4*)buf956); + *(float2*)buf957 = fmin(*(float2*)buf958, *(float*)buf959); + *(float3*)buf960 = fmin(*(float3*)buf961, *(float*)buf962); + *(float4*)buf963 = fmin(*(float4*)buf964, *(float*)buf965); + *(float*)buf966 = fmod(*(float*)buf967, *(float*)buf968); + *(float2*)buf969 = fmod(*(float2*)buf970, *(float2*)buf971); + *(float3*)buf972 = fmod(*(float3*)buf973, *(float3*)buf974); + *(float4*)buf975 = fmod(*(float4*)buf976, *(float4*)buf977); + *(float*)buf978 = fract(*(float*)buf979, (float*) buf980); + *(float2*)buf981 = fract(*(float2*)buf982, (float2*) buf983); + *(float3*)buf984 = fract(*(float3*)buf985, (float3*) buf986); + *(float4*)buf987 = fract(*(float4*)buf988, (float4*) buf989); + *(float*)buf990 = fract(*(float*)buf991); + *(float2*)buf992 = fract(*(float2*)buf993); + *(float3*)buf994 = fract(*(float3*)buf995); + *(float4*)buf996 = fract(*(float4*)buf997); + *(float*)buf998 = frexp(*(float*)buf999, (int*) buf1000); + *(float2*)buf1001 = frexp(*(float2*)buf1002, (int2*) buf1003); + *(float3*)buf1004 = frexp(*(float3*)buf1005, (int3*) buf1006); + *(float4*)buf1007 = frexp(*(float4*)buf1008, (int4*) buf1009); + *(float*)buf1010 = half_recip(*(float*)buf1011); + *(float2*)buf1012 = half_recip(*(float2*)buf1013); + *(float3*)buf1014 = half_recip(*(float3*)buf1015); + *(float4*)buf1016 = half_recip(*(float4*)buf1017); + *(float*)buf1018 = half_rsqrt(*(float*)buf1019); + *(float2*)buf1020 = half_rsqrt(*(float2*)buf1021); + *(float3*)buf1022 = half_rsqrt(*(float3*)buf1023); + *(float4*)buf1024 = half_rsqrt(*(float4*)buf1025); + *(float*)buf1026 = half_sqrt(*(float*)buf1027); + *(float2*)buf1028 = half_sqrt(*(float2*)buf1029); + *(float3*)buf1030 = half_sqrt(*(float3*)buf1031); + *(float4*)buf1032 = half_sqrt(*(float4*)buf1033); + *(float*)buf1034 = hypot(*(float*)buf1035, *(float*)buf1036); + *(float2*)buf1037 = hypot(*(float2*)buf1038, *(float2*)buf1039); + *(float3*)buf1040 = hypot(*(float3*)buf1041, *(float3*)buf1042); + *(float4*)buf1043 = hypot(*(float4*)buf1044, *(float4*)buf1045); + *(int*)buf1046 = ilogb(*(float*)buf1047); + *(int2*)buf1048 = ilogb(*(float2*)buf1049); + *(int3*)buf1050 = ilogb(*(float3*)buf1051); + *(int4*)buf1052 = ilogb(*(float4*)buf1053); + *(float*)buf1054 = ldexp(*(float*)buf1055, *(int*)buf1056); + *(float2*)buf1057 = ldexp(*(float2*)buf1058, *(int2*)buf1059); + *(float3*)buf1060 = ldexp(*(float3*)buf1061, *(int3*)buf1062); + *(float4*)buf1063 = ldexp(*(float4*)buf1064, *(int4*)buf1065); + *(float2*)buf1066 = ldexp(*(float2*)buf1067, *(int*)buf1068); + *(float3*)buf1069 = ldexp(*(float3*)buf1070, *(int*)buf1071); + *(float4*)buf1072 = ldexp(*(float4*)buf1073, *(int*)buf1074); + *(float*)buf1075 = length(*(float*)buf1076); + *(float*)buf1077 = length(*(float2*)buf1078); + *(float*)buf1079 = length(*(float3*)buf1080); + *(float*)buf1081 = length(*(float4*)buf1082); + *(float*)buf1083 = lgamma(*(float*)buf1084); + *(float2*)buf1085 = lgamma(*(float2*)buf1086); + *(float3*)buf1087 = lgamma(*(float3*)buf1088); + *(float4*)buf1089 = lgamma(*(float4*)buf1090); + *(float*)buf1091 = lgamma(*(float*)buf1092, (int*) buf1093); + *(float2*)buf1094 = lgamma(*(float2*)buf1095, (int2*) buf1096); + *(float3*)buf1097 = lgamma(*(float3*)buf1098, (int3*) buf1099); + *(float4*)buf1100 = lgamma(*(float4*)buf1101, (int4*) buf1102); + *(float*)buf1103 = log(*(float*)buf1104); + *(float2*)buf1105 = log(*(float2*)buf1106); + *(float3*)buf1107 = log(*(float3*)buf1108); + *(float4*)buf1109 = log(*(float4*)buf1110); + *(float*)buf1111 = log10(*(float*)buf1112); + *(float2*)buf1113 = log10(*(float2*)buf1114); + *(float3*)buf1115 = log10(*(float3*)buf1116); + *(float4*)buf1117 = log10(*(float4*)buf1118); + *(float*)buf1119 = log1p(*(float*)buf1120); + *(float2*)buf1121 = log1p(*(float2*)buf1122); + *(float3*)buf1123 = log1p(*(float3*)buf1124); + *(float4*)buf1125 = log1p(*(float4*)buf1126); + *(float*)buf1127 = log2(*(float*)buf1128); + *(float2*)buf1129 = log2(*(float2*)buf1130); + *(float3*)buf1131 = log2(*(float3*)buf1132); + *(float4*)buf1133 = log2(*(float4*)buf1134); + *(float*)buf1135 = logb(*(float*)buf1136); + *(float2*)buf1137 = logb(*(float2*)buf1138); + *(float3*)buf1139 = logb(*(float3*)buf1140); + *(float4*)buf1141 = logb(*(float4*)buf1142); + *(float*)buf1143 = mad(*(float*)buf1144, *(float*)buf1145, *(float*)buf1146); + *(float2*)buf1147 = mad(*(float2*)buf1148, *(float2*)buf1149, *(float2*)buf1150); + *(float3*)buf1151 = mad(*(float3*)buf1152, *(float3*)buf1153, *(float3*)buf1154); + *(float4*)buf1155 = mad(*(float4*)buf1156, *(float4*)buf1157, *(float4*)buf1158); + *(float*)buf1159 = max(*(float*)buf1160, *(float*)buf1161); + *(float2*)buf1162 = max(*(float2*)buf1163, *(float2*)buf1164); + *(float3*)buf1165 = max(*(float3*)buf1166, *(float3*)buf1167); + *(float4*)buf1168 = max(*(float4*)buf1169, *(float4*)buf1170); + *(float2*)buf1171 = max(*(float2*)buf1172, *(float*)buf1173); + *(float3*)buf1174 = max(*(float3*)buf1175, *(float*)buf1176); + *(float4*)buf1177 = max(*(float4*)buf1178, *(float*)buf1179); + *(char*)buf1180 = max(*(char*)buf1181, *(char*)buf1182); + *(uchar*)buf1183 = max(*(uchar*)buf1184, *(uchar*)buf1185); + *(short*)buf1186 = max(*(short*)buf1187, *(short*)buf1188); + *(ushort*)buf1189 = max(*(ushort*)buf1190, *(ushort*)buf1191); + *(int*)buf1192 = max(*(int*)buf1193, *(int*)buf1194); + *(uint*)buf1195 = max(*(uint*)buf1196, *(uint*)buf1197); + *(char2*)buf1198 = max(*(char2*)buf1199, *(char2*)buf1200); + *(uchar2*)buf1201 = max(*(uchar2*)buf1202, *(uchar2*)buf1203); + *(short2*)buf1204 = max(*(short2*)buf1205, *(short2*)buf1206); + *(ushort2*)buf1207 = max(*(ushort2*)buf1208, *(ushort2*)buf1209); + *(int2*)buf1210 = max(*(int2*)buf1211, *(int2*)buf1212); + *(uint2*)buf1213 = max(*(uint2*)buf1214, *(uint2*)buf1215); + *(char3*)buf1216 = max(*(char3*)buf1217, *(char3*)buf1218); + *(uchar3*)buf1219 = max(*(uchar3*)buf1220, *(uchar3*)buf1221); + *(short3*)buf1222 = max(*(short3*)buf1223, *(short3*)buf1224); + *(ushort3*)buf1225 = max(*(ushort3*)buf1226, *(ushort3*)buf1227); + *(int3*)buf1228 = max(*(int3*)buf1229, *(int3*)buf1230); + *(uint3*)buf1231 = max(*(uint3*)buf1232, *(uint3*)buf1233); + *(char4*)buf1234 = max(*(char4*)buf1235, *(char4*)buf1236); + *(uchar4*)buf1237 = max(*(uchar4*)buf1238, *(uchar4*)buf1239); + *(short4*)buf1240 = max(*(short4*)buf1241, *(short4*)buf1242); + *(ushort4*)buf1243 = max(*(ushort4*)buf1244, *(ushort4*)buf1245); + *(int4*)buf1246 = max(*(int4*)buf1247, *(int4*)buf1248); + *(uint4*)buf1249 = max(*(uint4*)buf1250, *(uint4*)buf1251); + *(float*)buf1252 = min(*(float*)buf1253, *(float*)buf1254); + *(float2*)buf1255 = min(*(float2*)buf1256, *(float2*)buf1257); + *(float3*)buf1258 = min(*(float3*)buf1259, *(float3*)buf1260); + *(float4*)buf1261 = min(*(float4*)buf1262, *(float4*)buf1263); + *(float2*)buf1264 = min(*(float2*)buf1265, *(float*)buf1266); + *(float3*)buf1267 = min(*(float3*)buf1268, *(float*)buf1269); + *(float4*)buf1270 = min(*(float4*)buf1271, *(float*)buf1272); + *(char*)buf1273 = min(*(char*)buf1274, *(char*)buf1275); + *(uchar*)buf1276 = min(*(uchar*)buf1277, *(uchar*)buf1278); + *(short*)buf1279 = min(*(short*)buf1280, *(short*)buf1281); + *(ushort*)buf1282 = min(*(ushort*)buf1283, *(ushort*)buf1284); + *(int*)buf1285 = min(*(int*)buf1286, *(int*)buf1287); + *(uint*)buf1288 = min(*(uint*)buf1289, *(uint*)buf1290); + *(char2*)buf1291 = min(*(char2*)buf1292, *(char2*)buf1293); + *(uchar2*)buf1294 = min(*(uchar2*)buf1295, *(uchar2*)buf1296); + *(short2*)buf1297 = min(*(short2*)buf1298, *(short2*)buf1299); + *(ushort2*)buf1300 = min(*(ushort2*)buf1301, *(ushort2*)buf1302); + *(int2*)buf1303 = min(*(int2*)buf1304, *(int2*)buf1305); + *(uint2*)buf1306 = min(*(uint2*)buf1307, *(uint2*)buf1308); + *(char3*)buf1309 = min(*(char3*)buf1310, *(char3*)buf1311); + *(uchar3*)buf1312 = min(*(uchar3*)buf1313, *(uchar3*)buf1314); + *(short3*)buf1315 = min(*(short3*)buf1316, *(short3*)buf1317); + *(ushort3*)buf1318 = min(*(ushort3*)buf1319, *(ushort3*)buf1320); + *(int3*)buf1321 = min(*(int3*)buf1322, *(int3*)buf1323); + *(uint3*)buf1324 = min(*(uint3*)buf1325, *(uint3*)buf1326); + *(char4*)buf1327 = min(*(char4*)buf1328, *(char4*)buf1329); + *(uchar4*)buf1330 = min(*(uchar4*)buf1331, *(uchar4*)buf1332); + *(short4*)buf1333 = min(*(short4*)buf1334, *(short4*)buf1335); + *(ushort4*)buf1336 = min(*(ushort4*)buf1337, *(ushort4*)buf1338); + *(int4*)buf1339 = min(*(int4*)buf1340, *(int4*)buf1341); + *(uint4*)buf1342 = min(*(uint4*)buf1343, *(uint4*)buf1344); + *(float*)buf1345 = mix(*(float*)buf1346, *(float*)buf1347, *(float*)buf1348); + *(float2*)buf1349 = mix(*(float2*)buf1350, *(float2*)buf1351, *(float2*)buf1352); + *(float3*)buf1353 = mix(*(float3*)buf1354, *(float3*)buf1355, *(float3*)buf1356); + *(float4*)buf1357 = mix(*(float4*)buf1358, *(float4*)buf1359, *(float4*)buf1360); + *(float2*)buf1361 = mix(*(float2*)buf1362, *(float2*)buf1363, *(float*)buf1364); + *(float3*)buf1365 = mix(*(float3*)buf1366, *(float3*)buf1367, *(float*)buf1368); + *(float4*)buf1369 = mix(*(float4*)buf1370, *(float4*)buf1371, *(float*)buf1372); + *(float*)buf1373 = modf(*(float*)buf1374, (float*) buf1375); + *(float2*)buf1376 = modf(*(float2*)buf1377, (float2*) buf1378); + *(float3*)buf1379 = modf(*(float3*)buf1380, (float3*) buf1381); + *(float4*)buf1382 = modf(*(float4*)buf1383, (float4*) buf1384); + *(float*)buf1385 = nan(*(uint*)buf1386); + *(float*)buf1387 = native_exp(*(float*)buf1388); + *(float2*)buf1389 = native_exp(*(float2*)buf1390); + *(float3*)buf1391 = native_exp(*(float3*)buf1392); + *(float4*)buf1393 = native_exp(*(float4*)buf1394); + *(float*)buf1395 = native_exp10(*(float*)buf1396); + *(float2*)buf1397 = native_exp10(*(float2*)buf1398); + *(float3*)buf1399 = native_exp10(*(float3*)buf1400); + *(float4*)buf1401 = native_exp10(*(float4*)buf1402); + *(float*)buf1403 = native_exp2(*(float*)buf1404); + *(float2*)buf1405 = native_exp2(*(float2*)buf1406); + *(float3*)buf1407 = native_exp2(*(float3*)buf1408); + *(float4*)buf1409 = native_exp2(*(float4*)buf1410); + *(float*)buf1411 = native_log(*(float*)buf1412); + *(float2*)buf1413 = native_log(*(float2*)buf1414); + *(float3*)buf1415 = native_log(*(float3*)buf1416); + *(float4*)buf1417 = native_log(*(float4*)buf1418); + *(float*)buf1419 = native_log10(*(float*)buf1420); + *(float2*)buf1421 = native_log10(*(float2*)buf1422); + *(float3*)buf1423 = native_log10(*(float3*)buf1424); + *(float4*)buf1425 = native_log10(*(float4*)buf1426); + *(float*)buf1427 = native_log2(*(float*)buf1428); + *(float2*)buf1429 = native_log2(*(float2*)buf1430); + *(float3*)buf1431 = native_log2(*(float3*)buf1432); + *(float4*)buf1433 = native_log2(*(float4*)buf1434); + *(float*)buf1435 = native_powr(*(float*)buf1436, *(float*)buf1437); + *(float2*)buf1438 = native_powr(*(float2*)buf1439, *(float2*)buf1440); + *(float3*)buf1441 = native_powr(*(float3*)buf1442, *(float3*)buf1443); + *(float4*)buf1444 = native_powr(*(float4*)buf1445, *(float4*)buf1446); + *(float*)buf1447 = nextafter(*(float*)buf1448, *(float*)buf1449); + *(float2*)buf1450 = nextafter(*(float2*)buf1451, *(float2*)buf1452); + *(float3*)buf1453 = nextafter(*(float3*)buf1454, *(float3*)buf1455); + *(float4*)buf1456 = nextafter(*(float4*)buf1457, *(float4*)buf1458); + *(float*)buf1459 = normalize(*(float*)buf1460); + *(float2*)buf1461 = normalize(*(float2*)buf1462); + *(float3*)buf1463 = normalize(*(float3*)buf1464); + *(float4*)buf1465 = normalize(*(float4*)buf1466); + *(float*)buf1467 = pow(*(float*)buf1468, *(float*)buf1469); + *(float2*)buf1470 = pow(*(float2*)buf1471, *(float2*)buf1472); + *(float3*)buf1473 = pow(*(float3*)buf1474, *(float3*)buf1475); + *(float4*)buf1476 = pow(*(float4*)buf1477, *(float4*)buf1478); + *(float*)buf1479 = pown(*(float*)buf1480, *(int*)buf1481); + *(float2*)buf1482 = pown(*(float2*)buf1483, *(int2*)buf1484); + *(float3*)buf1485 = pown(*(float3*)buf1486, *(int3*)buf1487); + *(float4*)buf1488 = pown(*(float4*)buf1489, *(int4*)buf1490); + *(float*)buf1491 = powr(*(float*)buf1492, *(float*)buf1493); + *(float2*)buf1494 = powr(*(float2*)buf1495, *(float2*)buf1496); + *(float3*)buf1497 = powr(*(float3*)buf1498, *(float3*)buf1499); + *(float4*)buf1500 = powr(*(float4*)buf1501, *(float4*)buf1502); + *(float*)buf1503 = radians(*(float*)buf1504); + *(float2*)buf1505 = radians(*(float2*)buf1506); + *(float3*)buf1507 = radians(*(float3*)buf1508); + *(float4*)buf1509 = radians(*(float4*)buf1510); + *(float*)buf1511 = remainder(*(float*)buf1512, *(float*)buf1513); + *(float2*)buf1514 = remainder(*(float2*)buf1515, *(float2*)buf1516); + *(float3*)buf1517 = remainder(*(float3*)buf1518, *(float3*)buf1519); + *(float4*)buf1520 = remainder(*(float4*)buf1521, *(float4*)buf1522); + *(float*)buf1523 = remquo(*(float*)buf1524, *(float*)buf1525, (int*) buf1526); + *(float2*)buf1527 = remquo(*(float2*)buf1528, *(float2*)buf1529, (int2*) buf1530); + *(float3*)buf1531 = remquo(*(float3*)buf1532, *(float3*)buf1533, (int3*) buf1534); + *(float4*)buf1535 = remquo(*(float4*)buf1536, *(float4*)buf1537, (int4*) buf1538); + *(float*)buf1539 = rint(*(float*)buf1540); + *(float2*)buf1541 = rint(*(float2*)buf1542); + *(float3*)buf1543 = rint(*(float3*)buf1544); + *(float4*)buf1545 = rint(*(float4*)buf1546); + *(float*)buf1547 = rootn(*(float*)buf1548, *(int*)buf1549); + *(float2*)buf1550 = rootn(*(float2*)buf1551, *(int2*)buf1552); + *(float3*)buf1553 = rootn(*(float3*)buf1554, *(int3*)buf1555); + *(float4*)buf1556 = rootn(*(float4*)buf1557, *(int4*)buf1558); + *(float*)buf1559 = round(*(float*)buf1560); + *(float2*)buf1561 = round(*(float2*)buf1562); + *(float3*)buf1563 = round(*(float3*)buf1564); + *(float4*)buf1565 = round(*(float4*)buf1566); + rsAllocationCopy1DRange(*(rs_allocation*)buf1567, *(uint32_t*)buf1568, *(uint32_t*)buf1569, *(uint32_t*)buf1570, *(rs_allocation*)buf1571, *(uint32_t*)buf1572, *(uint32_t*)buf1573); + rsAllocationCopy2DRange(*(rs_allocation*)buf1574, *(uint32_t*)buf1575, *(uint32_t*)buf1576, *(uint32_t*)buf1577, *(rs_allocation_cubemap_face*)buf1578, *(uint32_t*)buf1579, *(uint32_t*)buf1580, *(rs_allocation*)buf1581, *(uint32_t*)buf1582, *(uint32_t*)buf1583, *(uint32_t*)buf1584, *(rs_allocation_cubemap_face*)buf1585); + *(uint32_t*)buf1586 = rsAllocationGetDimFaces(*(rs_allocation*)buf1587); + *(uint32_t*)buf1588 = rsAllocationGetDimLOD(*(rs_allocation*)buf1589); + *(uint32_t*)buf1590 = rsAllocationGetDimX(*(rs_allocation*)buf1591); + *(uint32_t*)buf1592 = rsAllocationGetDimY(*(rs_allocation*)buf1593); + *(uint32_t*)buf1594 = rsAllocationGetDimZ(*(rs_allocation*)buf1595); + *(rs_element*)buf1596 = rsAllocationGetElement(*(rs_allocation*)buf1597); + rsAllocationIoReceive(*(rs_allocation*)buf1598); + rsAllocationIoSend(*(rs_allocation*)buf1599); + *(int32_t*)buf1600 = rsAtomicAdd((volatile int32_t*) buf1601, *(int32_t*)buf1602); + *(int32_t*)buf1603 = rsAtomicAdd((volatile uint32_t*) buf1604, *(uint32_t*)buf1605); + *(int32_t*)buf1606 = rsAtomicAnd((volatile int32_t*) buf1607, *(int32_t*)buf1608); + *(int32_t*)buf1609 = rsAtomicAnd((volatile uint32_t*) buf1610, *(uint32_t*)buf1611); + *(int32_t*)buf1612 = rsAtomicCas((volatile int32_t*) buf1613, *(int32_t*)buf1614, *(int32_t*)buf1615); + *(uint32_t*)buf1616 = rsAtomicCas((volatile uint32_t*) buf1617, *(uint32_t*)buf1618, *(uint32_t*)buf1619); + *(int32_t*)buf1620 = rsAtomicDec((volatile int32_t*) buf1621); + *(int32_t*)buf1622 = rsAtomicDec((volatile uint32_t*) buf1623); + *(int32_t*)buf1624 = rsAtomicInc((volatile int32_t*) buf1625); + *(int32_t*)buf1626 = rsAtomicInc((volatile uint32_t*) buf1627); + *(uint32_t*)buf1628 = rsAtomicMax((volatile uint32_t*) buf1629, *(uint32_t*)buf1630); + *(int32_t*)buf1631 = rsAtomicMax((volatile int32_t*) buf1632, *(int32_t*)buf1633); + *(uint32_t*)buf1634 = rsAtomicMin((volatile uint32_t*) buf1635, *(uint32_t*)buf1636); + *(int32_t*)buf1637 = rsAtomicMin((volatile int32_t*) buf1638, *(int32_t*)buf1639); + *(int32_t*)buf1640 = rsAtomicOr((volatile int32_t*) buf1641, *(int32_t*)buf1642); + *(int32_t*)buf1643 = rsAtomicOr((volatile uint32_t*) buf1644, *(uint32_t*)buf1645); + *(int32_t*)buf1646 = rsAtomicSub((volatile int32_t*) buf1647, *(int32_t*)buf1648); + *(int32_t*)buf1649 = rsAtomicSub((volatile uint32_t*) buf1650, *(uint32_t*)buf1651); + *(int32_t*)buf1652 = rsAtomicXor((volatile int32_t*) buf1653, *(int32_t*)buf1654); + *(int32_t*)buf1655 = rsAtomicXor((volatile uint32_t*) buf1656, *(uint32_t*)buf1657); + *(char*)buf1658 = rsClamp(*(char*)buf1659, *(char*)buf1660, *(char*)buf1661); + *(uchar*)buf1662 = rsClamp(*(uchar*)buf1663, *(uchar*)buf1664, *(uchar*)buf1665); + *(short*)buf1666 = rsClamp(*(short*)buf1667, *(short*)buf1668, *(short*)buf1669); + *(ushort*)buf1670 = rsClamp(*(ushort*)buf1671, *(ushort*)buf1672, *(ushort*)buf1673); + *(int*)buf1674 = rsClamp(*(int*)buf1675, *(int*)buf1676, *(int*)buf1677); + *(uint*)buf1678 = rsClamp(*(uint*)buf1679, *(uint*)buf1680, *(uint*)buf1681); + rsClearObject((rs_element*) buf1682); + rsClearObject((rs_type*) buf1683); + rsClearObject((rs_allocation*) buf1684); + rsClearObject((rs_sampler*) buf1685); + rsClearObject((rs_script*) buf1686); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf1687); + rsClearObject((rs_program_fragment*) buf1688); + rsClearObject((rs_program_vertex*) buf1689); + rsClearObject((rs_program_raster*) buf1690); + rsClearObject((rs_program_store*) buf1691); + rsClearObject((rs_font*) buf1692); +#endif + rsDebug((const char*) buf1693, *(double*)buf1694); + rsDebug((const char*) buf1695, *(int*)buf1696); + rsDebug((const char*) buf1697, *(uint*)buf1698); + rsDebug((const char*) buf1699, *(long*)buf1700); + rsDebug((const char*) buf1701, *(ulong*)buf1702); + rsDebug((const char*) buf1703, *(int2*)buf1704); + rsDebug((const char*) buf1705, *(int3*)buf1706); + rsDebug((const char*) buf1707, *(int4*)buf1708); + rsDebug((const char*) buf1709, *(uint2*)buf1710); + rsDebug((const char*) buf1711, *(uint3*)buf1712); + rsDebug((const char*) buf1713, *(uint4*)buf1714); + rsDebug((const char*) buf1715, *(long2*)buf1716); + rsDebug((const char*) buf1717, *(long3*)buf1718); + rsDebug((const char*) buf1719, *(long4*)buf1720); + rsDebug((const char*) buf1721, *(ulong2*)buf1722); + rsDebug((const char*) buf1723, *(ulong3*)buf1724); + rsDebug((const char*) buf1725, *(ulong4*)buf1726); + rsDebug((const char*) buf1727, *(float*)buf1728); + rsDebug((const char*) buf1729, *(float2*)buf1730); + rsDebug((const char*) buf1731, *(float3*)buf1732); + rsDebug((const char*) buf1733, *(float4*)buf1734); + rsDebug((const char*) buf1735, *(char*)buf1736); + rsDebug((const char*) buf1737, *(char2*)buf1738); + rsDebug((const char*) buf1739, *(char3*)buf1740); + rsDebug((const char*) buf1741, *(char4*)buf1742); + rsDebug((const char*) buf1743, *(uchar*)buf1744); + rsDebug((const char*) buf1745, *(uchar2*)buf1746); + rsDebug((const char*) buf1747, *(uchar3*)buf1748); + rsDebug((const char*) buf1749, *(uchar4*)buf1750); + rsDebug((const char*) buf1751, *(short*)buf1752); + rsDebug((const char*) buf1753, *(short2*)buf1754); + rsDebug((const char*) buf1755, *(short3*)buf1756); + rsDebug((const char*) buf1757, *(short4*)buf1758); + rsDebug((const char*) buf1759, *(ushort*)buf1760); + rsDebug((const char*) buf1761, *(ushort2*)buf1762); + rsDebug((const char*) buf1763, *(ushort3*)buf1764); + rsDebug((const char*) buf1765, *(ushort4*)buf1766); + rsDebug((const char*) buf1767, *(float*)buf1768, *(float*)buf1769); + rsDebug((const char*) buf1770, *(float*)buf1771, *(float*)buf1772, *(float*)buf1773); + rsDebug((const char*) buf1774, *(float*)buf1775, *(float*)buf1776, *(float*)buf1777, *(float*)buf1778); + rsDebug((const char*) buf1779, *(long long*)buf1780); + rsDebug((const char*) buf1781, *(unsigned long long*)buf1782); + rsDebug((const char*) buf1783, (const void*) buf1784); + rsDebug((const char*) buf1785, (const rs_matrix4x4*) buf1786); + rsDebug((const char*) buf1787, (const rs_matrix3x3*) buf1788); + rsDebug((const char*) buf1789, (const rs_matrix2x2*) buf1790); + *(uint32_t*)buf1791 = rsElementGetBytesSize(*(rs_element*)buf1792); + *(rs_data_kind*)buf1793 = rsElementGetDataKind(*(rs_element*)buf1794); + *(rs_data_type*)buf1795 = rsElementGetDataType(*(rs_element*)buf1796); + *(rs_element*)buf1797 = rsElementGetSubElement(*(rs_element*)buf1798, *(uint32_t*)buf1799); + *(uint32_t*)buf1800 = rsElementGetSubElementArraySize(*(rs_element*)buf1801, *(uint32_t*)buf1802); + *(uint32_t*)buf1803 = rsElementGetSubElementCount(*(rs_element*)buf1804); + *(uint32_t*)buf1805 = rsElementGetSubElementName(*(rs_element*)buf1806, *(uint32_t*)buf1807, (char*) buf1808, *(uint32_t*)buf1809); + *(uint32_t*)buf1810 = rsElementGetSubElementNameLength(*(rs_element*)buf1811, *(uint32_t*)buf1812); + *(uint32_t*)buf1813 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf1814, *(uint32_t*)buf1815); + *(uint32_t*)buf1816 = rsElementGetVectorSize(*(rs_element*)buf1817); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf1818, (float4*) buf1819, (float4*) buf1820, (float4*) buf1821, (float4*) buf1822, (float4*) buf1823, (float4*) buf1824); + rsForEach(*(rs_script*)buf1825, *(rs_allocation*)buf1826, *(rs_allocation*)buf1827, (const void*) buf1828, *(size_t*)buf1829, (const rs_script_call_t*) buf1830); + rsForEach(*(rs_script*)buf1831, *(rs_allocation*)buf1832, *(rs_allocation*)buf1833, (const void*) buf1834, *(size_t*)buf1835); + rsForEach(*(rs_script*)buf1836, *(rs_allocation*)buf1837, *(rs_allocation*)buf1838); + *(float*)buf1839 = rsFrac(*(float*)buf1840); + *(rs_allocation*)buf1841 = rsGetAllocation((const void*) buf1842); + *(float*)buf1843 = rsGetDt(); + *(const void**)buf1844 = rsGetElementAt(*(rs_allocation*)buf1845, *(uint32_t*)buf1846); + *(const void**)buf1847 = rsGetElementAt(*(rs_allocation*)buf1848, *(uint32_t*)buf1849, *(uint32_t*)buf1850); + *(const void**)buf1851 = rsGetElementAt(*(rs_allocation*)buf1852, *(uint32_t*)buf1853, *(uint32_t*)buf1854, *(uint32_t*)buf1855); + *(float*)buf1856 = rsGetElementAt_float(*(rs_allocation*)buf1857, *(uint32_t*)buf1858); + *(float2*)buf1859 = rsGetElementAt_float2(*(rs_allocation*)buf1860, *(uint32_t*)buf1861); + *(float3*)buf1862 = rsGetElementAt_float3(*(rs_allocation*)buf1863, *(uint32_t*)buf1864); + *(float4*)buf1865 = rsGetElementAt_float4(*(rs_allocation*)buf1866, *(uint32_t*)buf1867); + *(double*)buf1868 = rsGetElementAt_double(*(rs_allocation*)buf1869, *(uint32_t*)buf1870); + *(double2*)buf1871 = rsGetElementAt_double2(*(rs_allocation*)buf1872, *(uint32_t*)buf1873); + *(double3*)buf1874 = rsGetElementAt_double3(*(rs_allocation*)buf1875, *(uint32_t*)buf1876); + *(double4*)buf1877 = rsGetElementAt_double4(*(rs_allocation*)buf1878, *(uint32_t*)buf1879); + *(char*)buf1880 = rsGetElementAt_char(*(rs_allocation*)buf1881, *(uint32_t*)buf1882); + *(char2*)buf1883 = rsGetElementAt_char2(*(rs_allocation*)buf1884, *(uint32_t*)buf1885); + *(char3*)buf1886 = rsGetElementAt_char3(*(rs_allocation*)buf1887, *(uint32_t*)buf1888); + *(char4*)buf1889 = rsGetElementAt_char4(*(rs_allocation*)buf1890, *(uint32_t*)buf1891); + *(uchar*)buf1892 = rsGetElementAt_uchar(*(rs_allocation*)buf1893, *(uint32_t*)buf1894); + *(uchar2*)buf1895 = rsGetElementAt_uchar2(*(rs_allocation*)buf1896, *(uint32_t*)buf1897); + *(uchar3*)buf1898 = rsGetElementAt_uchar3(*(rs_allocation*)buf1899, *(uint32_t*)buf1900); + *(uchar4*)buf1901 = rsGetElementAt_uchar4(*(rs_allocation*)buf1902, *(uint32_t*)buf1903); + *(short*)buf1904 = rsGetElementAt_short(*(rs_allocation*)buf1905, *(uint32_t*)buf1906); + *(short2*)buf1907 = rsGetElementAt_short2(*(rs_allocation*)buf1908, *(uint32_t*)buf1909); + *(short3*)buf1910 = rsGetElementAt_short3(*(rs_allocation*)buf1911, *(uint32_t*)buf1912); + *(short4*)buf1913 = rsGetElementAt_short4(*(rs_allocation*)buf1914, *(uint32_t*)buf1915); + *(ushort*)buf1916 = rsGetElementAt_ushort(*(rs_allocation*)buf1917, *(uint32_t*)buf1918); + *(ushort2*)buf1919 = rsGetElementAt_ushort2(*(rs_allocation*)buf1920, *(uint32_t*)buf1921); + *(ushort3*)buf1922 = rsGetElementAt_ushort3(*(rs_allocation*)buf1923, *(uint32_t*)buf1924); + *(ushort4*)buf1925 = rsGetElementAt_ushort4(*(rs_allocation*)buf1926, *(uint32_t*)buf1927); + *(int*)buf1928 = rsGetElementAt_int(*(rs_allocation*)buf1929, *(uint32_t*)buf1930); + *(int2*)buf1931 = rsGetElementAt_int2(*(rs_allocation*)buf1932, *(uint32_t*)buf1933); + *(int3*)buf1934 = rsGetElementAt_int3(*(rs_allocation*)buf1935, *(uint32_t*)buf1936); + *(int4*)buf1937 = rsGetElementAt_int4(*(rs_allocation*)buf1938, *(uint32_t*)buf1939); + *(uint*)buf1940 = rsGetElementAt_uint(*(rs_allocation*)buf1941, *(uint32_t*)buf1942); + *(uint2*)buf1943 = rsGetElementAt_uint2(*(rs_allocation*)buf1944, *(uint32_t*)buf1945); + *(uint3*)buf1946 = rsGetElementAt_uint3(*(rs_allocation*)buf1947, *(uint32_t*)buf1948); + *(uint4*)buf1949 = rsGetElementAt_uint4(*(rs_allocation*)buf1950, *(uint32_t*)buf1951); + *(long*)buf1952 = rsGetElementAt_long(*(rs_allocation*)buf1953, *(uint32_t*)buf1954); + *(long2*)buf1955 = rsGetElementAt_long2(*(rs_allocation*)buf1956, *(uint32_t*)buf1957); + *(long3*)buf1958 = rsGetElementAt_long3(*(rs_allocation*)buf1959, *(uint32_t*)buf1960); + *(long4*)buf1961 = rsGetElementAt_long4(*(rs_allocation*)buf1962, *(uint32_t*)buf1963); + *(ulong*)buf1964 = rsGetElementAt_ulong(*(rs_allocation*)buf1965, *(uint32_t*)buf1966); + *(ulong2*)buf1967 = rsGetElementAt_ulong2(*(rs_allocation*)buf1968, *(uint32_t*)buf1969); + *(ulong3*)buf1970 = rsGetElementAt_ulong3(*(rs_allocation*)buf1971, *(uint32_t*)buf1972); + *(ulong4*)buf1973 = rsGetElementAt_ulong4(*(rs_allocation*)buf1974, *(uint32_t*)buf1975); + *(float*)buf1976 = rsGetElementAt_float(*(rs_allocation*)buf1977, *(uint32_t*)buf1978, *(uint32_t*)buf1979); + *(float2*)buf1980 = rsGetElementAt_float2(*(rs_allocation*)buf1981, *(uint32_t*)buf1982, *(uint32_t*)buf1983); + *(float3*)buf1984 = rsGetElementAt_float3(*(rs_allocation*)buf1985, *(uint32_t*)buf1986, *(uint32_t*)buf1987); + *(float4*)buf1988 = rsGetElementAt_float4(*(rs_allocation*)buf1989, *(uint32_t*)buf1990, *(uint32_t*)buf1991); + *(double*)buf1992 = rsGetElementAt_double(*(rs_allocation*)buf1993, *(uint32_t*)buf1994, *(uint32_t*)buf1995); + *(double2*)buf1996 = rsGetElementAt_double2(*(rs_allocation*)buf1997, *(uint32_t*)buf1998, *(uint32_t*)buf1999); + *(double3*)buf2000 = rsGetElementAt_double3(*(rs_allocation*)buf2001, *(uint32_t*)buf2002, *(uint32_t*)buf2003); + *(double4*)buf2004 = rsGetElementAt_double4(*(rs_allocation*)buf2005, *(uint32_t*)buf2006, *(uint32_t*)buf2007); + *(char*)buf2008 = rsGetElementAt_char(*(rs_allocation*)buf2009, *(uint32_t*)buf2010, *(uint32_t*)buf2011); + *(char2*)buf2012 = rsGetElementAt_char2(*(rs_allocation*)buf2013, *(uint32_t*)buf2014, *(uint32_t*)buf2015); + *(char3*)buf2016 = rsGetElementAt_char3(*(rs_allocation*)buf2017, *(uint32_t*)buf2018, *(uint32_t*)buf2019); + *(char4*)buf2020 = rsGetElementAt_char4(*(rs_allocation*)buf2021, *(uint32_t*)buf2022, *(uint32_t*)buf2023); + *(uchar*)buf2024 = rsGetElementAt_uchar(*(rs_allocation*)buf2025, *(uint32_t*)buf2026, *(uint32_t*)buf2027); + *(uchar2*)buf2028 = rsGetElementAt_uchar2(*(rs_allocation*)buf2029, *(uint32_t*)buf2030, *(uint32_t*)buf2031); + *(uchar3*)buf2032 = rsGetElementAt_uchar3(*(rs_allocation*)buf2033, *(uint32_t*)buf2034, *(uint32_t*)buf2035); + *(uchar4*)buf2036 = rsGetElementAt_uchar4(*(rs_allocation*)buf2037, *(uint32_t*)buf2038, *(uint32_t*)buf2039); + *(short*)buf2040 = rsGetElementAt_short(*(rs_allocation*)buf2041, *(uint32_t*)buf2042, *(uint32_t*)buf2043); + *(short2*)buf2044 = rsGetElementAt_short2(*(rs_allocation*)buf2045, *(uint32_t*)buf2046, *(uint32_t*)buf2047); + *(short3*)buf2048 = rsGetElementAt_short3(*(rs_allocation*)buf2049, *(uint32_t*)buf2050, *(uint32_t*)buf2051); + *(short4*)buf2052 = rsGetElementAt_short4(*(rs_allocation*)buf2053, *(uint32_t*)buf2054, *(uint32_t*)buf2055); + *(ushort*)buf2056 = rsGetElementAt_ushort(*(rs_allocation*)buf2057, *(uint32_t*)buf2058, *(uint32_t*)buf2059); + *(ushort2*)buf2060 = rsGetElementAt_ushort2(*(rs_allocation*)buf2061, *(uint32_t*)buf2062, *(uint32_t*)buf2063); + *(ushort3*)buf2064 = rsGetElementAt_ushort3(*(rs_allocation*)buf2065, *(uint32_t*)buf2066, *(uint32_t*)buf2067); + *(ushort4*)buf2068 = rsGetElementAt_ushort4(*(rs_allocation*)buf2069, *(uint32_t*)buf2070, *(uint32_t*)buf2071); + *(int*)buf2072 = rsGetElementAt_int(*(rs_allocation*)buf2073, *(uint32_t*)buf2074, *(uint32_t*)buf2075); + *(int2*)buf2076 = rsGetElementAt_int2(*(rs_allocation*)buf2077, *(uint32_t*)buf2078, *(uint32_t*)buf2079); + *(int3*)buf2080 = rsGetElementAt_int3(*(rs_allocation*)buf2081, *(uint32_t*)buf2082, *(uint32_t*)buf2083); + *(int4*)buf2084 = rsGetElementAt_int4(*(rs_allocation*)buf2085, *(uint32_t*)buf2086, *(uint32_t*)buf2087); + *(uint*)buf2088 = rsGetElementAt_uint(*(rs_allocation*)buf2089, *(uint32_t*)buf2090, *(uint32_t*)buf2091); + *(uint2*)buf2092 = rsGetElementAt_uint2(*(rs_allocation*)buf2093, *(uint32_t*)buf2094, *(uint32_t*)buf2095); + *(uint3*)buf2096 = rsGetElementAt_uint3(*(rs_allocation*)buf2097, *(uint32_t*)buf2098, *(uint32_t*)buf2099); + *(uint4*)buf2100 = rsGetElementAt_uint4(*(rs_allocation*)buf2101, *(uint32_t*)buf2102, *(uint32_t*)buf2103); + *(long*)buf2104 = rsGetElementAt_long(*(rs_allocation*)buf2105, *(uint32_t*)buf2106, *(uint32_t*)buf2107); + *(long2*)buf2108 = rsGetElementAt_long2(*(rs_allocation*)buf2109, *(uint32_t*)buf2110, *(uint32_t*)buf2111); + *(long3*)buf2112 = rsGetElementAt_long3(*(rs_allocation*)buf2113, *(uint32_t*)buf2114, *(uint32_t*)buf2115); + *(long4*)buf2116 = rsGetElementAt_long4(*(rs_allocation*)buf2117, *(uint32_t*)buf2118, *(uint32_t*)buf2119); + *(ulong*)buf2120 = rsGetElementAt_ulong(*(rs_allocation*)buf2121, *(uint32_t*)buf2122, *(uint32_t*)buf2123); + *(ulong2*)buf2124 = rsGetElementAt_ulong2(*(rs_allocation*)buf2125, *(uint32_t*)buf2126, *(uint32_t*)buf2127); + *(ulong3*)buf2128 = rsGetElementAt_ulong3(*(rs_allocation*)buf2129, *(uint32_t*)buf2130, *(uint32_t*)buf2131); + *(ulong4*)buf2132 = rsGetElementAt_ulong4(*(rs_allocation*)buf2133, *(uint32_t*)buf2134, *(uint32_t*)buf2135); + *(float*)buf2136 = rsGetElementAt_float(*(rs_allocation*)buf2137, *(uint32_t*)buf2138, *(uint32_t*)buf2139, *(uint32_t*)buf2140); + *(float2*)buf2141 = rsGetElementAt_float2(*(rs_allocation*)buf2142, *(uint32_t*)buf2143, *(uint32_t*)buf2144, *(uint32_t*)buf2145); + *(float3*)buf2146 = rsGetElementAt_float3(*(rs_allocation*)buf2147, *(uint32_t*)buf2148, *(uint32_t*)buf2149, *(uint32_t*)buf2150); + *(float4*)buf2151 = rsGetElementAt_float4(*(rs_allocation*)buf2152, *(uint32_t*)buf2153, *(uint32_t*)buf2154, *(uint32_t*)buf2155); + *(double*)buf2156 = rsGetElementAt_double(*(rs_allocation*)buf2157, *(uint32_t*)buf2158, *(uint32_t*)buf2159, *(uint32_t*)buf2160); + *(double2*)buf2161 = rsGetElementAt_double2(*(rs_allocation*)buf2162, *(uint32_t*)buf2163, *(uint32_t*)buf2164, *(uint32_t*)buf2165); + *(double3*)buf2166 = rsGetElementAt_double3(*(rs_allocation*)buf2167, *(uint32_t*)buf2168, *(uint32_t*)buf2169, *(uint32_t*)buf2170); + *(double4*)buf2171 = rsGetElementAt_double4(*(rs_allocation*)buf2172, *(uint32_t*)buf2173, *(uint32_t*)buf2174, *(uint32_t*)buf2175); + *(char*)buf2176 = rsGetElementAt_char(*(rs_allocation*)buf2177, *(uint32_t*)buf2178, *(uint32_t*)buf2179, *(uint32_t*)buf2180); + *(char2*)buf2181 = rsGetElementAt_char2(*(rs_allocation*)buf2182, *(uint32_t*)buf2183, *(uint32_t*)buf2184, *(uint32_t*)buf2185); + *(char3*)buf2186 = rsGetElementAt_char3(*(rs_allocation*)buf2187, *(uint32_t*)buf2188, *(uint32_t*)buf2189, *(uint32_t*)buf2190); + *(char4*)buf2191 = rsGetElementAt_char4(*(rs_allocation*)buf2192, *(uint32_t*)buf2193, *(uint32_t*)buf2194, *(uint32_t*)buf2195); + *(uchar*)buf2196 = rsGetElementAt_uchar(*(rs_allocation*)buf2197, *(uint32_t*)buf2198, *(uint32_t*)buf2199, *(uint32_t*)buf2200); + *(uchar2*)buf2201 = rsGetElementAt_uchar2(*(rs_allocation*)buf2202, *(uint32_t*)buf2203, *(uint32_t*)buf2204, *(uint32_t*)buf2205); + *(uchar3*)buf2206 = rsGetElementAt_uchar3(*(rs_allocation*)buf2207, *(uint32_t*)buf2208, *(uint32_t*)buf2209, *(uint32_t*)buf2210); + *(uchar4*)buf2211 = rsGetElementAt_uchar4(*(rs_allocation*)buf2212, *(uint32_t*)buf2213, *(uint32_t*)buf2214, *(uint32_t*)buf2215); + *(short*)buf2216 = rsGetElementAt_short(*(rs_allocation*)buf2217, *(uint32_t*)buf2218, *(uint32_t*)buf2219, *(uint32_t*)buf2220); + *(short2*)buf2221 = rsGetElementAt_short2(*(rs_allocation*)buf2222, *(uint32_t*)buf2223, *(uint32_t*)buf2224, *(uint32_t*)buf2225); + *(short3*)buf2226 = rsGetElementAt_short3(*(rs_allocation*)buf2227, *(uint32_t*)buf2228, *(uint32_t*)buf2229, *(uint32_t*)buf2230); + *(short4*)buf2231 = rsGetElementAt_short4(*(rs_allocation*)buf2232, *(uint32_t*)buf2233, *(uint32_t*)buf2234, *(uint32_t*)buf2235); + *(ushort*)buf2236 = rsGetElementAt_ushort(*(rs_allocation*)buf2237, *(uint32_t*)buf2238, *(uint32_t*)buf2239, *(uint32_t*)buf2240); + *(ushort2*)buf2241 = rsGetElementAt_ushort2(*(rs_allocation*)buf2242, *(uint32_t*)buf2243, *(uint32_t*)buf2244, *(uint32_t*)buf2245); + *(ushort3*)buf2246 = rsGetElementAt_ushort3(*(rs_allocation*)buf2247, *(uint32_t*)buf2248, *(uint32_t*)buf2249, *(uint32_t*)buf2250); + *(ushort4*)buf2251 = rsGetElementAt_ushort4(*(rs_allocation*)buf2252, *(uint32_t*)buf2253, *(uint32_t*)buf2254, *(uint32_t*)buf2255); + *(int*)buf2256 = rsGetElementAt_int(*(rs_allocation*)buf2257, *(uint32_t*)buf2258, *(uint32_t*)buf2259, *(uint32_t*)buf2260); + *(int2*)buf2261 = rsGetElementAt_int2(*(rs_allocation*)buf2262, *(uint32_t*)buf2263, *(uint32_t*)buf2264, *(uint32_t*)buf2265); + *(int3*)buf2266 = rsGetElementAt_int3(*(rs_allocation*)buf2267, *(uint32_t*)buf2268, *(uint32_t*)buf2269, *(uint32_t*)buf2270); + *(int4*)buf2271 = rsGetElementAt_int4(*(rs_allocation*)buf2272, *(uint32_t*)buf2273, *(uint32_t*)buf2274, *(uint32_t*)buf2275); + *(uint*)buf2276 = rsGetElementAt_uint(*(rs_allocation*)buf2277, *(uint32_t*)buf2278, *(uint32_t*)buf2279, *(uint32_t*)buf2280); + *(uint2*)buf2281 = rsGetElementAt_uint2(*(rs_allocation*)buf2282, *(uint32_t*)buf2283, *(uint32_t*)buf2284, *(uint32_t*)buf2285); + *(uint3*)buf2286 = rsGetElementAt_uint3(*(rs_allocation*)buf2287, *(uint32_t*)buf2288, *(uint32_t*)buf2289, *(uint32_t*)buf2290); + *(uint4*)buf2291 = rsGetElementAt_uint4(*(rs_allocation*)buf2292, *(uint32_t*)buf2293, *(uint32_t*)buf2294, *(uint32_t*)buf2295); + *(long*)buf2296 = rsGetElementAt_long(*(rs_allocation*)buf2297, *(uint32_t*)buf2298, *(uint32_t*)buf2299, *(uint32_t*)buf2300); + *(long2*)buf2301 = rsGetElementAt_long2(*(rs_allocation*)buf2302, *(uint32_t*)buf2303, *(uint32_t*)buf2304, *(uint32_t*)buf2305); + *(long3*)buf2306 = rsGetElementAt_long3(*(rs_allocation*)buf2307, *(uint32_t*)buf2308, *(uint32_t*)buf2309, *(uint32_t*)buf2310); + *(long4*)buf2311 = rsGetElementAt_long4(*(rs_allocation*)buf2312, *(uint32_t*)buf2313, *(uint32_t*)buf2314, *(uint32_t*)buf2315); + *(ulong*)buf2316 = rsGetElementAt_ulong(*(rs_allocation*)buf2317, *(uint32_t*)buf2318, *(uint32_t*)buf2319, *(uint32_t*)buf2320); + *(ulong2*)buf2321 = rsGetElementAt_ulong2(*(rs_allocation*)buf2322, *(uint32_t*)buf2323, *(uint32_t*)buf2324, *(uint32_t*)buf2325); + *(ulong3*)buf2326 = rsGetElementAt_ulong3(*(rs_allocation*)buf2327, *(uint32_t*)buf2328, *(uint32_t*)buf2329, *(uint32_t*)buf2330); + *(ulong4*)buf2331 = rsGetElementAt_ulong4(*(rs_allocation*)buf2332, *(uint32_t*)buf2333, *(uint32_t*)buf2334, *(uint32_t*)buf2335); + *(uchar*)buf2336 = rsGetElementAtYuv_uchar_U(*(rs_allocation*)buf2337, *(uint32_t*)buf2338, *(uint32_t*)buf2339); + *(uchar*)buf2340 = rsGetElementAtYuv_uchar_V(*(rs_allocation*)buf2341, *(uint32_t*)buf2342, *(uint32_t*)buf2343); + *(uchar*)buf2344 = rsGetElementAtYuv_uchar_Y(*(rs_allocation*)buf2345, *(uint32_t*)buf2346, *(uint32_t*)buf2347); + *(bool*)buf2348 = rsIsObject(*(rs_element*)buf2349); + *(bool*)buf2350 = rsIsObject(*(rs_type*)buf2351); + *(bool*)buf2352 = rsIsObject(*(rs_allocation*)buf2353); + *(bool*)buf2354 = rsIsObject(*(rs_sampler*)buf2355); + *(bool*)buf2356 = rsIsObject(*(rs_script*)buf2357); +#ifndef __LP64__ + *(bool*)buf2358 = rsIsObject(*(rs_mesh*)buf2359); + *(bool*)buf2360 = rsIsObject(*(rs_program_fragment*)buf2361); + *(bool*)buf2362 = rsIsObject(*(rs_program_vertex*)buf2363); + *(bool*)buf2364 = rsIsObject(*(rs_program_raster*)buf2365); + *(bool*)buf2366 = rsIsObject(*(rs_program_store*)buf2367); + *(bool*)buf2368 = rsIsObject(*(rs_font*)buf2369); +#endif + *(bool*)buf2370 = rsIsSphereInFrustum((float4*) buf2371, (float4*) buf2372, (float4*) buf2373, (float4*) buf2374, (float4*) buf2375, (float4*) buf2376, (float4*) buf2377); + *(rs_tm**)buf2378 = rsLocaltime((rs_tm*) buf2379, (const rs_time_t*) buf2380); + *(float*)buf2381 = rsMatrixGet((const rs_matrix4x4*) buf2382, *(uint32_t*)buf2383, *(uint32_t*)buf2384); + *(float*)buf2385 = rsMatrixGet((const rs_matrix3x3*) buf2386, *(uint32_t*)buf2387, *(uint32_t*)buf2388); + *(float*)buf2389 = rsMatrixGet((const rs_matrix2x2*) buf2390, *(uint32_t*)buf2391, *(uint32_t*)buf2392); + *(bool*)buf2393 = rsMatrixInverse((rs_matrix4x4*) buf2394); + *(bool*)buf2395 = rsMatrixInverseTranspose((rs_matrix4x4*) buf2396); + rsMatrixLoad((rs_matrix4x4*) buf2397, (const float*) buf2398); + rsMatrixLoad((rs_matrix3x3*) buf2399, (const float*) buf2400); + rsMatrixLoad((rs_matrix2x2*) buf2401, (const float*) buf2402); + rsMatrixLoad((rs_matrix4x4*) buf2403, (const rs_matrix4x4*) buf2404); + rsMatrixLoad((rs_matrix3x3*) buf2405, (const rs_matrix3x3*) buf2406); + rsMatrixLoad((rs_matrix2x2*) buf2407, (const rs_matrix2x2*) buf2408); + rsMatrixLoad((rs_matrix4x4*) buf2409, (const rs_matrix3x3*) buf2410); + rsMatrixLoad((rs_matrix4x4*) buf2411, (const rs_matrix2x2*) buf2412); + rsMatrixLoadFrustum((rs_matrix4x4*) buf2413, *(float*)buf2414, *(float*)buf2415, *(float*)buf2416, *(float*)buf2417, *(float*)buf2418, *(float*)buf2419); + rsMatrixLoadIdentity((rs_matrix4x4*) buf2420); + rsMatrixLoadIdentity((rs_matrix3x3*) buf2421); + rsMatrixLoadIdentity((rs_matrix2x2*) buf2422); + rsMatrixLoadMultiply((rs_matrix4x4*) buf2423, (const rs_matrix4x4*) buf2424, (const rs_matrix4x4*) buf2425); + rsMatrixLoadMultiply((rs_matrix3x3*) buf2426, (const rs_matrix3x3*) buf2427, (const rs_matrix3x3*) buf2428); + rsMatrixLoadMultiply((rs_matrix2x2*) buf2429, (const rs_matrix2x2*) buf2430, (const rs_matrix2x2*) buf2431); + rsMatrixLoadOrtho((rs_matrix4x4*) buf2432, *(float*)buf2433, *(float*)buf2434, *(float*)buf2435, *(float*)buf2436, *(float*)buf2437, *(float*)buf2438); + rsMatrixLoadPerspective((rs_matrix4x4*) buf2439, *(float*)buf2440, *(float*)buf2441, *(float*)buf2442, *(float*)buf2443); + rsMatrixLoadRotate((rs_matrix4x4*) buf2444, *(float*)buf2445, *(float*)buf2446, *(float*)buf2447, *(float*)buf2448); + rsMatrixLoadScale((rs_matrix4x4*) buf2449, *(float*)buf2450, *(float*)buf2451, *(float*)buf2452); + rsMatrixLoadTranslate((rs_matrix4x4*) buf2453, *(float*)buf2454, *(float*)buf2455, *(float*)buf2456); + rsMatrixMultiply((rs_matrix4x4*) buf2457, (const rs_matrix4x4*) buf2458); + rsMatrixMultiply((rs_matrix3x3*) buf2459, (const rs_matrix3x3*) buf2460); + rsMatrixMultiply((rs_matrix2x2*) buf2461, (const rs_matrix2x2*) buf2462); + *(float4*)buf2463 = rsMatrixMultiply((const rs_matrix4x4*) buf2464, *(float4*)buf2465); + *(float4*)buf2466 = rsMatrixMultiply((const rs_matrix4x4*) buf2467, *(float3*)buf2468); + *(float4*)buf2469 = rsMatrixMultiply((const rs_matrix4x4*) buf2470, *(float2*)buf2471); + *(float3*)buf2472 = rsMatrixMultiply((const rs_matrix3x3*) buf2473, *(float3*)buf2474); + *(float3*)buf2475 = rsMatrixMultiply((const rs_matrix3x3*) buf2476, *(float2*)buf2477); + *(float2*)buf2478 = rsMatrixMultiply((const rs_matrix2x2*) buf2479, *(float2*)buf2480); + rsMatrixRotate((rs_matrix4x4*) buf2481, *(float*)buf2482, *(float*)buf2483, *(float*)buf2484, *(float*)buf2485); + rsMatrixScale((rs_matrix4x4*) buf2486, *(float*)buf2487, *(float*)buf2488, *(float*)buf2489); + rsMatrixSet((rs_matrix4x4*) buf2490, *(uint32_t*)buf2491, *(uint32_t*)buf2492, *(float*)buf2493); + rsMatrixSet((rs_matrix3x3*) buf2494, *(uint32_t*)buf2495, *(uint32_t*)buf2496, *(float*)buf2497); + rsMatrixSet((rs_matrix2x2*) buf2498, *(uint32_t*)buf2499, *(uint32_t*)buf2500, *(float*)buf2501); + rsMatrixTranslate((rs_matrix4x4*) buf2502, *(float*)buf2503, *(float*)buf2504, *(float*)buf2505); + rsMatrixTranspose((rs_matrix4x4*) buf2506); + rsMatrixTranspose((rs_matrix3x3*) buf2507); + rsMatrixTranspose((rs_matrix2x2*) buf2508); + *(uchar4*)buf2509 = rsPackColorTo8888(*(float*)buf2510, *(float*)buf2511, *(float*)buf2512); + *(uchar4*)buf2513 = rsPackColorTo8888(*(float*)buf2514, *(float*)buf2515, *(float*)buf2516, *(float*)buf2517); + *(uchar4*)buf2518 = rsPackColorTo8888(*(float3*)buf2519); + *(uchar4*)buf2520 = rsPackColorTo8888(*(float4*)buf2521); + rsQuaternionAdd((rs_quaternion*) buf2522, (const rs_quaternion*) buf2523); + rsQuaternionConjugate((rs_quaternion*) buf2524); + *(float*)buf2525 = rsQuaternionDot((const rs_quaternion*) buf2526, (const rs_quaternion*) buf2527); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf2528, (const rs_quaternion*) buf2529); + rsQuaternionLoadRotate((rs_quaternion*) buf2530, *(float*)buf2531, *(float*)buf2532, *(float*)buf2533, *(float*)buf2534); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf2535, *(float*)buf2536, *(float*)buf2537, *(float*)buf2538, *(float*)buf2539); + rsQuaternionMultiply((rs_quaternion*) buf2540, *(float*)buf2541); + rsQuaternionMultiply((rs_quaternion*) buf2542, (const rs_quaternion*) buf2543); + rsQuaternionNormalize((rs_quaternion*) buf2544); + rsQuaternionSet((rs_quaternion*) buf2545, *(float*)buf2546, *(float*)buf2547, *(float*)buf2548, *(float*)buf2549); + rsQuaternionSet((rs_quaternion*) buf2550, (const rs_quaternion*) buf2551); + rsQuaternionSlerp((rs_quaternion*) buf2552, (const rs_quaternion*) buf2553, (const rs_quaternion*) buf2554, *(float*)buf2555); + *(int*)buf2556 = rsRand(*(int*)buf2557); + *(int*)buf2558 = rsRand(*(int*)buf2559, *(int*)buf2560); + *(float*)buf2561 = rsRand(*(float*)buf2562); + *(float*)buf2563 = rsRand(*(float*)buf2564, *(float*)buf2565); + *(float4*)buf2566 = rsSample(*(rs_allocation*)buf2567, *(rs_sampler*)buf2568, *(float*)buf2569); + *(float4*)buf2570 = rsSample(*(rs_allocation*)buf2571, *(rs_sampler*)buf2572, *(float*)buf2573, *(float*)buf2574); + *(float4*)buf2575 = rsSample(*(rs_allocation*)buf2576, *(rs_sampler*)buf2577, *(float2*)buf2578); + *(float4*)buf2579 = rsSample(*(rs_allocation*)buf2580, *(rs_sampler*)buf2581, *(float2*)buf2582, *(float*)buf2583); + *(float*)buf2584 = rsSamplerGetAnisotropy(*(rs_sampler*)buf2585); + *(rs_sampler_value*)buf2586 = rsSamplerGetMagnification(*(rs_sampler*)buf2587); + *(rs_sampler_value*)buf2588 = rsSamplerGetMinification(*(rs_sampler*)buf2589); + *(rs_sampler_value*)buf2590 = rsSamplerGetWrapS(*(rs_sampler*)buf2591); + *(rs_sampler_value*)buf2592 = rsSamplerGetWrapT(*(rs_sampler*)buf2593); + *(bool*)buf2594 = rsSendToClient(*(int*)buf2595); + *(bool*)buf2596 = rsSendToClient(*(int*)buf2597, (const void*) buf2598, *(uint*)buf2599); + rsSendToClientBlocking(*(int*)buf2600); + rsSendToClientBlocking(*(int*)buf2601, (const void*) buf2602, *(uint*)buf2603); + rsSetElementAt(*(rs_allocation*)buf2604, (void*) buf2605, *(uint32_t*)buf2606); + rsSetElementAt(*(rs_allocation*)buf2607, (void*) buf2608, *(uint32_t*)buf2609, *(uint32_t*)buf2610); + rsSetElementAt_float(*(rs_allocation*)buf2611, *(float*)buf2612, *(uint32_t*)buf2613); + rsSetElementAt_float2(*(rs_allocation*)buf2614, *(float2*)buf2615, *(uint32_t*)buf2616); + rsSetElementAt_float3(*(rs_allocation*)buf2617, *(float3*)buf2618, *(uint32_t*)buf2619); + rsSetElementAt_float4(*(rs_allocation*)buf2620, *(float4*)buf2621, *(uint32_t*)buf2622); + rsSetElementAt_double(*(rs_allocation*)buf2623, *(double*)buf2624, *(uint32_t*)buf2625); + rsSetElementAt_double2(*(rs_allocation*)buf2626, *(double2*)buf2627, *(uint32_t*)buf2628); + rsSetElementAt_double3(*(rs_allocation*)buf2629, *(double3*)buf2630, *(uint32_t*)buf2631); + rsSetElementAt_double4(*(rs_allocation*)buf2632, *(double4*)buf2633, *(uint32_t*)buf2634); + rsSetElementAt_char(*(rs_allocation*)buf2635, *(char*)buf2636, *(uint32_t*)buf2637); + rsSetElementAt_char2(*(rs_allocation*)buf2638, *(char2*)buf2639, *(uint32_t*)buf2640); + rsSetElementAt_char3(*(rs_allocation*)buf2641, *(char3*)buf2642, *(uint32_t*)buf2643); + rsSetElementAt_char4(*(rs_allocation*)buf2644, *(char4*)buf2645, *(uint32_t*)buf2646); + rsSetElementAt_uchar(*(rs_allocation*)buf2647, *(uchar*)buf2648, *(uint32_t*)buf2649); + rsSetElementAt_uchar2(*(rs_allocation*)buf2650, *(uchar2*)buf2651, *(uint32_t*)buf2652); + rsSetElementAt_uchar3(*(rs_allocation*)buf2653, *(uchar3*)buf2654, *(uint32_t*)buf2655); + rsSetElementAt_uchar4(*(rs_allocation*)buf2656, *(uchar4*)buf2657, *(uint32_t*)buf2658); + rsSetElementAt_short(*(rs_allocation*)buf2659, *(short*)buf2660, *(uint32_t*)buf2661); + rsSetElementAt_short2(*(rs_allocation*)buf2662, *(short2*)buf2663, *(uint32_t*)buf2664); + rsSetElementAt_short3(*(rs_allocation*)buf2665, *(short3*)buf2666, *(uint32_t*)buf2667); + rsSetElementAt_short4(*(rs_allocation*)buf2668, *(short4*)buf2669, *(uint32_t*)buf2670); + rsSetElementAt_ushort(*(rs_allocation*)buf2671, *(ushort*)buf2672, *(uint32_t*)buf2673); + rsSetElementAt_ushort2(*(rs_allocation*)buf2674, *(ushort2*)buf2675, *(uint32_t*)buf2676); + rsSetElementAt_ushort3(*(rs_allocation*)buf2677, *(ushort3*)buf2678, *(uint32_t*)buf2679); + rsSetElementAt_ushort4(*(rs_allocation*)buf2680, *(ushort4*)buf2681, *(uint32_t*)buf2682); + rsSetElementAt_int(*(rs_allocation*)buf2683, *(int*)buf2684, *(uint32_t*)buf2685); + rsSetElementAt_int2(*(rs_allocation*)buf2686, *(int2*)buf2687, *(uint32_t*)buf2688); + rsSetElementAt_int3(*(rs_allocation*)buf2689, *(int3*)buf2690, *(uint32_t*)buf2691); + rsSetElementAt_int4(*(rs_allocation*)buf2692, *(int4*)buf2693, *(uint32_t*)buf2694); + rsSetElementAt_uint(*(rs_allocation*)buf2695, *(uint*)buf2696, *(uint32_t*)buf2697); + rsSetElementAt_uint2(*(rs_allocation*)buf2698, *(uint2*)buf2699, *(uint32_t*)buf2700); + rsSetElementAt_uint3(*(rs_allocation*)buf2701, *(uint3*)buf2702, *(uint32_t*)buf2703); + rsSetElementAt_uint4(*(rs_allocation*)buf2704, *(uint4*)buf2705, *(uint32_t*)buf2706); + rsSetElementAt_long(*(rs_allocation*)buf2707, *(long*)buf2708, *(uint32_t*)buf2709); + rsSetElementAt_long2(*(rs_allocation*)buf2710, *(long2*)buf2711, *(uint32_t*)buf2712); + rsSetElementAt_long3(*(rs_allocation*)buf2713, *(long3*)buf2714, *(uint32_t*)buf2715); + rsSetElementAt_long4(*(rs_allocation*)buf2716, *(long4*)buf2717, *(uint32_t*)buf2718); + rsSetElementAt_ulong(*(rs_allocation*)buf2719, *(ulong*)buf2720, *(uint32_t*)buf2721); + rsSetElementAt_ulong2(*(rs_allocation*)buf2722, *(ulong2*)buf2723, *(uint32_t*)buf2724); + rsSetElementAt_ulong3(*(rs_allocation*)buf2725, *(ulong3*)buf2726, *(uint32_t*)buf2727); + rsSetElementAt_ulong4(*(rs_allocation*)buf2728, *(ulong4*)buf2729, *(uint32_t*)buf2730); + rsSetElementAt_float(*(rs_allocation*)buf2731, *(float*)buf2732, *(uint32_t*)buf2733, *(uint32_t*)buf2734); + rsSetElementAt_float2(*(rs_allocation*)buf2735, *(float2*)buf2736, *(uint32_t*)buf2737, *(uint32_t*)buf2738); + rsSetElementAt_float3(*(rs_allocation*)buf2739, *(float3*)buf2740, *(uint32_t*)buf2741, *(uint32_t*)buf2742); + rsSetElementAt_float4(*(rs_allocation*)buf2743, *(float4*)buf2744, *(uint32_t*)buf2745, *(uint32_t*)buf2746); + rsSetElementAt_double(*(rs_allocation*)buf2747, *(double*)buf2748, *(uint32_t*)buf2749, *(uint32_t*)buf2750); + rsSetElementAt_double2(*(rs_allocation*)buf2751, *(double2*)buf2752, *(uint32_t*)buf2753, *(uint32_t*)buf2754); + rsSetElementAt_double3(*(rs_allocation*)buf2755, *(double3*)buf2756, *(uint32_t*)buf2757, *(uint32_t*)buf2758); + rsSetElementAt_double4(*(rs_allocation*)buf2759, *(double4*)buf2760, *(uint32_t*)buf2761, *(uint32_t*)buf2762); + rsSetElementAt_char(*(rs_allocation*)buf2763, *(char*)buf2764, *(uint32_t*)buf2765, *(uint32_t*)buf2766); + rsSetElementAt_char2(*(rs_allocation*)buf2767, *(char2*)buf2768, *(uint32_t*)buf2769, *(uint32_t*)buf2770); + rsSetElementAt_char3(*(rs_allocation*)buf2771, *(char3*)buf2772, *(uint32_t*)buf2773, *(uint32_t*)buf2774); + rsSetElementAt_char4(*(rs_allocation*)buf2775, *(char4*)buf2776, *(uint32_t*)buf2777, *(uint32_t*)buf2778); + rsSetElementAt_uchar(*(rs_allocation*)buf2779, *(uchar*)buf2780, *(uint32_t*)buf2781, *(uint32_t*)buf2782); + rsSetElementAt_uchar2(*(rs_allocation*)buf2783, *(uchar2*)buf2784, *(uint32_t*)buf2785, *(uint32_t*)buf2786); + rsSetElementAt_uchar3(*(rs_allocation*)buf2787, *(uchar3*)buf2788, *(uint32_t*)buf2789, *(uint32_t*)buf2790); + rsSetElementAt_uchar4(*(rs_allocation*)buf2791, *(uchar4*)buf2792, *(uint32_t*)buf2793, *(uint32_t*)buf2794); + rsSetElementAt_short(*(rs_allocation*)buf2795, *(short*)buf2796, *(uint32_t*)buf2797, *(uint32_t*)buf2798); + rsSetElementAt_short2(*(rs_allocation*)buf2799, *(short2*)buf2800, *(uint32_t*)buf2801, *(uint32_t*)buf2802); + rsSetElementAt_short3(*(rs_allocation*)buf2803, *(short3*)buf2804, *(uint32_t*)buf2805, *(uint32_t*)buf2806); + rsSetElementAt_short4(*(rs_allocation*)buf2807, *(short4*)buf2808, *(uint32_t*)buf2809, *(uint32_t*)buf2810); + rsSetElementAt_ushort(*(rs_allocation*)buf2811, *(ushort*)buf2812, *(uint32_t*)buf2813, *(uint32_t*)buf2814); + rsSetElementAt_ushort2(*(rs_allocation*)buf2815, *(ushort2*)buf2816, *(uint32_t*)buf2817, *(uint32_t*)buf2818); + rsSetElementAt_ushort3(*(rs_allocation*)buf2819, *(ushort3*)buf2820, *(uint32_t*)buf2821, *(uint32_t*)buf2822); + rsSetElementAt_ushort4(*(rs_allocation*)buf2823, *(ushort4*)buf2824, *(uint32_t*)buf2825, *(uint32_t*)buf2826); + rsSetElementAt_int(*(rs_allocation*)buf2827, *(int*)buf2828, *(uint32_t*)buf2829, *(uint32_t*)buf2830); + rsSetElementAt_int2(*(rs_allocation*)buf2831, *(int2*)buf2832, *(uint32_t*)buf2833, *(uint32_t*)buf2834); + rsSetElementAt_int3(*(rs_allocation*)buf2835, *(int3*)buf2836, *(uint32_t*)buf2837, *(uint32_t*)buf2838); + rsSetElementAt_int4(*(rs_allocation*)buf2839, *(int4*)buf2840, *(uint32_t*)buf2841, *(uint32_t*)buf2842); + rsSetElementAt_uint(*(rs_allocation*)buf2843, *(uint*)buf2844, *(uint32_t*)buf2845, *(uint32_t*)buf2846); + rsSetElementAt_uint2(*(rs_allocation*)buf2847, *(uint2*)buf2848, *(uint32_t*)buf2849, *(uint32_t*)buf2850); + rsSetElementAt_uint3(*(rs_allocation*)buf2851, *(uint3*)buf2852, *(uint32_t*)buf2853, *(uint32_t*)buf2854); + rsSetElementAt_uint4(*(rs_allocation*)buf2855, *(uint4*)buf2856, *(uint32_t*)buf2857, *(uint32_t*)buf2858); + rsSetElementAt_long(*(rs_allocation*)buf2859, *(long*)buf2860, *(uint32_t*)buf2861, *(uint32_t*)buf2862); + rsSetElementAt_long2(*(rs_allocation*)buf2863, *(long2*)buf2864, *(uint32_t*)buf2865, *(uint32_t*)buf2866); + rsSetElementAt_long3(*(rs_allocation*)buf2867, *(long3*)buf2868, *(uint32_t*)buf2869, *(uint32_t*)buf2870); + rsSetElementAt_long4(*(rs_allocation*)buf2871, *(long4*)buf2872, *(uint32_t*)buf2873, *(uint32_t*)buf2874); + rsSetElementAt_ulong(*(rs_allocation*)buf2875, *(ulong*)buf2876, *(uint32_t*)buf2877, *(uint32_t*)buf2878); + rsSetElementAt_ulong2(*(rs_allocation*)buf2879, *(ulong2*)buf2880, *(uint32_t*)buf2881, *(uint32_t*)buf2882); + rsSetElementAt_ulong3(*(rs_allocation*)buf2883, *(ulong3*)buf2884, *(uint32_t*)buf2885, *(uint32_t*)buf2886); + rsSetElementAt_ulong4(*(rs_allocation*)buf2887, *(ulong4*)buf2888, *(uint32_t*)buf2889, *(uint32_t*)buf2890); + rsSetElementAt_float(*(rs_allocation*)buf2891, *(float*)buf2892, *(uint32_t*)buf2893, *(uint32_t*)buf2894, *(uint32_t*)buf2895); + rsSetElementAt_float2(*(rs_allocation*)buf2896, *(float2*)buf2897, *(uint32_t*)buf2898, *(uint32_t*)buf2899, *(uint32_t*)buf2900); + rsSetElementAt_float3(*(rs_allocation*)buf2901, *(float3*)buf2902, *(uint32_t*)buf2903, *(uint32_t*)buf2904, *(uint32_t*)buf2905); + rsSetElementAt_float4(*(rs_allocation*)buf2906, *(float4*)buf2907, *(uint32_t*)buf2908, *(uint32_t*)buf2909, *(uint32_t*)buf2910); + rsSetElementAt_double(*(rs_allocation*)buf2911, *(double*)buf2912, *(uint32_t*)buf2913, *(uint32_t*)buf2914, *(uint32_t*)buf2915); + rsSetElementAt_double2(*(rs_allocation*)buf2916, *(double2*)buf2917, *(uint32_t*)buf2918, *(uint32_t*)buf2919, *(uint32_t*)buf2920); + rsSetElementAt_double3(*(rs_allocation*)buf2921, *(double3*)buf2922, *(uint32_t*)buf2923, *(uint32_t*)buf2924, *(uint32_t*)buf2925); + rsSetElementAt_double4(*(rs_allocation*)buf2926, *(double4*)buf2927, *(uint32_t*)buf2928, *(uint32_t*)buf2929, *(uint32_t*)buf2930); + rsSetElementAt_char(*(rs_allocation*)buf2931, *(char*)buf2932, *(uint32_t*)buf2933, *(uint32_t*)buf2934, *(uint32_t*)buf2935); + rsSetElementAt_char2(*(rs_allocation*)buf2936, *(char2*)buf2937, *(uint32_t*)buf2938, *(uint32_t*)buf2939, *(uint32_t*)buf2940); + rsSetElementAt_char3(*(rs_allocation*)buf2941, *(char3*)buf2942, *(uint32_t*)buf2943, *(uint32_t*)buf2944, *(uint32_t*)buf2945); + rsSetElementAt_char4(*(rs_allocation*)buf2946, *(char4*)buf2947, *(uint32_t*)buf2948, *(uint32_t*)buf2949, *(uint32_t*)buf2950); + rsSetElementAt_uchar(*(rs_allocation*)buf2951, *(uchar*)buf2952, *(uint32_t*)buf2953, *(uint32_t*)buf2954, *(uint32_t*)buf2955); + rsSetElementAt_uchar2(*(rs_allocation*)buf2956, *(uchar2*)buf2957, *(uint32_t*)buf2958, *(uint32_t*)buf2959, *(uint32_t*)buf2960); + rsSetElementAt_uchar3(*(rs_allocation*)buf2961, *(uchar3*)buf2962, *(uint32_t*)buf2963, *(uint32_t*)buf2964, *(uint32_t*)buf2965); + rsSetElementAt_uchar4(*(rs_allocation*)buf2966, *(uchar4*)buf2967, *(uint32_t*)buf2968, *(uint32_t*)buf2969, *(uint32_t*)buf2970); + rsSetElementAt_short(*(rs_allocation*)buf2971, *(short*)buf2972, *(uint32_t*)buf2973, *(uint32_t*)buf2974, *(uint32_t*)buf2975); + rsSetElementAt_short2(*(rs_allocation*)buf2976, *(short2*)buf2977, *(uint32_t*)buf2978, *(uint32_t*)buf2979, *(uint32_t*)buf2980); + rsSetElementAt_short3(*(rs_allocation*)buf2981, *(short3*)buf2982, *(uint32_t*)buf2983, *(uint32_t*)buf2984, *(uint32_t*)buf2985); + rsSetElementAt_short4(*(rs_allocation*)buf2986, *(short4*)buf2987, *(uint32_t*)buf2988, *(uint32_t*)buf2989, *(uint32_t*)buf2990); + rsSetElementAt_ushort(*(rs_allocation*)buf2991, *(ushort*)buf2992, *(uint32_t*)buf2993, *(uint32_t*)buf2994, *(uint32_t*)buf2995); + rsSetElementAt_ushort2(*(rs_allocation*)buf2996, *(ushort2*)buf2997, *(uint32_t*)buf2998, *(uint32_t*)buf2999, *(uint32_t*)buf3000); + rsSetElementAt_ushort3(*(rs_allocation*)buf3001, *(ushort3*)buf3002, *(uint32_t*)buf3003, *(uint32_t*)buf3004, *(uint32_t*)buf3005); + rsSetElementAt_ushort4(*(rs_allocation*)buf3006, *(ushort4*)buf3007, *(uint32_t*)buf3008, *(uint32_t*)buf3009, *(uint32_t*)buf3010); + rsSetElementAt_int(*(rs_allocation*)buf3011, *(int*)buf3012, *(uint32_t*)buf3013, *(uint32_t*)buf3014, *(uint32_t*)buf3015); + rsSetElementAt_int2(*(rs_allocation*)buf3016, *(int2*)buf3017, *(uint32_t*)buf3018, *(uint32_t*)buf3019, *(uint32_t*)buf3020); + rsSetElementAt_int3(*(rs_allocation*)buf3021, *(int3*)buf3022, *(uint32_t*)buf3023, *(uint32_t*)buf3024, *(uint32_t*)buf3025); + rsSetElementAt_int4(*(rs_allocation*)buf3026, *(int4*)buf3027, *(uint32_t*)buf3028, *(uint32_t*)buf3029, *(uint32_t*)buf3030); + rsSetElementAt_uint(*(rs_allocation*)buf3031, *(uint*)buf3032, *(uint32_t*)buf3033, *(uint32_t*)buf3034, *(uint32_t*)buf3035); + rsSetElementAt_uint2(*(rs_allocation*)buf3036, *(uint2*)buf3037, *(uint32_t*)buf3038, *(uint32_t*)buf3039, *(uint32_t*)buf3040); + rsSetElementAt_uint3(*(rs_allocation*)buf3041, *(uint3*)buf3042, *(uint32_t*)buf3043, *(uint32_t*)buf3044, *(uint32_t*)buf3045); + rsSetElementAt_uint4(*(rs_allocation*)buf3046, *(uint4*)buf3047, *(uint32_t*)buf3048, *(uint32_t*)buf3049, *(uint32_t*)buf3050); + rsSetElementAt_long(*(rs_allocation*)buf3051, *(long*)buf3052, *(uint32_t*)buf3053, *(uint32_t*)buf3054, *(uint32_t*)buf3055); + rsSetElementAt_long2(*(rs_allocation*)buf3056, *(long2*)buf3057, *(uint32_t*)buf3058, *(uint32_t*)buf3059, *(uint32_t*)buf3060); + rsSetElementAt_long3(*(rs_allocation*)buf3061, *(long3*)buf3062, *(uint32_t*)buf3063, *(uint32_t*)buf3064, *(uint32_t*)buf3065); + rsSetElementAt_long4(*(rs_allocation*)buf3066, *(long4*)buf3067, *(uint32_t*)buf3068, *(uint32_t*)buf3069, *(uint32_t*)buf3070); + rsSetElementAt_ulong(*(rs_allocation*)buf3071, *(ulong*)buf3072, *(uint32_t*)buf3073, *(uint32_t*)buf3074, *(uint32_t*)buf3075); + rsSetElementAt_ulong2(*(rs_allocation*)buf3076, *(ulong2*)buf3077, *(uint32_t*)buf3078, *(uint32_t*)buf3079, *(uint32_t*)buf3080); + rsSetElementAt_ulong3(*(rs_allocation*)buf3081, *(ulong3*)buf3082, *(uint32_t*)buf3083, *(uint32_t*)buf3084, *(uint32_t*)buf3085); + rsSetElementAt_ulong4(*(rs_allocation*)buf3086, *(ulong4*)buf3087, *(uint32_t*)buf3088, *(uint32_t*)buf3089, *(uint32_t*)buf3090); + rsSetObject((rs_element*) buf3091, *(rs_element*)buf3092); + rsSetObject((rs_type*) buf3093, *(rs_type*)buf3094); + rsSetObject((rs_allocation*) buf3095, *(rs_allocation*)buf3096); + rsSetObject((rs_sampler*) buf3097, *(rs_sampler*)buf3098); + rsSetObject((rs_script*) buf3099, *(rs_script*)buf3100); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf3101, *(rs_mesh*)buf3102); + rsSetObject((rs_program_fragment*) buf3103, *(rs_program_fragment*)buf3104); + rsSetObject((rs_program_vertex*) buf3105, *(rs_program_vertex*)buf3106); + rsSetObject((rs_program_raster*) buf3107, *(rs_program_raster*)buf3108); + rsSetObject((rs_program_store*) buf3109, *(rs_program_store*)buf3110); + rsSetObject((rs_font*) buf3111, *(rs_font*)buf3112); +#endif + *(rs_time_t*)buf3113 = rsTime((rs_time_t*) buf3114); + *(float4*)buf3115 = rsUnpackColor8888(*(uchar4*)buf3116); + *(int64_t*)buf3117 = rsUptimeMillis(); + *(int64_t*)buf3118 = rsUptimeNanos(); + *(float4*)buf3119 = rsYuvToRGBA_float4(*(uchar*)buf3120, *(uchar*)buf3121, *(uchar*)buf3122); + *(uchar4*)buf3123 = rsYuvToRGBA_uchar4(*(uchar*)buf3124, *(uchar*)buf3125, *(uchar*)buf3126); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf3127); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf3128, *(rs_allocation_usage_type*)buf3129); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf3130, *(uint*)buf3131); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf3132, *(uint*)buf3133, *(rs_allocation*)buf3134); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf3135, *(uint*)buf3136, *(rs_allocation*)buf3137); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf3138); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf3139); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf3140); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf3141); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf3142); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf3143); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf3144, *(uint*)buf3145, *(rs_sampler*)buf3146); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf3147, *(uint*)buf3148, *(rs_allocation*)buf3149); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf3150, *(float*)buf3151, *(float*)buf3152, *(float*)buf3153); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf3154); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf3155); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3156); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3157, *(uint*)buf3158); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3159, *(uint*)buf3160, *(uint*)buf3161, *(uint*)buf3162); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf3163, *(float*)buf3164, *(float*)buf3165, *(float*)buf3166, *(float*)buf3167, *(float*)buf3168, *(float*)buf3169, *(float*)buf3170, *(float*)buf3171, *(float*)buf3172, *(float*)buf3173, *(float*)buf3174); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf3175, *(float*)buf3176, *(float*)buf3177, *(float*)buf3178, *(float*)buf3179, *(float*)buf3180, *(float*)buf3181, *(float*)buf3182, *(float*)buf3183, *(float*)buf3184, *(float*)buf3185, *(float*)buf3186, *(float*)buf3187, *(float*)buf3188, *(float*)buf3189, *(float*)buf3190, *(float*)buf3191, *(float*)buf3192, *(float*)buf3193, *(float*)buf3194); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf3195, *(float*)buf3196, *(float*)buf3197, *(float*)buf3198, *(float*)buf3199); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf3200, *(float*)buf3201, *(float*)buf3202, *(float*)buf3203, *(float*)buf3204); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf3205, *(int*)buf3206, *(int*)buf3207); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf3208, *(int*)buf3209, *(int*)buf3210); +#endif +#ifndef __LP64__ + *(uint*)buf3211 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf3212, *(float*)buf3213, *(float*)buf3214, *(float*)buf3215); +#endif +#ifndef __LP64__ + *(uint*)buf3216 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf3217 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf3218, (int*) buf3219, (int*) buf3220, (int*) buf3221, (int*) buf3222); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf3223, (int*) buf3224, (int*) buf3225, (int*) buf3226, (int*) buf3227); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf3228, (float*) buf3229, (float*) buf3230, (float*) buf3231, (float*) buf3232, (float*) buf3233, (float*) buf3234); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf3235, (float3*) buf3236, (float3*) buf3237); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf3238 = rsgMeshGetIndexAllocation(*(rs_mesh*)buf3239, *(uint32_t*)buf3240); +#endif +#ifndef __LP64__ + *(rs_primitive*)buf3241 = rsgMeshGetPrimitive(*(rs_mesh*)buf3242, *(uint32_t*)buf3243); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3244 = rsgMeshGetPrimitiveCount(*(rs_mesh*)buf3245); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf3246 = rsgMeshGetVertexAllocation(*(rs_mesh*)buf3247, *(uint32_t*)buf3248); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3249 = rsgMeshGetVertexAllocationCount(*(rs_mesh*)buf3250); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf3251, *(float*)buf3252, *(float*)buf3253, *(float*)buf3254, *(float*)buf3255); +#endif +#ifndef __LP64__ + *(rs_cull_mode*)buf3256 = rsgProgramRasterGetCullMode(*(rs_program_raster*)buf3257); +#endif +#ifndef __LP64__ + *(bool*)buf3258 = rsgProgramRasterIsPointSpriteEnabled(*(rs_program_raster*)buf3259); +#endif +#ifndef __LP64__ + *(rs_blend_dst_func*)buf3260 = rsgProgramStoreGetBlendDstFunc(*(rs_program_store*)buf3261); +#endif +#ifndef __LP64__ + *(rs_blend_src_func*)buf3262 = rsgProgramStoreGetBlendSrcFunc(*(rs_program_store*)buf3263); +#endif +#ifndef __LP64__ + *(rs_depth_func*)buf3264 = rsgProgramStoreGetDepthFunc(*(rs_program_store*)buf3265); +#endif +#ifndef __LP64__ + *(bool*)buf3266 = rsgProgramStoreIsColorMaskAlphaEnabled(*(rs_program_store*)buf3267); +#endif +#ifndef __LP64__ + *(bool*)buf3268 = rsgProgramStoreIsColorMaskBlueEnabled(*(rs_program_store*)buf3269); +#endif +#ifndef __LP64__ + *(bool*)buf3270 = rsgProgramStoreIsColorMaskGreenEnabled(*(rs_program_store*)buf3271); +#endif +#ifndef __LP64__ + *(bool*)buf3272 = rsgProgramStoreIsColorMaskRedEnabled(*(rs_program_store*)buf3273); +#endif +#ifndef __LP64__ + *(bool*)buf3274 = rsgProgramStoreIsDepthMaskEnabled(*(rs_program_store*)buf3275); +#endif +#ifndef __LP64__ + *(bool*)buf3276 = rsgProgramStoreIsDitherEnabled(*(rs_program_store*)buf3277); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf3278); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf3279); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf3280); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf3281); +#endif + *(float*)buf3282 = rsqrt(*(float*)buf3283); + *(float2*)buf3284 = rsqrt(*(float2*)buf3285); + *(float3*)buf3286 = rsqrt(*(float3*)buf3287); + *(float4*)buf3288 = rsqrt(*(float4*)buf3289); + *(float*)buf3290 = sign(*(float*)buf3291); + *(float2*)buf3292 = sign(*(float2*)buf3293); + *(float3*)buf3294 = sign(*(float3*)buf3295); + *(float4*)buf3296 = sign(*(float4*)buf3297); + *(float*)buf3298 = sin(*(float*)buf3299); + *(float2*)buf3300 = sin(*(float2*)buf3301); + *(float3*)buf3302 = sin(*(float3*)buf3303); + *(float4*)buf3304 = sin(*(float4*)buf3305); + *(float*)buf3306 = sincos(*(float*)buf3307, (float*) buf3308); + *(float2*)buf3309 = sincos(*(float2*)buf3310, (float2*) buf3311); + *(float3*)buf3312 = sincos(*(float3*)buf3313, (float3*) buf3314); + *(float4*)buf3315 = sincos(*(float4*)buf3316, (float4*) buf3317); + *(float*)buf3318 = sinh(*(float*)buf3319); + *(float2*)buf3320 = sinh(*(float2*)buf3321); + *(float3*)buf3322 = sinh(*(float3*)buf3323); + *(float4*)buf3324 = sinh(*(float4*)buf3325); + *(float*)buf3326 = sinpi(*(float*)buf3327); + *(float2*)buf3328 = sinpi(*(float2*)buf3329); + *(float3*)buf3330 = sinpi(*(float3*)buf3331); + *(float4*)buf3332 = sinpi(*(float4*)buf3333); + *(float*)buf3334 = sqrt(*(float*)buf3335); + *(float2*)buf3336 = sqrt(*(float2*)buf3337); + *(float3*)buf3338 = sqrt(*(float3*)buf3339); + *(float4*)buf3340 = sqrt(*(float4*)buf3341); + *(float*)buf3342 = step(*(float*)buf3343, *(float*)buf3344); + *(float2*)buf3345 = step(*(float2*)buf3346, *(float2*)buf3347); + *(float3*)buf3348 = step(*(float3*)buf3349, *(float3*)buf3350); + *(float4*)buf3351 = step(*(float4*)buf3352, *(float4*)buf3353); + *(float2*)buf3354 = step(*(float2*)buf3355, *(float*)buf3356); + *(float3*)buf3357 = step(*(float3*)buf3358, *(float*)buf3359); + *(float4*)buf3360 = step(*(float4*)buf3361, *(float*)buf3362); + *(float*)buf3363 = tan(*(float*)buf3364); + *(float2*)buf3365 = tan(*(float2*)buf3366); + *(float3*)buf3367 = tan(*(float3*)buf3368); + *(float4*)buf3369 = tan(*(float4*)buf3370); + *(float*)buf3371 = tanh(*(float*)buf3372); + *(float2*)buf3373 = tanh(*(float2*)buf3374); + *(float3*)buf3375 = tanh(*(float3*)buf3376); + *(float4*)buf3377 = tanh(*(float4*)buf3378); + *(float*)buf3379 = tanpi(*(float*)buf3380); + *(float2*)buf3381 = tanpi(*(float2*)buf3382); + *(float3*)buf3383 = tanpi(*(float3*)buf3384); + *(float4*)buf3385 = tanpi(*(float4*)buf3386); + *(float*)buf3387 = tgamma(*(float*)buf3388); + *(float2*)buf3389 = tgamma(*(float2*)buf3390); + *(float3*)buf3391 = tgamma(*(float3*)buf3392); + *(float4*)buf3393 = tgamma(*(float4*)buf3394); + *(float*)buf3395 = trunc(*(float*)buf3396); + *(float2*)buf3397 = trunc(*(float2*)buf3398); + *(float3*)buf3399 = trunc(*(float3*)buf3400); + *(float4*)buf3401 = trunc(*(float4*)buf3402); +}
diff --git a/slang/tests/P_all_api_20/stderr.txt.expect b/slang/tests/P_all_api_20/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_20/stderr.txt.expect
diff --git a/slang/tests/P_all_api_20/stdout.txt.expect b/slang/tests/P_all_api_20/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_20/stdout.txt.expect
diff --git a/slang/tests/P_all_api_21/all21.rs b/slang/tests/P_all_api_21/all21.rs new file mode 100644 index 0000000..cd0b0c8 --- /dev/null +++ b/slang/tests/P_all_api_21/all21.rs
@@ -0,0 +1,5688 @@ +// -target-api 21 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; +char buf2493[200]; +char buf2494[200]; +char buf2495[200]; +char buf2496[200]; +char buf2497[200]; +char buf2498[200]; +char buf2499[200]; +char buf2500[200]; +char buf2501[200]; +char buf2502[200]; +char buf2503[200]; +char buf2504[200]; +char buf2505[200]; +char buf2506[200]; +char buf2507[200]; +char buf2508[200]; +char buf2509[200]; +char buf2510[200]; +char buf2511[200]; +char buf2512[200]; +char buf2513[200]; +char buf2514[200]; +char buf2515[200]; +char buf2516[200]; +char buf2517[200]; +char buf2518[200]; +char buf2519[200]; +char buf2520[200]; +char buf2521[200]; +char buf2522[200]; +char buf2523[200]; +char buf2524[200]; +char buf2525[200]; +char buf2526[200]; +char buf2527[200]; +char buf2528[200]; +char buf2529[200]; +char buf2530[200]; +char buf2531[200]; +char buf2532[200]; +char buf2533[200]; +char buf2534[200]; +char buf2535[200]; +char buf2536[200]; +char buf2537[200]; +char buf2538[200]; +char buf2539[200]; +char buf2540[200]; +char buf2541[200]; +char buf2542[200]; +char buf2543[200]; +char buf2544[200]; +char buf2545[200]; +char buf2546[200]; +char buf2547[200]; +char buf2548[200]; +char buf2549[200]; +char buf2550[200]; +char buf2551[200]; +char buf2552[200]; +char buf2553[200]; +char buf2554[200]; +char buf2555[200]; +char buf2556[200]; +char buf2557[200]; +char buf2558[200]; +char buf2559[200]; +char buf2560[200]; +char buf2561[200]; +char buf2562[200]; +char buf2563[200]; +char buf2564[200]; +char buf2565[200]; +char buf2566[200]; +char buf2567[200]; +char buf2568[200]; +char buf2569[200]; +char buf2570[200]; +char buf2571[200]; +char buf2572[200]; +char buf2573[200]; +char buf2574[200]; +char buf2575[200]; +char buf2576[200]; +char buf2577[200]; +char buf2578[200]; +char buf2579[200]; +char buf2580[200]; +char buf2581[200]; +char buf2582[200]; +char buf2583[200]; +char buf2584[200]; +char buf2585[200]; +char buf2586[200]; +char buf2587[200]; +char buf2588[200]; +char buf2589[200]; +char buf2590[200]; +char buf2591[200]; +char buf2592[200]; +char buf2593[200]; +char buf2594[200]; +char buf2595[200]; +char buf2596[200]; +char buf2597[200]; +char buf2598[200]; +char buf2599[200]; +char buf2600[200]; +char buf2601[200]; +char buf2602[200]; +char buf2603[200]; +char buf2604[200]; +char buf2605[200]; +char buf2606[200]; +char buf2607[200]; +char buf2608[200]; +char buf2609[200]; +char buf2610[200]; +char buf2611[200]; +char buf2612[200]; +char buf2613[200]; +char buf2614[200]; +char buf2615[200]; +char buf2616[200]; +char buf2617[200]; +char buf2618[200]; +char buf2619[200]; +char buf2620[200]; +char buf2621[200]; +char buf2622[200]; +char buf2623[200]; +char buf2624[200]; +char buf2625[200]; +char buf2626[200]; +char buf2627[200]; +char buf2628[200]; +char buf2629[200]; +char buf2630[200]; +char buf2631[200]; +char buf2632[200]; +char buf2633[200]; +char buf2634[200]; +char buf2635[200]; +char buf2636[200]; +char buf2637[200]; +char buf2638[200]; +char buf2639[200]; +char buf2640[200]; +char buf2641[200]; +char buf2642[200]; +char buf2643[200]; +char buf2644[200]; +char buf2645[200]; +char buf2646[200]; +char buf2647[200]; +char buf2648[200]; +char buf2649[200]; +char buf2650[200]; +char buf2651[200]; +char buf2652[200]; +char buf2653[200]; +char buf2654[200]; +char buf2655[200]; +char buf2656[200]; +char buf2657[200]; +char buf2658[200]; +char buf2659[200]; +char buf2660[200]; +char buf2661[200]; +char buf2662[200]; +char buf2663[200]; +char buf2664[200]; +char buf2665[200]; +char buf2666[200]; +char buf2667[200]; +char buf2668[200]; +char buf2669[200]; +char buf2670[200]; +char buf2671[200]; +char buf2672[200]; +char buf2673[200]; +char buf2674[200]; +char buf2675[200]; +char buf2676[200]; +char buf2677[200]; +char buf2678[200]; +char buf2679[200]; +char buf2680[200]; +char buf2681[200]; +char buf2682[200]; +char buf2683[200]; +char buf2684[200]; +char buf2685[200]; +char buf2686[200]; +char buf2687[200]; +char buf2688[200]; +char buf2689[200]; +char buf2690[200]; +char buf2691[200]; +char buf2692[200]; +char buf2693[200]; +char buf2694[200]; +char buf2695[200]; +char buf2696[200]; +char buf2697[200]; +char buf2698[200]; +char buf2699[200]; +char buf2700[200]; +char buf2701[200]; +char buf2702[200]; +char buf2703[200]; +char buf2704[200]; +char buf2705[200]; +char buf2706[200]; +char buf2707[200]; +char buf2708[200]; +char buf2709[200]; +char buf2710[200]; +char buf2711[200]; +char buf2712[200]; +char buf2713[200]; +char buf2714[200]; +char buf2715[200]; +char buf2716[200]; +char buf2717[200]; +char buf2718[200]; +char buf2719[200]; +char buf2720[200]; +char buf2721[200]; +char buf2722[200]; +char buf2723[200]; +char buf2724[200]; +char buf2725[200]; +char buf2726[200]; +char buf2727[200]; +char buf2728[200]; +char buf2729[200]; +char buf2730[200]; +char buf2731[200]; +char buf2732[200]; +char buf2733[200]; +char buf2734[200]; +char buf2735[200]; +char buf2736[200]; +char buf2737[200]; +char buf2738[200]; +char buf2739[200]; +char buf2740[200]; +char buf2741[200]; +char buf2742[200]; +char buf2743[200]; +char buf2744[200]; +char buf2745[200]; +char buf2746[200]; +char buf2747[200]; +char buf2748[200]; +char buf2749[200]; +char buf2750[200]; +char buf2751[200]; +char buf2752[200]; +char buf2753[200]; +char buf2754[200]; +char buf2755[200]; +char buf2756[200]; +char buf2757[200]; +char buf2758[200]; +char buf2759[200]; +char buf2760[200]; +char buf2761[200]; +char buf2762[200]; +char buf2763[200]; +char buf2764[200]; +char buf2765[200]; +char buf2766[200]; +char buf2767[200]; +char buf2768[200]; +char buf2769[200]; +char buf2770[200]; +char buf2771[200]; +char buf2772[200]; +char buf2773[200]; +char buf2774[200]; +char buf2775[200]; +char buf2776[200]; +char buf2777[200]; +char buf2778[200]; +char buf2779[200]; +char buf2780[200]; +char buf2781[200]; +char buf2782[200]; +char buf2783[200]; +char buf2784[200]; +char buf2785[200]; +char buf2786[200]; +char buf2787[200]; +char buf2788[200]; +char buf2789[200]; +char buf2790[200]; +char buf2791[200]; +char buf2792[200]; +char buf2793[200]; +char buf2794[200]; +char buf2795[200]; +char buf2796[200]; +char buf2797[200]; +char buf2798[200]; +char buf2799[200]; +char buf2800[200]; +char buf2801[200]; +char buf2802[200]; +char buf2803[200]; +char buf2804[200]; +char buf2805[200]; +char buf2806[200]; +char buf2807[200]; +char buf2808[200]; +char buf2809[200]; +char buf2810[200]; +char buf2811[200]; +char buf2812[200]; +char buf2813[200]; +char buf2814[200]; +char buf2815[200]; +char buf2816[200]; +char buf2817[200]; +char buf2818[200]; +char buf2819[200]; +char buf2820[200]; +char buf2821[200]; +char buf2822[200]; +char buf2823[200]; +char buf2824[200]; +char buf2825[200]; +char buf2826[200]; +char buf2827[200]; +char buf2828[200]; +char buf2829[200]; +char buf2830[200]; +char buf2831[200]; +char buf2832[200]; +char buf2833[200]; +char buf2834[200]; +char buf2835[200]; +char buf2836[200]; +char buf2837[200]; +char buf2838[200]; +char buf2839[200]; +char buf2840[200]; +char buf2841[200]; +char buf2842[200]; +char buf2843[200]; +char buf2844[200]; +char buf2845[200]; +char buf2846[200]; +char buf2847[200]; +char buf2848[200]; +char buf2849[200]; +char buf2850[200]; +char buf2851[200]; +char buf2852[200]; +char buf2853[200]; +char buf2854[200]; +char buf2855[200]; +char buf2856[200]; +char buf2857[200]; +char buf2858[200]; +char buf2859[200]; +char buf2860[200]; +char buf2861[200]; +char buf2862[200]; +char buf2863[200]; +char buf2864[200]; +char buf2865[200]; +char buf2866[200]; +char buf2867[200]; +char buf2868[200]; +char buf2869[200]; +char buf2870[200]; +char buf2871[200]; +char buf2872[200]; +char buf2873[200]; +char buf2874[200]; +char buf2875[200]; +char buf2876[200]; +char buf2877[200]; +char buf2878[200]; +char buf2879[200]; +char buf2880[200]; +char buf2881[200]; +char buf2882[200]; +char buf2883[200]; +char buf2884[200]; +char buf2885[200]; +char buf2886[200]; +char buf2887[200]; +char buf2888[200]; +char buf2889[200]; +char buf2890[200]; +char buf2891[200]; +char buf2892[200]; +char buf2893[200]; +char buf2894[200]; +char buf2895[200]; +char buf2896[200]; +char buf2897[200]; +char buf2898[200]; +char buf2899[200]; +char buf2900[200]; +char buf2901[200]; +char buf2902[200]; +char buf2903[200]; +char buf2904[200]; +char buf2905[200]; +char buf2906[200]; +char buf2907[200]; +char buf2908[200]; +char buf2909[200]; +char buf2910[200]; +char buf2911[200]; +char buf2912[200]; +char buf2913[200]; +char buf2914[200]; +char buf2915[200]; +char buf2916[200]; +char buf2917[200]; +char buf2918[200]; +char buf2919[200]; +char buf2920[200]; +char buf2921[200]; +char buf2922[200]; +char buf2923[200]; +char buf2924[200]; +char buf2925[200]; +char buf2926[200]; +char buf2927[200]; +char buf2928[200]; +char buf2929[200]; +char buf2930[200]; +char buf2931[200]; +char buf2932[200]; +char buf2933[200]; +char buf2934[200]; +char buf2935[200]; +char buf2936[200]; +char buf2937[200]; +char buf2938[200]; +char buf2939[200]; +char buf2940[200]; +char buf2941[200]; +char buf2942[200]; +char buf2943[200]; +char buf2944[200]; +char buf2945[200]; +char buf2946[200]; +char buf2947[200]; +char buf2948[200]; +char buf2949[200]; +char buf2950[200]; +char buf2951[200]; +char buf2952[200]; +char buf2953[200]; +char buf2954[200]; +char buf2955[200]; +char buf2956[200]; +char buf2957[200]; +char buf2958[200]; +char buf2959[200]; +char buf2960[200]; +char buf2961[200]; +char buf2962[200]; +char buf2963[200]; +char buf2964[200]; +char buf2965[200]; +char buf2966[200]; +char buf2967[200]; +char buf2968[200]; +char buf2969[200]; +char buf2970[200]; +char buf2971[200]; +char buf2972[200]; +char buf2973[200]; +char buf2974[200]; +char buf2975[200]; +char buf2976[200]; +char buf2977[200]; +char buf2978[200]; +char buf2979[200]; +char buf2980[200]; +char buf2981[200]; +char buf2982[200]; +char buf2983[200]; +char buf2984[200]; +char buf2985[200]; +char buf2986[200]; +char buf2987[200]; +char buf2988[200]; +char buf2989[200]; +char buf2990[200]; +char buf2991[200]; +char buf2992[200]; +char buf2993[200]; +char buf2994[200]; +char buf2995[200]; +char buf2996[200]; +char buf2997[200]; +char buf2998[200]; +char buf2999[200]; +char buf3000[200]; +char buf3001[200]; +char buf3002[200]; +char buf3003[200]; +char buf3004[200]; +char buf3005[200]; +char buf3006[200]; +char buf3007[200]; +char buf3008[200]; +char buf3009[200]; +char buf3010[200]; +char buf3011[200]; +char buf3012[200]; +char buf3013[200]; +char buf3014[200]; +char buf3015[200]; +char buf3016[200]; +char buf3017[200]; +char buf3018[200]; +char buf3019[200]; +char buf3020[200]; +char buf3021[200]; +char buf3022[200]; +char buf3023[200]; +char buf3024[200]; +char buf3025[200]; +char buf3026[200]; +char buf3027[200]; +char buf3028[200]; +char buf3029[200]; +char buf3030[200]; +char buf3031[200]; +char buf3032[200]; +char buf3033[200]; +char buf3034[200]; +char buf3035[200]; +char buf3036[200]; +char buf3037[200]; +char buf3038[200]; +char buf3039[200]; +char buf3040[200]; +char buf3041[200]; +char buf3042[200]; +char buf3043[200]; +char buf3044[200]; +char buf3045[200]; +char buf3046[200]; +char buf3047[200]; +char buf3048[200]; +char buf3049[200]; +char buf3050[200]; +char buf3051[200]; +char buf3052[200]; +char buf3053[200]; +char buf3054[200]; +char buf3055[200]; +char buf3056[200]; +char buf3057[200]; +char buf3058[200]; +char buf3059[200]; +char buf3060[200]; +char buf3061[200]; +char buf3062[200]; +char buf3063[200]; +char buf3064[200]; +char buf3065[200]; +char buf3066[200]; +char buf3067[200]; +char buf3068[200]; +char buf3069[200]; +char buf3070[200]; +char buf3071[200]; +char buf3072[200]; +char buf3073[200]; +char buf3074[200]; +char buf3075[200]; +char buf3076[200]; +char buf3077[200]; +char buf3078[200]; +char buf3079[200]; +char buf3080[200]; +char buf3081[200]; +char buf3082[200]; +char buf3083[200]; +char buf3084[200]; +char buf3085[200]; +char buf3086[200]; +char buf3087[200]; +char buf3088[200]; +char buf3089[200]; +char buf3090[200]; +char buf3091[200]; +char buf3092[200]; +char buf3093[200]; +char buf3094[200]; +char buf3095[200]; +char buf3096[200]; +char buf3097[200]; +char buf3098[200]; +char buf3099[200]; +char buf3100[200]; +char buf3101[200]; +char buf3102[200]; +char buf3103[200]; +char buf3104[200]; +char buf3105[200]; +char buf3106[200]; +char buf3107[200]; +char buf3108[200]; +char buf3109[200]; +char buf3110[200]; +char buf3111[200]; +char buf3112[200]; +char buf3113[200]; +char buf3114[200]; +char buf3115[200]; +char buf3116[200]; +char buf3117[200]; +char buf3118[200]; +char buf3119[200]; +char buf3120[200]; +char buf3121[200]; +char buf3122[200]; +char buf3123[200]; +char buf3124[200]; +char buf3125[200]; +char buf3126[200]; +char buf3127[200]; +char buf3128[200]; +char buf3129[200]; +char buf3130[200]; +char buf3131[200]; +char buf3132[200]; +char buf3133[200]; +char buf3134[200]; +char buf3135[200]; +char buf3136[200]; +char buf3137[200]; +char buf3138[200]; +char buf3139[200]; +char buf3140[200]; +char buf3141[200]; +char buf3142[200]; +char buf3143[200]; +char buf3144[200]; +char buf3145[200]; +char buf3146[200]; +char buf3147[200]; +char buf3148[200]; +char buf3149[200]; +char buf3150[200]; +char buf3151[200]; +char buf3152[200]; +char buf3153[200]; +char buf3154[200]; +char buf3155[200]; +char buf3156[200]; +char buf3157[200]; +char buf3158[200]; +char buf3159[200]; +char buf3160[200]; +char buf3161[200]; +char buf3162[200]; +char buf3163[200]; +char buf3164[200]; +char buf3165[200]; +char buf3166[200]; +char buf3167[200]; +char buf3168[200]; +char buf3169[200]; +char buf3170[200]; +char buf3171[200]; +char buf3172[200]; +char buf3173[200]; +char buf3174[200]; +char buf3175[200]; +char buf3176[200]; +char buf3177[200]; +char buf3178[200]; +char buf3179[200]; +char buf3180[200]; +char buf3181[200]; +char buf3182[200]; +char buf3183[200]; +char buf3184[200]; +char buf3185[200]; +char buf3186[200]; +char buf3187[200]; +char buf3188[200]; +char buf3189[200]; +char buf3190[200]; +char buf3191[200]; +char buf3192[200]; +char buf3193[200]; +char buf3194[200]; +char buf3195[200]; +char buf3196[200]; +char buf3197[200]; +char buf3198[200]; +char buf3199[200]; +char buf3200[200]; +char buf3201[200]; +char buf3202[200]; +char buf3203[200]; +char buf3204[200]; +char buf3205[200]; +char buf3206[200]; +char buf3207[200]; +char buf3208[200]; +char buf3209[200]; +char buf3210[200]; +char buf3211[200]; +char buf3212[200]; +char buf3213[200]; +char buf3214[200]; +char buf3215[200]; +char buf3216[200]; +char buf3217[200]; +char buf3218[200]; +char buf3219[200]; +char buf3220[200]; +char buf3221[200]; +char buf3222[200]; +char buf3223[200]; +char buf3224[200]; +char buf3225[200]; +char buf3226[200]; +char buf3227[200]; +char buf3228[200]; +char buf3229[200]; +char buf3230[200]; +char buf3231[200]; +char buf3232[200]; +char buf3233[200]; +char buf3234[200]; +char buf3235[200]; +char buf3236[200]; +char buf3237[200]; +char buf3238[200]; +char buf3239[200]; +char buf3240[200]; +char buf3241[200]; +char buf3242[200]; +char buf3243[200]; +char buf3244[200]; +char buf3245[200]; +char buf3246[200]; +char buf3247[200]; +char buf3248[200]; +char buf3249[200]; +char buf3250[200]; +char buf3251[200]; +char buf3252[200]; +char buf3253[200]; +char buf3254[200]; +char buf3255[200]; +char buf3256[200]; +char buf3257[200]; +char buf3258[200]; +char buf3259[200]; +char buf3260[200]; +char buf3261[200]; +char buf3262[200]; +char buf3263[200]; +char buf3264[200]; +char buf3265[200]; +char buf3266[200]; +char buf3267[200]; +char buf3268[200]; +char buf3269[200]; +char buf3270[200]; +char buf3271[200]; +char buf3272[200]; +char buf3273[200]; +char buf3274[200]; +char buf3275[200]; +char buf3276[200]; +char buf3277[200]; +char buf3278[200]; +char buf3279[200]; +char buf3280[200]; +char buf3281[200]; +char buf3282[200]; +char buf3283[200]; +char buf3284[200]; +char buf3285[200]; +char buf3286[200]; +char buf3287[200]; +char buf3288[200]; +char buf3289[200]; +char buf3290[200]; +char buf3291[200]; +char buf3292[200]; +char buf3293[200]; +char buf3294[200]; +char buf3295[200]; +char buf3296[200]; +char buf3297[200]; +char buf3298[200]; +char buf3299[200]; +char buf3300[200]; +char buf3301[200]; +char buf3302[200]; +char buf3303[200]; +char buf3304[200]; +char buf3305[200]; +char buf3306[200]; +char buf3307[200]; +char buf3308[200]; +char buf3309[200]; +char buf3310[200]; +char buf3311[200]; +char buf3312[200]; +char buf3313[200]; +char buf3314[200]; +char buf3315[200]; +char buf3316[200]; +char buf3317[200]; +char buf3318[200]; +char buf3319[200]; +char buf3320[200]; +char buf3321[200]; +char buf3322[200]; +char buf3323[200]; +char buf3324[200]; +char buf3325[200]; +char buf3326[200]; +char buf3327[200]; +char buf3328[200]; +char buf3329[200]; +char buf3330[200]; +char buf3331[200]; +char buf3332[200]; +char buf3333[200]; +char buf3334[200]; +char buf3335[200]; +char buf3336[200]; +char buf3337[200]; +char buf3338[200]; +char buf3339[200]; +char buf3340[200]; +char buf3341[200]; +char buf3342[200]; +char buf3343[200]; +char buf3344[200]; +char buf3345[200]; +char buf3346[200]; +char buf3347[200]; +char buf3348[200]; +char buf3349[200]; +char buf3350[200]; +char buf3351[200]; +char buf3352[200]; +char buf3353[200]; +char buf3354[200]; +char buf3355[200]; +char buf3356[200]; +char buf3357[200]; +char buf3358[200]; +char buf3359[200]; +char buf3360[200]; +char buf3361[200]; +char buf3362[200]; +char buf3363[200]; +char buf3364[200]; +char buf3365[200]; +char buf3366[200]; +char buf3367[200]; +char buf3368[200]; +char buf3369[200]; +char buf3370[200]; +char buf3371[200]; +char buf3372[200]; +char buf3373[200]; +char buf3374[200]; +char buf3375[200]; +char buf3376[200]; +char buf3377[200]; +char buf3378[200]; +char buf3379[200]; +char buf3380[200]; +char buf3381[200]; +char buf3382[200]; +char buf3383[200]; +char buf3384[200]; +char buf3385[200]; +char buf3386[200]; +char buf3387[200]; +char buf3388[200]; +char buf3389[200]; +char buf3390[200]; +char buf3391[200]; +char buf3392[200]; +char buf3393[200]; +char buf3394[200]; +char buf3395[200]; +char buf3396[200]; +char buf3397[200]; +char buf3398[200]; +char buf3399[200]; +char buf3400[200]; +char buf3401[200]; +char buf3402[200]; +char buf3403[200]; +char buf3404[200]; +char buf3405[200]; +char buf3406[200]; +char buf3407[200]; +char buf3408[200]; +char buf3409[200]; +char buf3410[200]; +char buf3411[200]; +char buf3412[200]; +char buf3413[200]; +char buf3414[200]; +char buf3415[200]; +char buf3416[200]; +char buf3417[200]; +char buf3418[200]; +char buf3419[200]; +char buf3420[200]; +char buf3421[200]; +char buf3422[200]; +char buf3423[200]; +char buf3424[200]; +char buf3425[200]; +char buf3426[200]; +char buf3427[200]; +char buf3428[200]; +char buf3429[200]; +char buf3430[200]; +char buf3431[200]; +char buf3432[200]; +char buf3433[200]; +char buf3434[200]; +char buf3435[200]; +char buf3436[200]; +char buf3437[200]; +char buf3438[200]; +char buf3439[200]; +char buf3440[200]; +char buf3441[200]; +char buf3442[200]; +char buf3443[200]; +char buf3444[200]; +char buf3445[200]; +char buf3446[200]; +char buf3447[200]; +char buf3448[200]; +char buf3449[200]; +char buf3450[200]; +char buf3451[200]; +char buf3452[200]; +char buf3453[200]; +char buf3454[200]; +char buf3455[200]; +char buf3456[200]; +char buf3457[200]; +char buf3458[200]; +char buf3459[200]; +char buf3460[200]; +char buf3461[200]; +char buf3462[200]; +char buf3463[200]; +char buf3464[200]; +char buf3465[200]; +char buf3466[200]; +char buf3467[200]; +char buf3468[200]; +char buf3469[200]; +char buf3470[200]; +char buf3471[200]; +char buf3472[200]; +char buf3473[200]; +char buf3474[200]; +char buf3475[200]; +char buf3476[200]; +char buf3477[200]; +char buf3478[200]; +char buf3479[200]; +char buf3480[200]; +char buf3481[200]; +char buf3482[200]; +char buf3483[200]; +char buf3484[200]; +char buf3485[200]; +char buf3486[200]; +char buf3487[200]; +char buf3488[200]; +char buf3489[200]; +char buf3490[200]; +char buf3491[200]; +char buf3492[200]; +char buf3493[200]; +char buf3494[200]; +char buf3495[200]; +char buf3496[200]; +char buf3497[200]; +char buf3498[200]; +char buf3499[200]; +char buf3500[200]; +char buf3501[200]; +char buf3502[200]; +char buf3503[200]; +char buf3504[200]; +char buf3505[200]; +char buf3506[200]; +char buf3507[200]; +char buf3508[200]; +char buf3509[200]; +char buf3510[200]; +char buf3511[200]; +char buf3512[200]; +char buf3513[200]; +char buf3514[200]; +char buf3515[200]; +char buf3516[200]; +char buf3517[200]; +char buf3518[200]; +char buf3519[200]; +char buf3520[200]; +char buf3521[200]; +char buf3522[200]; +char buf3523[200]; +char buf3524[200]; +char buf3525[200]; +char buf3526[200]; +char buf3527[200]; +char buf3528[200]; +char buf3529[200]; +char buf3530[200]; +char buf3531[200]; +char buf3532[200]; +char buf3533[200]; +char buf3534[200]; +char buf3535[200]; +char buf3536[200]; +char buf3537[200]; +char buf3538[200]; +char buf3539[200]; +char buf3540[200]; +char buf3541[200]; +char buf3542[200]; +char buf3543[200]; +char buf3544[200]; +char buf3545[200]; +char buf3546[200]; +char buf3547[200]; +char buf3548[200]; +char buf3549[200]; +char buf3550[200]; +char buf3551[200]; +char buf3552[200]; +char buf3553[200]; +char buf3554[200]; +char buf3555[200]; +char buf3556[200]; +char buf3557[200]; +char buf3558[200]; +char buf3559[200]; +char buf3560[200]; +char buf3561[200]; +char buf3562[200]; +char buf3563[200]; +char buf3564[200]; +char buf3565[200]; +char buf3566[200]; +char buf3567[200]; +char buf3568[200]; +char buf3569[200]; +char buf3570[200]; +char buf3571[200]; +char buf3572[200]; +char buf3573[200]; +char buf3574[200]; +char buf3575[200]; +char buf3576[200]; +char buf3577[200]; +char buf3578[200]; +char buf3579[200]; +char buf3580[200]; +char buf3581[200]; +char buf3582[200]; +char buf3583[200]; +char buf3584[200]; +char buf3585[200]; +char buf3586[200]; +char buf3587[200]; +char buf3588[200]; +char buf3589[200]; +char buf3590[200]; +char buf3591[200]; +char buf3592[200]; +char buf3593[200]; +char buf3594[200]; +char buf3595[200]; +char buf3596[200]; +char buf3597[200]; +char buf3598[200]; +char buf3599[200]; +char buf3600[200]; +char buf3601[200]; +char buf3602[200]; +char buf3603[200]; +char buf3604[200]; +char buf3605[200]; +char buf3606[200]; +char buf3607[200]; +char buf3608[200]; +char buf3609[200]; +char buf3610[200]; +char buf3611[200]; +char buf3612[200]; +char buf3613[200]; +char buf3614[200]; +char buf3615[200]; +char buf3616[200]; +char buf3617[200]; +char buf3618[200]; +char buf3619[200]; +char buf3620[200]; +char buf3621[200]; +char buf3622[200]; +char buf3623[200]; +char buf3624[200]; +char buf3625[200]; +char buf3626[200]; +char buf3627[200]; +char buf3628[200]; +char buf3629[200]; +char buf3630[200]; +char buf3631[200]; +char buf3632[200]; +char buf3633[200]; +char buf3634[200]; +char buf3635[200]; +char buf3636[200]; +char buf3637[200]; +char buf3638[200]; +char buf3639[200]; +char buf3640[200]; +char buf3641[200]; +char buf3642[200]; +char buf3643[200]; +char buf3644[200]; +char buf3645[200]; +char buf3646[200]; +char buf3647[200]; +char buf3648[200]; +char buf3649[200]; +char buf3650[200]; +char buf3651[200]; +char buf3652[200]; +char buf3653[200]; +char buf3654[200]; +char buf3655[200]; +char buf3656[200]; +char buf3657[200]; +char buf3658[200]; +char buf3659[200]; +char buf3660[200]; +char buf3661[200]; +char buf3662[200]; +char buf3663[200]; +char buf3664[200]; +char buf3665[200]; +char buf3666[200]; +char buf3667[200]; +char buf3668[200]; +char buf3669[200]; +char buf3670[200]; +char buf3671[200]; +char buf3672[200]; +char buf3673[200]; +char buf3674[200]; +char buf3675[200]; +char buf3676[200]; +char buf3677[200]; +char buf3678[200]; +char buf3679[200]; +char buf3680[200]; +char buf3681[200]; +char buf3682[200]; +char buf3683[200]; +char buf3684[200]; +char buf3685[200]; +char buf3686[200]; +char buf3687[200]; +char buf3688[200]; +char buf3689[200]; +char buf3690[200]; +char buf3691[200]; +char buf3692[200]; +char buf3693[200]; +char buf3694[200]; +char buf3695[200]; +char buf3696[200]; +char buf3697[200]; +char buf3698[200]; +char buf3699[200]; +char buf3700[200]; +char buf3701[200]; +char buf3702[200]; +char buf3703[200]; +char buf3704[200]; +char buf3705[200]; +char buf3706[200]; +char buf3707[200]; +char buf3708[200]; +char buf3709[200]; +char buf3710[200]; +char buf3711[200]; +char buf3712[200]; +char buf3713[200]; +char buf3714[200]; +char buf3715[200]; +char buf3716[200]; +char buf3717[200]; +char buf3718[200]; +char buf3719[200]; +char buf3720[200]; +char buf3721[200]; +char buf3722[200]; +char buf3723[200]; +char buf3724[200]; +char buf3725[200]; +char buf3726[200]; +char buf3727[200]; +char buf3728[200]; +char buf3729[200]; +char buf3730[200]; +char buf3731[200]; +char buf3732[200]; +char buf3733[200]; +char buf3734[200]; +char buf3735[200]; +char buf3736[200]; +char buf3737[200]; +char buf3738[200]; +char buf3739[200]; +char buf3740[200]; +char buf3741[200]; +char buf3742[200]; +char buf3743[200]; +char buf3744[200]; +char buf3745[200]; +char buf3746[200]; +char buf3747[200]; +char buf3748[200]; +char buf3749[200]; +char buf3750[200]; +char buf3751[200]; +char buf3752[200]; +char buf3753[200]; +char buf3754[200]; +char buf3755[200]; +char buf3756[200]; +char buf3757[200]; +char buf3758[200]; +char buf3759[200]; +char buf3760[200]; +char buf3761[200]; +char buf3762[200]; +char buf3763[200]; +char buf3764[200]; +char buf3765[200]; +char buf3766[200]; +char buf3767[200]; +char buf3768[200]; +char buf3769[200]; +char buf3770[200]; +char buf3771[200]; +char buf3772[200]; +char buf3773[200]; +char buf3774[200]; +char buf3775[200]; +char buf3776[200]; +char buf3777[200]; +char buf3778[200]; +char buf3779[200]; +char buf3780[200]; +char buf3781[200]; +char buf3782[200]; +char buf3783[200]; +char buf3784[200]; +char buf3785[200]; +char buf3786[200]; +char buf3787[200]; +char buf3788[200]; +char buf3789[200]; +char buf3790[200]; +char buf3791[200]; +char buf3792[200]; +char buf3793[200]; +char buf3794[200]; +char buf3795[200]; +char buf3796[200]; +char buf3797[200]; +char buf3798[200]; +char buf3799[200]; +char buf3800[200]; +char buf3801[200]; +char buf3802[200]; +char buf3803[200]; +char buf3804[200]; +char buf3805[200]; +char buf3806[200]; +char buf3807[200]; +char buf3808[200]; +char buf3809[200]; +char buf3810[200]; +char buf3811[200]; +char buf3812[200]; +char buf3813[200]; +char buf3814[200]; +char buf3815[200]; +char buf3816[200]; +char buf3817[200]; +char buf3818[200]; +char buf3819[200]; +char buf3820[200]; +char buf3821[200]; +char buf3822[200]; +char buf3823[200]; +char buf3824[200]; +char buf3825[200]; +char buf3826[200]; +char buf3827[200]; +char buf3828[200]; +char buf3829[200]; +char buf3830[200]; +char buf3831[200]; +char buf3832[200]; +char buf3833[200]; +char buf3834[200]; +char buf3835[200]; +char buf3836[200]; +char buf3837[200]; +char buf3838[200]; +char buf3839[200]; +char buf3840[200]; +char buf3841[200]; +char buf3842[200]; +char buf3843[200]; +char buf3844[200]; +char buf3845[200]; +char buf3846[200]; +char buf3847[200]; +char buf3848[200]; +char buf3849[200]; +char buf3850[200]; +char buf3851[200]; +char buf3852[200]; +char buf3853[200]; +char buf3854[200]; +char buf3855[200]; +char buf3856[200]; +char buf3857[200]; +char buf3858[200]; +char buf3859[200]; +char buf3860[200]; +char buf3861[200]; +char buf3862[200]; +char buf3863[200]; +char buf3864[200]; +char buf3865[200]; +char buf3866[200]; +char buf3867[200]; +char buf3868[200]; +char buf3869[200]; +char buf3870[200]; +char buf3871[200]; +char buf3872[200]; +char buf3873[200]; +char buf3874[200]; +char buf3875[200]; +char buf3876[200]; +char buf3877[200]; +char buf3878[200]; +char buf3879[200]; +char buf3880[200]; +char buf3881[200]; +char buf3882[200]; +char buf3883[200]; +char buf3884[200]; +char buf3885[200]; +char buf3886[200]; +char buf3887[200]; +char buf3888[200]; +char buf3889[200]; +char buf3890[200]; +char buf3891[200]; +char buf3892[200]; +char buf3893[200]; +char buf3894[200]; +char buf3895[200]; +char buf3896[200]; +char buf3897[200]; +char buf3898[200]; +char buf3899[200]; +char buf3900[200]; +char buf3901[200]; +char buf3902[200]; +char buf3903[200]; +char buf3904[200]; +char buf3905[200]; +char buf3906[200]; +char buf3907[200]; +char buf3908[200]; +char buf3909[200]; +char buf3910[200]; +char buf3911[200]; +char buf3912[200]; +char buf3913[200]; +char buf3914[200]; +char buf3915[200]; +char buf3916[200]; +char buf3917[200]; +char buf3918[200]; +char buf3919[200]; +char buf3920[200]; +char buf3921[200]; +char buf3922[200]; +char buf3923[200]; +char buf3924[200]; +char buf3925[200]; +char buf3926[200]; +char buf3927[200]; +char buf3928[200]; +char buf3929[200]; +char buf3930[200]; +char buf3931[200]; +char buf3932[200]; +char buf3933[200]; +char buf3934[200]; +char buf3935[200]; +char buf3936[200]; +char buf3937[200]; +char buf3938[200]; +char buf3939[200]; +char buf3940[200]; +char buf3941[200]; +char buf3942[200]; +char buf3943[200]; +char buf3944[200]; +char buf3945[200]; +char buf3946[200]; +char buf3947[200]; +char buf3948[200]; +char buf3949[200]; +char buf3950[200]; +char buf3951[200]; +char buf3952[200]; +char buf3953[200]; +char buf3954[200]; +char buf3955[200]; +char buf3956[200]; +char buf3957[200]; +char buf3958[200]; +char buf3959[200]; +char buf3960[200]; +char buf3961[200]; +char buf3962[200]; +char buf3963[200]; +char buf3964[200]; +char buf3965[200]; +char buf3966[200]; +char buf3967[200]; +char buf3968[200]; +char buf3969[200]; +char buf3970[200]; +char buf3971[200]; +char buf3972[200]; +char buf3973[200]; +char buf3974[200]; +char buf3975[200]; +char buf3976[200]; +char buf3977[200]; +char buf3978[200]; +char buf3979[200]; +char buf3980[200]; +char buf3981[200]; +char buf3982[200]; +char buf3983[200]; +char buf3984[200]; +char buf3985[200]; +char buf3986[200]; +char buf3987[200]; +char buf3988[200]; +char buf3989[200]; +char buf3990[200]; +char buf3991[200]; +char buf3992[200]; +char buf3993[200]; +char buf3994[200]; +char buf3995[200]; +char buf3996[200]; +char buf3997[200]; +char buf3998[200]; +char buf3999[200]; +char buf4000[200]; +char buf4001[200]; +char buf4002[200]; +char buf4003[200]; +char buf4004[200]; +char buf4005[200]; +char buf4006[200]; +char buf4007[200]; +char buf4008[200]; +char buf4009[200]; +char buf4010[200]; +char buf4011[200]; +char buf4012[200]; +char buf4013[200]; +char buf4014[200]; +char buf4015[200]; +char buf4016[200]; +char buf4017[200]; +char buf4018[200]; +char buf4019[200]; +char buf4020[200]; +char buf4021[200]; +char buf4022[200]; +char buf4023[200]; +char buf4024[200]; +char buf4025[200]; +char buf4026[200]; +char buf4027[200]; +char buf4028[200]; +char buf4029[200]; +char buf4030[200]; +char buf4031[200]; +char buf4032[200]; +char buf4033[200]; +char buf4034[200]; +char buf4035[200]; +char buf4036[200]; +char buf4037[200]; +char buf4038[200]; +char buf4039[200]; +char buf4040[200]; +char buf4041[200]; +char buf4042[200]; +char buf4043[200]; +char buf4044[200]; +char buf4045[200]; +char buf4046[200]; + +void RS_KERNEL test(int in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clamp(*(char*)buf165, *(char*)buf166, *(char*)buf167); + *(char2*)buf168 = clamp(*(char2*)buf169, *(char2*)buf170, *(char2*)buf171); + *(char3*)buf172 = clamp(*(char3*)buf173, *(char3*)buf174, *(char3*)buf175); + *(char4*)buf176 = clamp(*(char4*)buf177, *(char4*)buf178, *(char4*)buf179); + *(uchar*)buf180 = clamp(*(uchar*)buf181, *(uchar*)buf182, *(uchar*)buf183); + *(uchar2*)buf184 = clamp(*(uchar2*)buf185, *(uchar2*)buf186, *(uchar2*)buf187); + *(uchar3*)buf188 = clamp(*(uchar3*)buf189, *(uchar3*)buf190, *(uchar3*)buf191); + *(uchar4*)buf192 = clamp(*(uchar4*)buf193, *(uchar4*)buf194, *(uchar4*)buf195); + *(short*)buf196 = clamp(*(short*)buf197, *(short*)buf198, *(short*)buf199); + *(short2*)buf200 = clamp(*(short2*)buf201, *(short2*)buf202, *(short2*)buf203); + *(short3*)buf204 = clamp(*(short3*)buf205, *(short3*)buf206, *(short3*)buf207); + *(short4*)buf208 = clamp(*(short4*)buf209, *(short4*)buf210, *(short4*)buf211); + *(ushort*)buf212 = clamp(*(ushort*)buf213, *(ushort*)buf214, *(ushort*)buf215); + *(ushort2*)buf216 = clamp(*(ushort2*)buf217, *(ushort2*)buf218, *(ushort2*)buf219); + *(ushort3*)buf220 = clamp(*(ushort3*)buf221, *(ushort3*)buf222, *(ushort3*)buf223); + *(ushort4*)buf224 = clamp(*(ushort4*)buf225, *(ushort4*)buf226, *(ushort4*)buf227); + *(int*)buf228 = clamp(*(int*)buf229, *(int*)buf230, *(int*)buf231); + *(int2*)buf232 = clamp(*(int2*)buf233, *(int2*)buf234, *(int2*)buf235); + *(int3*)buf236 = clamp(*(int3*)buf237, *(int3*)buf238, *(int3*)buf239); + *(int4*)buf240 = clamp(*(int4*)buf241, *(int4*)buf242, *(int4*)buf243); + *(uint*)buf244 = clamp(*(uint*)buf245, *(uint*)buf246, *(uint*)buf247); + *(uint2*)buf248 = clamp(*(uint2*)buf249, *(uint2*)buf250, *(uint2*)buf251); + *(uint3*)buf252 = clamp(*(uint3*)buf253, *(uint3*)buf254, *(uint3*)buf255); + *(uint4*)buf256 = clamp(*(uint4*)buf257, *(uint4*)buf258, *(uint4*)buf259); + *(long*)buf260 = clamp(*(long*)buf261, *(long*)buf262, *(long*)buf263); + *(long2*)buf264 = clamp(*(long2*)buf265, *(long2*)buf266, *(long2*)buf267); + *(long3*)buf268 = clamp(*(long3*)buf269, *(long3*)buf270, *(long3*)buf271); + *(long4*)buf272 = clamp(*(long4*)buf273, *(long4*)buf274, *(long4*)buf275); + *(ulong*)buf276 = clamp(*(ulong*)buf277, *(ulong*)buf278, *(ulong*)buf279); + *(ulong2*)buf280 = clamp(*(ulong2*)buf281, *(ulong2*)buf282, *(ulong2*)buf283); + *(ulong3*)buf284 = clamp(*(ulong3*)buf285, *(ulong3*)buf286, *(ulong3*)buf287); + *(ulong4*)buf288 = clamp(*(ulong4*)buf289, *(ulong4*)buf290, *(ulong4*)buf291); + *(char2*)buf292 = clamp(*(char2*)buf293, *(char*)buf294, *(char*)buf295); + *(char3*)buf296 = clamp(*(char3*)buf297, *(char*)buf298, *(char*)buf299); + *(char4*)buf300 = clamp(*(char4*)buf301, *(char*)buf302, *(char*)buf303); + *(uchar2*)buf304 = clamp(*(uchar2*)buf305, *(uchar*)buf306, *(uchar*)buf307); + *(uchar3*)buf308 = clamp(*(uchar3*)buf309, *(uchar*)buf310, *(uchar*)buf311); + *(uchar4*)buf312 = clamp(*(uchar4*)buf313, *(uchar*)buf314, *(uchar*)buf315); + *(short2*)buf316 = clamp(*(short2*)buf317, *(short*)buf318, *(short*)buf319); + *(short3*)buf320 = clamp(*(short3*)buf321, *(short*)buf322, *(short*)buf323); + *(short4*)buf324 = clamp(*(short4*)buf325, *(short*)buf326, *(short*)buf327); + *(ushort2*)buf328 = clamp(*(ushort2*)buf329, *(ushort*)buf330, *(ushort*)buf331); + *(ushort3*)buf332 = clamp(*(ushort3*)buf333, *(ushort*)buf334, *(ushort*)buf335); + *(ushort4*)buf336 = clamp(*(ushort4*)buf337, *(ushort*)buf338, *(ushort*)buf339); + *(int2*)buf340 = clamp(*(int2*)buf341, *(int*)buf342, *(int*)buf343); + *(int3*)buf344 = clamp(*(int3*)buf345, *(int*)buf346, *(int*)buf347); + *(int4*)buf348 = clamp(*(int4*)buf349, *(int*)buf350, *(int*)buf351); + *(uint2*)buf352 = clamp(*(uint2*)buf353, *(uint*)buf354, *(uint*)buf355); + *(uint3*)buf356 = clamp(*(uint3*)buf357, *(uint*)buf358, *(uint*)buf359); + *(uint4*)buf360 = clamp(*(uint4*)buf361, *(uint*)buf362, *(uint*)buf363); + *(long2*)buf364 = clamp(*(long2*)buf365, *(long*)buf366, *(long*)buf367); + *(long3*)buf368 = clamp(*(long3*)buf369, *(long*)buf370, *(long*)buf371); + *(long4*)buf372 = clamp(*(long4*)buf373, *(long*)buf374, *(long*)buf375); + *(ulong2*)buf376 = clamp(*(ulong2*)buf377, *(ulong*)buf378, *(ulong*)buf379); + *(ulong3*)buf380 = clamp(*(ulong3*)buf381, *(ulong*)buf382, *(ulong*)buf383); + *(ulong4*)buf384 = clamp(*(ulong4*)buf385, *(ulong*)buf386, *(ulong*)buf387); + *(char*)buf388 = clz(*(char*)buf389); + *(char2*)buf390 = clz(*(char2*)buf391); + *(char3*)buf392 = clz(*(char3*)buf393); + *(char4*)buf394 = clz(*(char4*)buf395); + *(uchar*)buf396 = clz(*(uchar*)buf397); + *(uchar2*)buf398 = clz(*(uchar2*)buf399); + *(uchar3*)buf400 = clz(*(uchar3*)buf401); + *(uchar4*)buf402 = clz(*(uchar4*)buf403); + *(short*)buf404 = clz(*(short*)buf405); + *(short2*)buf406 = clz(*(short2*)buf407); + *(short3*)buf408 = clz(*(short3*)buf409); + *(short4*)buf410 = clz(*(short4*)buf411); + *(ushort*)buf412 = clz(*(ushort*)buf413); + *(ushort2*)buf414 = clz(*(ushort2*)buf415); + *(ushort3*)buf416 = clz(*(ushort3*)buf417); + *(ushort4*)buf418 = clz(*(ushort4*)buf419); + *(int*)buf420 = clz(*(int*)buf421); + *(int2*)buf422 = clz(*(int2*)buf423); + *(int3*)buf424 = clz(*(int3*)buf425); + *(int4*)buf426 = clz(*(int4*)buf427); + *(uint*)buf428 = clz(*(uint*)buf429); + *(uint2*)buf430 = clz(*(uint2*)buf431); + *(uint3*)buf432 = clz(*(uint3*)buf433); + *(uint4*)buf434 = clz(*(uint4*)buf435); + *(float2*)buf436 = convert_float2(*(float2*)buf437); + *(float3*)buf438 = convert_float3(*(float3*)buf439); + *(float4*)buf440 = convert_float4(*(float4*)buf441); + *(float2*)buf442 = convert_float2(*(char2*)buf443); + *(float3*)buf444 = convert_float3(*(char3*)buf445); + *(float4*)buf446 = convert_float4(*(char4*)buf447); + *(float2*)buf448 = convert_float2(*(uchar2*)buf449); + *(float3*)buf450 = convert_float3(*(uchar3*)buf451); + *(float4*)buf452 = convert_float4(*(uchar4*)buf453); + *(float2*)buf454 = convert_float2(*(short2*)buf455); + *(float3*)buf456 = convert_float3(*(short3*)buf457); + *(float4*)buf458 = convert_float4(*(short4*)buf459); + *(float2*)buf460 = convert_float2(*(ushort2*)buf461); + *(float3*)buf462 = convert_float3(*(ushort3*)buf463); + *(float4*)buf464 = convert_float4(*(ushort4*)buf465); + *(float2*)buf466 = convert_float2(*(int2*)buf467); + *(float3*)buf468 = convert_float3(*(int3*)buf469); + *(float4*)buf470 = convert_float4(*(int4*)buf471); + *(float2*)buf472 = convert_float2(*(uint2*)buf473); + *(float3*)buf474 = convert_float3(*(uint3*)buf475); + *(float4*)buf476 = convert_float4(*(uint4*)buf477); + *(char2*)buf478 = convert_char2(*(float2*)buf479); + *(char3*)buf480 = convert_char3(*(float3*)buf481); + *(char4*)buf482 = convert_char4(*(float4*)buf483); + *(char2*)buf484 = convert_char2(*(char2*)buf485); + *(char3*)buf486 = convert_char3(*(char3*)buf487); + *(char4*)buf488 = convert_char4(*(char4*)buf489); + *(char2*)buf490 = convert_char2(*(uchar2*)buf491); + *(char3*)buf492 = convert_char3(*(uchar3*)buf493); + *(char4*)buf494 = convert_char4(*(uchar4*)buf495); + *(char2*)buf496 = convert_char2(*(short2*)buf497); + *(char3*)buf498 = convert_char3(*(short3*)buf499); + *(char4*)buf500 = convert_char4(*(short4*)buf501); + *(char2*)buf502 = convert_char2(*(ushort2*)buf503); + *(char3*)buf504 = convert_char3(*(ushort3*)buf505); + *(char4*)buf506 = convert_char4(*(ushort4*)buf507); + *(char2*)buf508 = convert_char2(*(int2*)buf509); + *(char3*)buf510 = convert_char3(*(int3*)buf511); + *(char4*)buf512 = convert_char4(*(int4*)buf513); + *(char2*)buf514 = convert_char2(*(uint2*)buf515); + *(char3*)buf516 = convert_char3(*(uint3*)buf517); + *(char4*)buf518 = convert_char4(*(uint4*)buf519); + *(uchar2*)buf520 = convert_uchar2(*(float2*)buf521); + *(uchar3*)buf522 = convert_uchar3(*(float3*)buf523); + *(uchar4*)buf524 = convert_uchar4(*(float4*)buf525); + *(uchar2*)buf526 = convert_uchar2(*(char2*)buf527); + *(uchar3*)buf528 = convert_uchar3(*(char3*)buf529); + *(uchar4*)buf530 = convert_uchar4(*(char4*)buf531); + *(uchar2*)buf532 = convert_uchar2(*(uchar2*)buf533); + *(uchar3*)buf534 = convert_uchar3(*(uchar3*)buf535); + *(uchar4*)buf536 = convert_uchar4(*(uchar4*)buf537); + *(uchar2*)buf538 = convert_uchar2(*(short2*)buf539); + *(uchar3*)buf540 = convert_uchar3(*(short3*)buf541); + *(uchar4*)buf542 = convert_uchar4(*(short4*)buf543); + *(uchar2*)buf544 = convert_uchar2(*(ushort2*)buf545); + *(uchar3*)buf546 = convert_uchar3(*(ushort3*)buf547); + *(uchar4*)buf548 = convert_uchar4(*(ushort4*)buf549); + *(uchar2*)buf550 = convert_uchar2(*(int2*)buf551); + *(uchar3*)buf552 = convert_uchar3(*(int3*)buf553); + *(uchar4*)buf554 = convert_uchar4(*(int4*)buf555); + *(uchar2*)buf556 = convert_uchar2(*(uint2*)buf557); + *(uchar3*)buf558 = convert_uchar3(*(uint3*)buf559); + *(uchar4*)buf560 = convert_uchar4(*(uint4*)buf561); + *(short2*)buf562 = convert_short2(*(float2*)buf563); + *(short3*)buf564 = convert_short3(*(float3*)buf565); + *(short4*)buf566 = convert_short4(*(float4*)buf567); + *(short2*)buf568 = convert_short2(*(char2*)buf569); + *(short3*)buf570 = convert_short3(*(char3*)buf571); + *(short4*)buf572 = convert_short4(*(char4*)buf573); + *(short2*)buf574 = convert_short2(*(uchar2*)buf575); + *(short3*)buf576 = convert_short3(*(uchar3*)buf577); + *(short4*)buf578 = convert_short4(*(uchar4*)buf579); + *(short2*)buf580 = convert_short2(*(short2*)buf581); + *(short3*)buf582 = convert_short3(*(short3*)buf583); + *(short4*)buf584 = convert_short4(*(short4*)buf585); + *(short2*)buf586 = convert_short2(*(ushort2*)buf587); + *(short3*)buf588 = convert_short3(*(ushort3*)buf589); + *(short4*)buf590 = convert_short4(*(ushort4*)buf591); + *(short2*)buf592 = convert_short2(*(int2*)buf593); + *(short3*)buf594 = convert_short3(*(int3*)buf595); + *(short4*)buf596 = convert_short4(*(int4*)buf597); + *(short2*)buf598 = convert_short2(*(uint2*)buf599); + *(short3*)buf600 = convert_short3(*(uint3*)buf601); + *(short4*)buf602 = convert_short4(*(uint4*)buf603); + *(ushort2*)buf604 = convert_ushort2(*(float2*)buf605); + *(ushort3*)buf606 = convert_ushort3(*(float3*)buf607); + *(ushort4*)buf608 = convert_ushort4(*(float4*)buf609); + *(ushort2*)buf610 = convert_ushort2(*(char2*)buf611); + *(ushort3*)buf612 = convert_ushort3(*(char3*)buf613); + *(ushort4*)buf614 = convert_ushort4(*(char4*)buf615); + *(ushort2*)buf616 = convert_ushort2(*(uchar2*)buf617); + *(ushort3*)buf618 = convert_ushort3(*(uchar3*)buf619); + *(ushort4*)buf620 = convert_ushort4(*(uchar4*)buf621); + *(ushort2*)buf622 = convert_ushort2(*(short2*)buf623); + *(ushort3*)buf624 = convert_ushort3(*(short3*)buf625); + *(ushort4*)buf626 = convert_ushort4(*(short4*)buf627); + *(ushort2*)buf628 = convert_ushort2(*(ushort2*)buf629); + *(ushort3*)buf630 = convert_ushort3(*(ushort3*)buf631); + *(ushort4*)buf632 = convert_ushort4(*(ushort4*)buf633); + *(ushort2*)buf634 = convert_ushort2(*(int2*)buf635); + *(ushort3*)buf636 = convert_ushort3(*(int3*)buf637); + *(ushort4*)buf638 = convert_ushort4(*(int4*)buf639); + *(ushort2*)buf640 = convert_ushort2(*(uint2*)buf641); + *(ushort3*)buf642 = convert_ushort3(*(uint3*)buf643); + *(ushort4*)buf644 = convert_ushort4(*(uint4*)buf645); + *(int2*)buf646 = convert_int2(*(float2*)buf647); + *(int3*)buf648 = convert_int3(*(float3*)buf649); + *(int4*)buf650 = convert_int4(*(float4*)buf651); + *(int2*)buf652 = convert_int2(*(char2*)buf653); + *(int3*)buf654 = convert_int3(*(char3*)buf655); + *(int4*)buf656 = convert_int4(*(char4*)buf657); + *(int2*)buf658 = convert_int2(*(uchar2*)buf659); + *(int3*)buf660 = convert_int3(*(uchar3*)buf661); + *(int4*)buf662 = convert_int4(*(uchar4*)buf663); + *(int2*)buf664 = convert_int2(*(short2*)buf665); + *(int3*)buf666 = convert_int3(*(short3*)buf667); + *(int4*)buf668 = convert_int4(*(short4*)buf669); + *(int2*)buf670 = convert_int2(*(ushort2*)buf671); + *(int3*)buf672 = convert_int3(*(ushort3*)buf673); + *(int4*)buf674 = convert_int4(*(ushort4*)buf675); + *(int2*)buf676 = convert_int2(*(int2*)buf677); + *(int3*)buf678 = convert_int3(*(int3*)buf679); + *(int4*)buf680 = convert_int4(*(int4*)buf681); + *(int2*)buf682 = convert_int2(*(uint2*)buf683); + *(int3*)buf684 = convert_int3(*(uint3*)buf685); + *(int4*)buf686 = convert_int4(*(uint4*)buf687); + *(uint2*)buf688 = convert_uint2(*(float2*)buf689); + *(uint3*)buf690 = convert_uint3(*(float3*)buf691); + *(uint4*)buf692 = convert_uint4(*(float4*)buf693); + *(uint2*)buf694 = convert_uint2(*(char2*)buf695); + *(uint3*)buf696 = convert_uint3(*(char3*)buf697); + *(uint4*)buf698 = convert_uint4(*(char4*)buf699); + *(uint2*)buf700 = convert_uint2(*(uchar2*)buf701); + *(uint3*)buf702 = convert_uint3(*(uchar3*)buf703); + *(uint4*)buf704 = convert_uint4(*(uchar4*)buf705); + *(uint2*)buf706 = convert_uint2(*(short2*)buf707); + *(uint3*)buf708 = convert_uint3(*(short3*)buf709); + *(uint4*)buf710 = convert_uint4(*(short4*)buf711); + *(uint2*)buf712 = convert_uint2(*(ushort2*)buf713); + *(uint3*)buf714 = convert_uint3(*(ushort3*)buf715); + *(uint4*)buf716 = convert_uint4(*(ushort4*)buf717); + *(uint2*)buf718 = convert_uint2(*(int2*)buf719); + *(uint3*)buf720 = convert_uint3(*(int3*)buf721); + *(uint4*)buf722 = convert_uint4(*(int4*)buf723); + *(uint2*)buf724 = convert_uint2(*(uint2*)buf725); + *(uint3*)buf726 = convert_uint3(*(uint3*)buf727); + *(uint4*)buf728 = convert_uint4(*(uint4*)buf729); + *(double2*)buf730 = convert_double2(*(double2*)buf731); + *(double3*)buf732 = convert_double3(*(double3*)buf733); + *(double4*)buf734 = convert_double4(*(double4*)buf735); + *(double2*)buf736 = convert_double2(*(long2*)buf737); + *(double3*)buf738 = convert_double3(*(long3*)buf739); + *(double4*)buf740 = convert_double4(*(long4*)buf741); + *(double2*)buf742 = convert_double2(*(ulong2*)buf743); + *(double3*)buf744 = convert_double3(*(ulong3*)buf745); + *(double4*)buf746 = convert_double4(*(ulong4*)buf747); + *(long2*)buf748 = convert_long2(*(double2*)buf749); + *(long3*)buf750 = convert_long3(*(double3*)buf751); + *(long4*)buf752 = convert_long4(*(double4*)buf753); + *(long2*)buf754 = convert_long2(*(long2*)buf755); + *(long3*)buf756 = convert_long3(*(long3*)buf757); + *(long4*)buf758 = convert_long4(*(long4*)buf759); + *(long2*)buf760 = convert_long2(*(ulong2*)buf761); + *(long3*)buf762 = convert_long3(*(ulong3*)buf763); + *(long4*)buf764 = convert_long4(*(ulong4*)buf765); + *(ulong2*)buf766 = convert_ulong2(*(double2*)buf767); + *(ulong3*)buf768 = convert_ulong3(*(double3*)buf769); + *(ulong4*)buf770 = convert_ulong4(*(double4*)buf771); + *(ulong2*)buf772 = convert_ulong2(*(long2*)buf773); + *(ulong3*)buf774 = convert_ulong3(*(long3*)buf775); + *(ulong4*)buf776 = convert_ulong4(*(long4*)buf777); + *(ulong2*)buf778 = convert_ulong2(*(ulong2*)buf779); + *(ulong3*)buf780 = convert_ulong3(*(ulong3*)buf781); + *(ulong4*)buf782 = convert_ulong4(*(ulong4*)buf783); + *(float2*)buf784 = convert_float2(*(double2*)buf785); + *(float3*)buf786 = convert_float3(*(double3*)buf787); + *(float4*)buf788 = convert_float4(*(double4*)buf789); + *(float2*)buf790 = convert_float2(*(long2*)buf791); + *(float3*)buf792 = convert_float3(*(long3*)buf793); + *(float4*)buf794 = convert_float4(*(long4*)buf795); + *(float2*)buf796 = convert_float2(*(ulong2*)buf797); + *(float3*)buf798 = convert_float3(*(ulong3*)buf799); + *(float4*)buf800 = convert_float4(*(ulong4*)buf801); + *(char2*)buf802 = convert_char2(*(double2*)buf803); + *(char3*)buf804 = convert_char3(*(double3*)buf805); + *(char4*)buf806 = convert_char4(*(double4*)buf807); + *(char2*)buf808 = convert_char2(*(long2*)buf809); + *(char3*)buf810 = convert_char3(*(long3*)buf811); + *(char4*)buf812 = convert_char4(*(long4*)buf813); + *(char2*)buf814 = convert_char2(*(ulong2*)buf815); + *(char3*)buf816 = convert_char3(*(ulong3*)buf817); + *(char4*)buf818 = convert_char4(*(ulong4*)buf819); + *(uchar2*)buf820 = convert_uchar2(*(double2*)buf821); + *(uchar3*)buf822 = convert_uchar3(*(double3*)buf823); + *(uchar4*)buf824 = convert_uchar4(*(double4*)buf825); + *(uchar2*)buf826 = convert_uchar2(*(long2*)buf827); + *(uchar3*)buf828 = convert_uchar3(*(long3*)buf829); + *(uchar4*)buf830 = convert_uchar4(*(long4*)buf831); + *(uchar2*)buf832 = convert_uchar2(*(ulong2*)buf833); + *(uchar3*)buf834 = convert_uchar3(*(ulong3*)buf835); + *(uchar4*)buf836 = convert_uchar4(*(ulong4*)buf837); + *(short2*)buf838 = convert_short2(*(double2*)buf839); + *(short3*)buf840 = convert_short3(*(double3*)buf841); + *(short4*)buf842 = convert_short4(*(double4*)buf843); + *(short2*)buf844 = convert_short2(*(long2*)buf845); + *(short3*)buf846 = convert_short3(*(long3*)buf847); + *(short4*)buf848 = convert_short4(*(long4*)buf849); + *(short2*)buf850 = convert_short2(*(ulong2*)buf851); + *(short3*)buf852 = convert_short3(*(ulong3*)buf853); + *(short4*)buf854 = convert_short4(*(ulong4*)buf855); + *(ushort2*)buf856 = convert_ushort2(*(double2*)buf857); + *(ushort3*)buf858 = convert_ushort3(*(double3*)buf859); + *(ushort4*)buf860 = convert_ushort4(*(double4*)buf861); + *(ushort2*)buf862 = convert_ushort2(*(long2*)buf863); + *(ushort3*)buf864 = convert_ushort3(*(long3*)buf865); + *(ushort4*)buf866 = convert_ushort4(*(long4*)buf867); + *(ushort2*)buf868 = convert_ushort2(*(ulong2*)buf869); + *(ushort3*)buf870 = convert_ushort3(*(ulong3*)buf871); + *(ushort4*)buf872 = convert_ushort4(*(ulong4*)buf873); + *(int2*)buf874 = convert_int2(*(double2*)buf875); + *(int3*)buf876 = convert_int3(*(double3*)buf877); + *(int4*)buf878 = convert_int4(*(double4*)buf879); + *(int2*)buf880 = convert_int2(*(long2*)buf881); + *(int3*)buf882 = convert_int3(*(long3*)buf883); + *(int4*)buf884 = convert_int4(*(long4*)buf885); + *(int2*)buf886 = convert_int2(*(ulong2*)buf887); + *(int3*)buf888 = convert_int3(*(ulong3*)buf889); + *(int4*)buf890 = convert_int4(*(ulong4*)buf891); + *(uint2*)buf892 = convert_uint2(*(double2*)buf893); + *(uint3*)buf894 = convert_uint3(*(double3*)buf895); + *(uint4*)buf896 = convert_uint4(*(double4*)buf897); + *(uint2*)buf898 = convert_uint2(*(long2*)buf899); + *(uint3*)buf900 = convert_uint3(*(long3*)buf901); + *(uint4*)buf902 = convert_uint4(*(long4*)buf903); + *(uint2*)buf904 = convert_uint2(*(ulong2*)buf905); + *(uint3*)buf906 = convert_uint3(*(ulong3*)buf907); + *(uint4*)buf908 = convert_uint4(*(ulong4*)buf909); + *(double2*)buf910 = convert_double2(*(float2*)buf911); + *(double3*)buf912 = convert_double3(*(float3*)buf913); + *(double4*)buf914 = convert_double4(*(float4*)buf915); + *(double2*)buf916 = convert_double2(*(char2*)buf917); + *(double3*)buf918 = convert_double3(*(char3*)buf919); + *(double4*)buf920 = convert_double4(*(char4*)buf921); + *(double2*)buf922 = convert_double2(*(uchar2*)buf923); + *(double3*)buf924 = convert_double3(*(uchar3*)buf925); + *(double4*)buf926 = convert_double4(*(uchar4*)buf927); + *(double2*)buf928 = convert_double2(*(short2*)buf929); + *(double3*)buf930 = convert_double3(*(short3*)buf931); + *(double4*)buf932 = convert_double4(*(short4*)buf933); + *(double2*)buf934 = convert_double2(*(ushort2*)buf935); + *(double3*)buf936 = convert_double3(*(ushort3*)buf937); + *(double4*)buf938 = convert_double4(*(ushort4*)buf939); + *(double2*)buf940 = convert_double2(*(int2*)buf941); + *(double3*)buf942 = convert_double3(*(int3*)buf943); + *(double4*)buf944 = convert_double4(*(int4*)buf945); + *(double2*)buf946 = convert_double2(*(uint2*)buf947); + *(double3*)buf948 = convert_double3(*(uint3*)buf949); + *(double4*)buf950 = convert_double4(*(uint4*)buf951); + *(long2*)buf952 = convert_long2(*(float2*)buf953); + *(long3*)buf954 = convert_long3(*(float3*)buf955); + *(long4*)buf956 = convert_long4(*(float4*)buf957); + *(long2*)buf958 = convert_long2(*(char2*)buf959); + *(long3*)buf960 = convert_long3(*(char3*)buf961); + *(long4*)buf962 = convert_long4(*(char4*)buf963); + *(long2*)buf964 = convert_long2(*(uchar2*)buf965); + *(long3*)buf966 = convert_long3(*(uchar3*)buf967); + *(long4*)buf968 = convert_long4(*(uchar4*)buf969); + *(long2*)buf970 = convert_long2(*(short2*)buf971); + *(long3*)buf972 = convert_long3(*(short3*)buf973); + *(long4*)buf974 = convert_long4(*(short4*)buf975); + *(long2*)buf976 = convert_long2(*(ushort2*)buf977); + *(long3*)buf978 = convert_long3(*(ushort3*)buf979); + *(long4*)buf980 = convert_long4(*(ushort4*)buf981); + *(long2*)buf982 = convert_long2(*(int2*)buf983); + *(long3*)buf984 = convert_long3(*(int3*)buf985); + *(long4*)buf986 = convert_long4(*(int4*)buf987); + *(long2*)buf988 = convert_long2(*(uint2*)buf989); + *(long3*)buf990 = convert_long3(*(uint3*)buf991); + *(long4*)buf992 = convert_long4(*(uint4*)buf993); + *(ulong2*)buf994 = convert_ulong2(*(float2*)buf995); + *(ulong3*)buf996 = convert_ulong3(*(float3*)buf997); + *(ulong4*)buf998 = convert_ulong4(*(float4*)buf999); + *(ulong2*)buf1000 = convert_ulong2(*(char2*)buf1001); + *(ulong3*)buf1002 = convert_ulong3(*(char3*)buf1003); + *(ulong4*)buf1004 = convert_ulong4(*(char4*)buf1005); + *(ulong2*)buf1006 = convert_ulong2(*(uchar2*)buf1007); + *(ulong3*)buf1008 = convert_ulong3(*(uchar3*)buf1009); + *(ulong4*)buf1010 = convert_ulong4(*(uchar4*)buf1011); + *(ulong2*)buf1012 = convert_ulong2(*(short2*)buf1013); + *(ulong3*)buf1014 = convert_ulong3(*(short3*)buf1015); + *(ulong4*)buf1016 = convert_ulong4(*(short4*)buf1017); + *(ulong2*)buf1018 = convert_ulong2(*(ushort2*)buf1019); + *(ulong3*)buf1020 = convert_ulong3(*(ushort3*)buf1021); + *(ulong4*)buf1022 = convert_ulong4(*(ushort4*)buf1023); + *(ulong2*)buf1024 = convert_ulong2(*(int2*)buf1025); + *(ulong3*)buf1026 = convert_ulong3(*(int3*)buf1027); + *(ulong4*)buf1028 = convert_ulong4(*(int4*)buf1029); + *(ulong2*)buf1030 = convert_ulong2(*(uint2*)buf1031); + *(ulong3*)buf1032 = convert_ulong3(*(uint3*)buf1033); + *(ulong4*)buf1034 = convert_ulong4(*(uint4*)buf1035); + *(float*)buf1036 = copysign(*(float*)buf1037, *(float*)buf1038); + *(float2*)buf1039 = copysign(*(float2*)buf1040, *(float2*)buf1041); + *(float3*)buf1042 = copysign(*(float3*)buf1043, *(float3*)buf1044); + *(float4*)buf1045 = copysign(*(float4*)buf1046, *(float4*)buf1047); + *(float*)buf1048 = cos(*(float*)buf1049); + *(float2*)buf1050 = cos(*(float2*)buf1051); + *(float3*)buf1052 = cos(*(float3*)buf1053); + *(float4*)buf1054 = cos(*(float4*)buf1055); + *(float*)buf1056 = cosh(*(float*)buf1057); + *(float2*)buf1058 = cosh(*(float2*)buf1059); + *(float3*)buf1060 = cosh(*(float3*)buf1061); + *(float4*)buf1062 = cosh(*(float4*)buf1063); + *(float*)buf1064 = cospi(*(float*)buf1065); + *(float2*)buf1066 = cospi(*(float2*)buf1067); + *(float3*)buf1068 = cospi(*(float3*)buf1069); + *(float4*)buf1070 = cospi(*(float4*)buf1071); + *(float3*)buf1072 = cross(*(float3*)buf1073, *(float3*)buf1074); + *(float4*)buf1075 = cross(*(float4*)buf1076, *(float4*)buf1077); + *(float*)buf1078 = degrees(*(float*)buf1079); + *(float2*)buf1080 = degrees(*(float2*)buf1081); + *(float3*)buf1082 = degrees(*(float3*)buf1083); + *(float4*)buf1084 = degrees(*(float4*)buf1085); + *(float*)buf1086 = distance(*(float*)buf1087, *(float*)buf1088); + *(float*)buf1089 = distance(*(float2*)buf1090, *(float2*)buf1091); + *(float*)buf1092 = distance(*(float3*)buf1093, *(float3*)buf1094); + *(float*)buf1095 = distance(*(float4*)buf1096, *(float4*)buf1097); + *(float*)buf1098 = dot(*(float*)buf1099, *(float*)buf1100); + *(float*)buf1101 = dot(*(float2*)buf1102, *(float2*)buf1103); + *(float*)buf1104 = dot(*(float3*)buf1105, *(float3*)buf1106); + *(float*)buf1107 = dot(*(float4*)buf1108, *(float4*)buf1109); + *(float*)buf1110 = erf(*(float*)buf1111); + *(float2*)buf1112 = erf(*(float2*)buf1113); + *(float3*)buf1114 = erf(*(float3*)buf1115); + *(float4*)buf1116 = erf(*(float4*)buf1117); + *(float*)buf1118 = erfc(*(float*)buf1119); + *(float2*)buf1120 = erfc(*(float2*)buf1121); + *(float3*)buf1122 = erfc(*(float3*)buf1123); + *(float4*)buf1124 = erfc(*(float4*)buf1125); + *(float*)buf1126 = exp(*(float*)buf1127); + *(float2*)buf1128 = exp(*(float2*)buf1129); + *(float3*)buf1130 = exp(*(float3*)buf1131); + *(float4*)buf1132 = exp(*(float4*)buf1133); + *(float*)buf1134 = exp10(*(float*)buf1135); + *(float2*)buf1136 = exp10(*(float2*)buf1137); + *(float3*)buf1138 = exp10(*(float3*)buf1139); + *(float4*)buf1140 = exp10(*(float4*)buf1141); + *(float*)buf1142 = exp2(*(float*)buf1143); + *(float2*)buf1144 = exp2(*(float2*)buf1145); + *(float3*)buf1146 = exp2(*(float3*)buf1147); + *(float4*)buf1148 = exp2(*(float4*)buf1149); + *(float*)buf1150 = expm1(*(float*)buf1151); + *(float2*)buf1152 = expm1(*(float2*)buf1153); + *(float3*)buf1154 = expm1(*(float3*)buf1155); + *(float4*)buf1156 = expm1(*(float4*)buf1157); + *(float*)buf1158 = fabs(*(float*)buf1159); + *(float2*)buf1160 = fabs(*(float2*)buf1161); + *(float3*)buf1162 = fabs(*(float3*)buf1163); + *(float4*)buf1164 = fabs(*(float4*)buf1165); + *(float*)buf1166 = fast_distance(*(float*)buf1167, *(float*)buf1168); + *(float*)buf1169 = fast_distance(*(float2*)buf1170, *(float2*)buf1171); + *(float*)buf1172 = fast_distance(*(float3*)buf1173, *(float3*)buf1174); + *(float*)buf1175 = fast_distance(*(float4*)buf1176, *(float4*)buf1177); + *(float*)buf1178 = fast_length(*(float*)buf1179); + *(float*)buf1180 = fast_length(*(float2*)buf1181); + *(float*)buf1182 = fast_length(*(float3*)buf1183); + *(float*)buf1184 = fast_length(*(float4*)buf1185); + *(float*)buf1186 = fast_normalize(*(float*)buf1187); + *(float2*)buf1188 = fast_normalize(*(float2*)buf1189); + *(float3*)buf1190 = fast_normalize(*(float3*)buf1191); + *(float4*)buf1192 = fast_normalize(*(float4*)buf1193); + *(float*)buf1194 = fdim(*(float*)buf1195, *(float*)buf1196); + *(float2*)buf1197 = fdim(*(float2*)buf1198, *(float2*)buf1199); + *(float3*)buf1200 = fdim(*(float3*)buf1201, *(float3*)buf1202); + *(float4*)buf1203 = fdim(*(float4*)buf1204, *(float4*)buf1205); + *(float*)buf1206 = floor(*(float*)buf1207); + *(float2*)buf1208 = floor(*(float2*)buf1209); + *(float3*)buf1210 = floor(*(float3*)buf1211); + *(float4*)buf1212 = floor(*(float4*)buf1213); + *(float*)buf1214 = fma(*(float*)buf1215, *(float*)buf1216, *(float*)buf1217); + *(float2*)buf1218 = fma(*(float2*)buf1219, *(float2*)buf1220, *(float2*)buf1221); + *(float3*)buf1222 = fma(*(float3*)buf1223, *(float3*)buf1224, *(float3*)buf1225); + *(float4*)buf1226 = fma(*(float4*)buf1227, *(float4*)buf1228, *(float4*)buf1229); + *(float*)buf1230 = fmax(*(float*)buf1231, *(float*)buf1232); + *(float2*)buf1233 = fmax(*(float2*)buf1234, *(float2*)buf1235); + *(float3*)buf1236 = fmax(*(float3*)buf1237, *(float3*)buf1238); + *(float4*)buf1239 = fmax(*(float4*)buf1240, *(float4*)buf1241); + *(float2*)buf1242 = fmax(*(float2*)buf1243, *(float*)buf1244); + *(float3*)buf1245 = fmax(*(float3*)buf1246, *(float*)buf1247); + *(float4*)buf1248 = fmax(*(float4*)buf1249, *(float*)buf1250); + *(float*)buf1251 = fmin(*(float*)buf1252, *(float*)buf1253); + *(float2*)buf1254 = fmin(*(float2*)buf1255, *(float2*)buf1256); + *(float3*)buf1257 = fmin(*(float3*)buf1258, *(float3*)buf1259); + *(float4*)buf1260 = fmin(*(float4*)buf1261, *(float4*)buf1262); + *(float2*)buf1263 = fmin(*(float2*)buf1264, *(float*)buf1265); + *(float3*)buf1266 = fmin(*(float3*)buf1267, *(float*)buf1268); + *(float4*)buf1269 = fmin(*(float4*)buf1270, *(float*)buf1271); + *(float*)buf1272 = fmod(*(float*)buf1273, *(float*)buf1274); + *(float2*)buf1275 = fmod(*(float2*)buf1276, *(float2*)buf1277); + *(float3*)buf1278 = fmod(*(float3*)buf1279, *(float3*)buf1280); + *(float4*)buf1281 = fmod(*(float4*)buf1282, *(float4*)buf1283); + *(float*)buf1284 = fract(*(float*)buf1285, (float*) buf1286); + *(float2*)buf1287 = fract(*(float2*)buf1288, (float2*) buf1289); + *(float3*)buf1290 = fract(*(float3*)buf1291, (float3*) buf1292); + *(float4*)buf1293 = fract(*(float4*)buf1294, (float4*) buf1295); + *(float*)buf1296 = fract(*(float*)buf1297); + *(float2*)buf1298 = fract(*(float2*)buf1299); + *(float3*)buf1300 = fract(*(float3*)buf1301); + *(float4*)buf1302 = fract(*(float4*)buf1303); + *(float*)buf1304 = frexp(*(float*)buf1305, (int*) buf1306); + *(float2*)buf1307 = frexp(*(float2*)buf1308, (int2*) buf1309); + *(float3*)buf1310 = frexp(*(float3*)buf1311, (int3*) buf1312); + *(float4*)buf1313 = frexp(*(float4*)buf1314, (int4*) buf1315); + *(float*)buf1316 = half_recip(*(float*)buf1317); + *(float2*)buf1318 = half_recip(*(float2*)buf1319); + *(float3*)buf1320 = half_recip(*(float3*)buf1321); + *(float4*)buf1322 = half_recip(*(float4*)buf1323); + *(float*)buf1324 = half_rsqrt(*(float*)buf1325); + *(float2*)buf1326 = half_rsqrt(*(float2*)buf1327); + *(float3*)buf1328 = half_rsqrt(*(float3*)buf1329); + *(float4*)buf1330 = half_rsqrt(*(float4*)buf1331); + *(float*)buf1332 = half_sqrt(*(float*)buf1333); + *(float2*)buf1334 = half_sqrt(*(float2*)buf1335); + *(float3*)buf1336 = half_sqrt(*(float3*)buf1337); + *(float4*)buf1338 = half_sqrt(*(float4*)buf1339); + *(float*)buf1340 = hypot(*(float*)buf1341, *(float*)buf1342); + *(float2*)buf1343 = hypot(*(float2*)buf1344, *(float2*)buf1345); + *(float3*)buf1346 = hypot(*(float3*)buf1347, *(float3*)buf1348); + *(float4*)buf1349 = hypot(*(float4*)buf1350, *(float4*)buf1351); + *(int*)buf1352 = ilogb(*(float*)buf1353); + *(int2*)buf1354 = ilogb(*(float2*)buf1355); + *(int3*)buf1356 = ilogb(*(float3*)buf1357); + *(int4*)buf1358 = ilogb(*(float4*)buf1359); + *(float*)buf1360 = ldexp(*(float*)buf1361, *(int*)buf1362); + *(float2*)buf1363 = ldexp(*(float2*)buf1364, *(int2*)buf1365); + *(float3*)buf1366 = ldexp(*(float3*)buf1367, *(int3*)buf1368); + *(float4*)buf1369 = ldexp(*(float4*)buf1370, *(int4*)buf1371); + *(float2*)buf1372 = ldexp(*(float2*)buf1373, *(int*)buf1374); + *(float3*)buf1375 = ldexp(*(float3*)buf1376, *(int*)buf1377); + *(float4*)buf1378 = ldexp(*(float4*)buf1379, *(int*)buf1380); + *(float*)buf1381 = length(*(float*)buf1382); + *(float*)buf1383 = length(*(float2*)buf1384); + *(float*)buf1385 = length(*(float3*)buf1386); + *(float*)buf1387 = length(*(float4*)buf1388); + *(float*)buf1389 = lgamma(*(float*)buf1390); + *(float2*)buf1391 = lgamma(*(float2*)buf1392); + *(float3*)buf1393 = lgamma(*(float3*)buf1394); + *(float4*)buf1395 = lgamma(*(float4*)buf1396); + *(float*)buf1397 = lgamma(*(float*)buf1398, (int*) buf1399); + *(float2*)buf1400 = lgamma(*(float2*)buf1401, (int2*) buf1402); + *(float3*)buf1403 = lgamma(*(float3*)buf1404, (int3*) buf1405); + *(float4*)buf1406 = lgamma(*(float4*)buf1407, (int4*) buf1408); + *(float*)buf1409 = log(*(float*)buf1410); + *(float2*)buf1411 = log(*(float2*)buf1412); + *(float3*)buf1413 = log(*(float3*)buf1414); + *(float4*)buf1415 = log(*(float4*)buf1416); + *(float*)buf1417 = log10(*(float*)buf1418); + *(float2*)buf1419 = log10(*(float2*)buf1420); + *(float3*)buf1421 = log10(*(float3*)buf1422); + *(float4*)buf1423 = log10(*(float4*)buf1424); + *(float*)buf1425 = log1p(*(float*)buf1426); + *(float2*)buf1427 = log1p(*(float2*)buf1428); + *(float3*)buf1429 = log1p(*(float3*)buf1430); + *(float4*)buf1431 = log1p(*(float4*)buf1432); + *(float*)buf1433 = log2(*(float*)buf1434); + *(float2*)buf1435 = log2(*(float2*)buf1436); + *(float3*)buf1437 = log2(*(float3*)buf1438); + *(float4*)buf1439 = log2(*(float4*)buf1440); + *(float*)buf1441 = logb(*(float*)buf1442); + *(float2*)buf1443 = logb(*(float2*)buf1444); + *(float3*)buf1445 = logb(*(float3*)buf1446); + *(float4*)buf1447 = logb(*(float4*)buf1448); + *(float*)buf1449 = mad(*(float*)buf1450, *(float*)buf1451, *(float*)buf1452); + *(float2*)buf1453 = mad(*(float2*)buf1454, *(float2*)buf1455, *(float2*)buf1456); + *(float3*)buf1457 = mad(*(float3*)buf1458, *(float3*)buf1459, *(float3*)buf1460); + *(float4*)buf1461 = mad(*(float4*)buf1462, *(float4*)buf1463, *(float4*)buf1464); + *(float*)buf1465 = max(*(float*)buf1466, *(float*)buf1467); + *(float2*)buf1468 = max(*(float2*)buf1469, *(float2*)buf1470); + *(float3*)buf1471 = max(*(float3*)buf1472, *(float3*)buf1473); + *(float4*)buf1474 = max(*(float4*)buf1475, *(float4*)buf1476); + *(float2*)buf1477 = max(*(float2*)buf1478, *(float*)buf1479); + *(float3*)buf1480 = max(*(float3*)buf1481, *(float*)buf1482); + *(float4*)buf1483 = max(*(float4*)buf1484, *(float*)buf1485); + *(char*)buf1486 = max(*(char*)buf1487, *(char*)buf1488); + *(char2*)buf1489 = max(*(char2*)buf1490, *(char2*)buf1491); + *(char3*)buf1492 = max(*(char3*)buf1493, *(char3*)buf1494); + *(char4*)buf1495 = max(*(char4*)buf1496, *(char4*)buf1497); + *(uchar*)buf1498 = max(*(uchar*)buf1499, *(uchar*)buf1500); + *(uchar2*)buf1501 = max(*(uchar2*)buf1502, *(uchar2*)buf1503); + *(uchar3*)buf1504 = max(*(uchar3*)buf1505, *(uchar3*)buf1506); + *(uchar4*)buf1507 = max(*(uchar4*)buf1508, *(uchar4*)buf1509); + *(short*)buf1510 = max(*(short*)buf1511, *(short*)buf1512); + *(short2*)buf1513 = max(*(short2*)buf1514, *(short2*)buf1515); + *(short3*)buf1516 = max(*(short3*)buf1517, *(short3*)buf1518); + *(short4*)buf1519 = max(*(short4*)buf1520, *(short4*)buf1521); + *(ushort*)buf1522 = max(*(ushort*)buf1523, *(ushort*)buf1524); + *(ushort2*)buf1525 = max(*(ushort2*)buf1526, *(ushort2*)buf1527); + *(ushort3*)buf1528 = max(*(ushort3*)buf1529, *(ushort3*)buf1530); + *(ushort4*)buf1531 = max(*(ushort4*)buf1532, *(ushort4*)buf1533); + *(int*)buf1534 = max(*(int*)buf1535, *(int*)buf1536); + *(int2*)buf1537 = max(*(int2*)buf1538, *(int2*)buf1539); + *(int3*)buf1540 = max(*(int3*)buf1541, *(int3*)buf1542); + *(int4*)buf1543 = max(*(int4*)buf1544, *(int4*)buf1545); + *(uint*)buf1546 = max(*(uint*)buf1547, *(uint*)buf1548); + *(uint2*)buf1549 = max(*(uint2*)buf1550, *(uint2*)buf1551); + *(uint3*)buf1552 = max(*(uint3*)buf1553, *(uint3*)buf1554); + *(uint4*)buf1555 = max(*(uint4*)buf1556, *(uint4*)buf1557); + *(long*)buf1558 = max(*(long*)buf1559, *(long*)buf1560); + *(long2*)buf1561 = max(*(long2*)buf1562, *(long2*)buf1563); + *(long3*)buf1564 = max(*(long3*)buf1565, *(long3*)buf1566); + *(long4*)buf1567 = max(*(long4*)buf1568, *(long4*)buf1569); + *(ulong*)buf1570 = max(*(ulong*)buf1571, *(ulong*)buf1572); + *(ulong2*)buf1573 = max(*(ulong2*)buf1574, *(ulong2*)buf1575); + *(ulong3*)buf1576 = max(*(ulong3*)buf1577, *(ulong3*)buf1578); + *(ulong4*)buf1579 = max(*(ulong4*)buf1580, *(ulong4*)buf1581); + *(float*)buf1582 = min(*(float*)buf1583, *(float*)buf1584); + *(float2*)buf1585 = min(*(float2*)buf1586, *(float2*)buf1587); + *(float3*)buf1588 = min(*(float3*)buf1589, *(float3*)buf1590); + *(float4*)buf1591 = min(*(float4*)buf1592, *(float4*)buf1593); + *(float2*)buf1594 = min(*(float2*)buf1595, *(float*)buf1596); + *(float3*)buf1597 = min(*(float3*)buf1598, *(float*)buf1599); + *(float4*)buf1600 = min(*(float4*)buf1601, *(float*)buf1602); + *(char*)buf1603 = min(*(char*)buf1604, *(char*)buf1605); + *(char2*)buf1606 = min(*(char2*)buf1607, *(char2*)buf1608); + *(char3*)buf1609 = min(*(char3*)buf1610, *(char3*)buf1611); + *(char4*)buf1612 = min(*(char4*)buf1613, *(char4*)buf1614); + *(uchar*)buf1615 = min(*(uchar*)buf1616, *(uchar*)buf1617); + *(uchar2*)buf1618 = min(*(uchar2*)buf1619, *(uchar2*)buf1620); + *(uchar3*)buf1621 = min(*(uchar3*)buf1622, *(uchar3*)buf1623); + *(uchar4*)buf1624 = min(*(uchar4*)buf1625, *(uchar4*)buf1626); + *(short*)buf1627 = min(*(short*)buf1628, *(short*)buf1629); + *(short2*)buf1630 = min(*(short2*)buf1631, *(short2*)buf1632); + *(short3*)buf1633 = min(*(short3*)buf1634, *(short3*)buf1635); + *(short4*)buf1636 = min(*(short4*)buf1637, *(short4*)buf1638); + *(ushort*)buf1639 = min(*(ushort*)buf1640, *(ushort*)buf1641); + *(ushort2*)buf1642 = min(*(ushort2*)buf1643, *(ushort2*)buf1644); + *(ushort3*)buf1645 = min(*(ushort3*)buf1646, *(ushort3*)buf1647); + *(ushort4*)buf1648 = min(*(ushort4*)buf1649, *(ushort4*)buf1650); + *(int*)buf1651 = min(*(int*)buf1652, *(int*)buf1653); + *(int2*)buf1654 = min(*(int2*)buf1655, *(int2*)buf1656); + *(int3*)buf1657 = min(*(int3*)buf1658, *(int3*)buf1659); + *(int4*)buf1660 = min(*(int4*)buf1661, *(int4*)buf1662); + *(uint*)buf1663 = min(*(uint*)buf1664, *(uint*)buf1665); + *(uint2*)buf1666 = min(*(uint2*)buf1667, *(uint2*)buf1668); + *(uint3*)buf1669 = min(*(uint3*)buf1670, *(uint3*)buf1671); + *(uint4*)buf1672 = min(*(uint4*)buf1673, *(uint4*)buf1674); + *(long*)buf1675 = min(*(long*)buf1676, *(long*)buf1677); + *(long2*)buf1678 = min(*(long2*)buf1679, *(long2*)buf1680); + *(long3*)buf1681 = min(*(long3*)buf1682, *(long3*)buf1683); + *(long4*)buf1684 = min(*(long4*)buf1685, *(long4*)buf1686); + *(ulong*)buf1687 = min(*(ulong*)buf1688, *(ulong*)buf1689); + *(ulong2*)buf1690 = min(*(ulong2*)buf1691, *(ulong2*)buf1692); + *(ulong3*)buf1693 = min(*(ulong3*)buf1694, *(ulong3*)buf1695); + *(ulong4*)buf1696 = min(*(ulong4*)buf1697, *(ulong4*)buf1698); + *(float*)buf1699 = mix(*(float*)buf1700, *(float*)buf1701, *(float*)buf1702); + *(float2*)buf1703 = mix(*(float2*)buf1704, *(float2*)buf1705, *(float2*)buf1706); + *(float3*)buf1707 = mix(*(float3*)buf1708, *(float3*)buf1709, *(float3*)buf1710); + *(float4*)buf1711 = mix(*(float4*)buf1712, *(float4*)buf1713, *(float4*)buf1714); + *(float2*)buf1715 = mix(*(float2*)buf1716, *(float2*)buf1717, *(float*)buf1718); + *(float3*)buf1719 = mix(*(float3*)buf1720, *(float3*)buf1721, *(float*)buf1722); + *(float4*)buf1723 = mix(*(float4*)buf1724, *(float4*)buf1725, *(float*)buf1726); + *(float*)buf1727 = modf(*(float*)buf1728, (float*) buf1729); + *(float2*)buf1730 = modf(*(float2*)buf1731, (float2*) buf1732); + *(float3*)buf1733 = modf(*(float3*)buf1734, (float3*) buf1735); + *(float4*)buf1736 = modf(*(float4*)buf1737, (float4*) buf1738); + *(float*)buf1739 = nan(*(uint*)buf1740); + *(float*)buf1741 = native_acos(*(float*)buf1742); + *(float2*)buf1743 = native_acos(*(float2*)buf1744); + *(float3*)buf1745 = native_acos(*(float3*)buf1746); + *(float4*)buf1747 = native_acos(*(float4*)buf1748); + *(float*)buf1749 = native_acosh(*(float*)buf1750); + *(float2*)buf1751 = native_acosh(*(float2*)buf1752); + *(float3*)buf1753 = native_acosh(*(float3*)buf1754); + *(float4*)buf1755 = native_acosh(*(float4*)buf1756); + *(float*)buf1757 = native_acospi(*(float*)buf1758); + *(float2*)buf1759 = native_acospi(*(float2*)buf1760); + *(float3*)buf1761 = native_acospi(*(float3*)buf1762); + *(float4*)buf1763 = native_acospi(*(float4*)buf1764); + *(float*)buf1765 = native_asin(*(float*)buf1766); + *(float2*)buf1767 = native_asin(*(float2*)buf1768); + *(float3*)buf1769 = native_asin(*(float3*)buf1770); + *(float4*)buf1771 = native_asin(*(float4*)buf1772); + *(float*)buf1773 = native_asinh(*(float*)buf1774); + *(float2*)buf1775 = native_asinh(*(float2*)buf1776); + *(float3*)buf1777 = native_asinh(*(float3*)buf1778); + *(float4*)buf1779 = native_asinh(*(float4*)buf1780); + *(float*)buf1781 = native_asinpi(*(float*)buf1782); + *(float2*)buf1783 = native_asinpi(*(float2*)buf1784); + *(float3*)buf1785 = native_asinpi(*(float3*)buf1786); + *(float4*)buf1787 = native_asinpi(*(float4*)buf1788); + *(float*)buf1789 = native_atan(*(float*)buf1790); + *(float2*)buf1791 = native_atan(*(float2*)buf1792); + *(float3*)buf1793 = native_atan(*(float3*)buf1794); + *(float4*)buf1795 = native_atan(*(float4*)buf1796); + *(float*)buf1797 = native_atan2(*(float*)buf1798, *(float*)buf1799); + *(float2*)buf1800 = native_atan2(*(float2*)buf1801, *(float2*)buf1802); + *(float3*)buf1803 = native_atan2(*(float3*)buf1804, *(float3*)buf1805); + *(float4*)buf1806 = native_atan2(*(float4*)buf1807, *(float4*)buf1808); + *(float*)buf1809 = native_atan2pi(*(float*)buf1810, *(float*)buf1811); + *(float2*)buf1812 = native_atan2pi(*(float2*)buf1813, *(float2*)buf1814); + *(float3*)buf1815 = native_atan2pi(*(float3*)buf1816, *(float3*)buf1817); + *(float4*)buf1818 = native_atan2pi(*(float4*)buf1819, *(float4*)buf1820); + *(float*)buf1821 = native_atanh(*(float*)buf1822); + *(float2*)buf1823 = native_atanh(*(float2*)buf1824); + *(float3*)buf1825 = native_atanh(*(float3*)buf1826); + *(float4*)buf1827 = native_atanh(*(float4*)buf1828); + *(float*)buf1829 = native_atanpi(*(float*)buf1830); + *(float2*)buf1831 = native_atanpi(*(float2*)buf1832); + *(float3*)buf1833 = native_atanpi(*(float3*)buf1834); + *(float4*)buf1835 = native_atanpi(*(float4*)buf1836); + *(float*)buf1837 = native_cbrt(*(float*)buf1838); + *(float2*)buf1839 = native_cbrt(*(float2*)buf1840); + *(float3*)buf1841 = native_cbrt(*(float3*)buf1842); + *(float4*)buf1843 = native_cbrt(*(float4*)buf1844); + *(float*)buf1845 = native_cos(*(float*)buf1846); + *(float2*)buf1847 = native_cos(*(float2*)buf1848); + *(float3*)buf1849 = native_cos(*(float3*)buf1850); + *(float4*)buf1851 = native_cos(*(float4*)buf1852); + *(float*)buf1853 = native_cosh(*(float*)buf1854); + *(float2*)buf1855 = native_cosh(*(float2*)buf1856); + *(float3*)buf1857 = native_cosh(*(float3*)buf1858); + *(float4*)buf1859 = native_cosh(*(float4*)buf1860); + *(float*)buf1861 = native_cospi(*(float*)buf1862); + *(float2*)buf1863 = native_cospi(*(float2*)buf1864); + *(float3*)buf1865 = native_cospi(*(float3*)buf1866); + *(float4*)buf1867 = native_cospi(*(float4*)buf1868); + *(float*)buf1869 = native_distance(*(float*)buf1870, *(float*)buf1871); + *(float*)buf1872 = native_distance(*(float2*)buf1873, *(float2*)buf1874); + *(float*)buf1875 = native_distance(*(float3*)buf1876, *(float3*)buf1877); + *(float*)buf1878 = native_distance(*(float4*)buf1879, *(float4*)buf1880); + *(float*)buf1881 = native_divide(*(float*)buf1882, *(float*)buf1883); + *(float2*)buf1884 = native_divide(*(float2*)buf1885, *(float2*)buf1886); + *(float3*)buf1887 = native_divide(*(float3*)buf1888, *(float3*)buf1889); + *(float4*)buf1890 = native_divide(*(float4*)buf1891, *(float4*)buf1892); + *(float*)buf1893 = native_exp(*(float*)buf1894); + *(float2*)buf1895 = native_exp(*(float2*)buf1896); + *(float3*)buf1897 = native_exp(*(float3*)buf1898); + *(float4*)buf1899 = native_exp(*(float4*)buf1900); + *(float*)buf1901 = native_exp10(*(float*)buf1902); + *(float2*)buf1903 = native_exp10(*(float2*)buf1904); + *(float3*)buf1905 = native_exp10(*(float3*)buf1906); + *(float4*)buf1907 = native_exp10(*(float4*)buf1908); + *(float*)buf1909 = native_exp2(*(float*)buf1910); + *(float2*)buf1911 = native_exp2(*(float2*)buf1912); + *(float3*)buf1913 = native_exp2(*(float3*)buf1914); + *(float4*)buf1915 = native_exp2(*(float4*)buf1916); + *(float*)buf1917 = native_expm1(*(float*)buf1918); + *(float2*)buf1919 = native_expm1(*(float2*)buf1920); + *(float3*)buf1921 = native_expm1(*(float3*)buf1922); + *(float4*)buf1923 = native_expm1(*(float4*)buf1924); + *(float*)buf1925 = native_hypot(*(float*)buf1926, *(float*)buf1927); + *(float2*)buf1928 = native_hypot(*(float2*)buf1929, *(float2*)buf1930); + *(float3*)buf1931 = native_hypot(*(float3*)buf1932, *(float3*)buf1933); + *(float4*)buf1934 = native_hypot(*(float4*)buf1935, *(float4*)buf1936); + *(float*)buf1937 = native_length(*(float*)buf1938); + *(float*)buf1939 = native_length(*(float2*)buf1940); + *(float*)buf1941 = native_length(*(float3*)buf1942); + *(float*)buf1943 = native_length(*(float4*)buf1944); + *(float*)buf1945 = native_log(*(float*)buf1946); + *(float2*)buf1947 = native_log(*(float2*)buf1948); + *(float3*)buf1949 = native_log(*(float3*)buf1950); + *(float4*)buf1951 = native_log(*(float4*)buf1952); + *(float*)buf1953 = native_log10(*(float*)buf1954); + *(float2*)buf1955 = native_log10(*(float2*)buf1956); + *(float3*)buf1957 = native_log10(*(float3*)buf1958); + *(float4*)buf1959 = native_log10(*(float4*)buf1960); + *(float*)buf1961 = native_log1p(*(float*)buf1962); + *(float2*)buf1963 = native_log1p(*(float2*)buf1964); + *(float3*)buf1965 = native_log1p(*(float3*)buf1966); + *(float4*)buf1967 = native_log1p(*(float4*)buf1968); + *(float*)buf1969 = native_log2(*(float*)buf1970); + *(float2*)buf1971 = native_log2(*(float2*)buf1972); + *(float3*)buf1973 = native_log2(*(float3*)buf1974); + *(float4*)buf1975 = native_log2(*(float4*)buf1976); + *(float*)buf1977 = native_normalize(*(float*)buf1978); + *(float2*)buf1979 = native_normalize(*(float2*)buf1980); + *(float3*)buf1981 = native_normalize(*(float3*)buf1982); + *(float4*)buf1983 = native_normalize(*(float4*)buf1984); + *(float*)buf1985 = native_powr(*(float*)buf1986, *(float*)buf1987); + *(float2*)buf1988 = native_powr(*(float2*)buf1989, *(float2*)buf1990); + *(float3*)buf1991 = native_powr(*(float3*)buf1992, *(float3*)buf1993); + *(float4*)buf1994 = native_powr(*(float4*)buf1995, *(float4*)buf1996); + *(float*)buf1997 = native_recip(*(float*)buf1998); + *(float2*)buf1999 = native_recip(*(float2*)buf2000); + *(float3*)buf2001 = native_recip(*(float3*)buf2002); + *(float4*)buf2003 = native_recip(*(float4*)buf2004); + *(float*)buf2005 = native_rootn(*(float*)buf2006, *(int*)buf2007); + *(float2*)buf2008 = native_rootn(*(float2*)buf2009, *(int2*)buf2010); + *(float3*)buf2011 = native_rootn(*(float3*)buf2012, *(int3*)buf2013); + *(float4*)buf2014 = native_rootn(*(float4*)buf2015, *(int4*)buf2016); + *(float*)buf2017 = native_rsqrt(*(float*)buf2018); + *(float2*)buf2019 = native_rsqrt(*(float2*)buf2020); + *(float3*)buf2021 = native_rsqrt(*(float3*)buf2022); + *(float4*)buf2023 = native_rsqrt(*(float4*)buf2024); + *(float*)buf2025 = native_sin(*(float*)buf2026); + *(float2*)buf2027 = native_sin(*(float2*)buf2028); + *(float3*)buf2029 = native_sin(*(float3*)buf2030); + *(float4*)buf2031 = native_sin(*(float4*)buf2032); + *(float*)buf2033 = native_sincos(*(float*)buf2034, (float*) buf2035); + *(float2*)buf2036 = native_sincos(*(float2*)buf2037, (float2*) buf2038); + *(float3*)buf2039 = native_sincos(*(float3*)buf2040, (float3*) buf2041); + *(float4*)buf2042 = native_sincos(*(float4*)buf2043, (float4*) buf2044); + *(float*)buf2045 = native_sinh(*(float*)buf2046); + *(float2*)buf2047 = native_sinh(*(float2*)buf2048); + *(float3*)buf2049 = native_sinh(*(float3*)buf2050); + *(float4*)buf2051 = native_sinh(*(float4*)buf2052); + *(float*)buf2053 = native_sinpi(*(float*)buf2054); + *(float2*)buf2055 = native_sinpi(*(float2*)buf2056); + *(float3*)buf2057 = native_sinpi(*(float3*)buf2058); + *(float4*)buf2059 = native_sinpi(*(float4*)buf2060); + *(float*)buf2061 = native_sqrt(*(float*)buf2062); + *(float2*)buf2063 = native_sqrt(*(float2*)buf2064); + *(float3*)buf2065 = native_sqrt(*(float3*)buf2066); + *(float4*)buf2067 = native_sqrt(*(float4*)buf2068); + *(float*)buf2069 = native_tan(*(float*)buf2070); + *(float2*)buf2071 = native_tan(*(float2*)buf2072); + *(float3*)buf2073 = native_tan(*(float3*)buf2074); + *(float4*)buf2075 = native_tan(*(float4*)buf2076); + *(float*)buf2077 = native_tanh(*(float*)buf2078); + *(float2*)buf2079 = native_tanh(*(float2*)buf2080); + *(float3*)buf2081 = native_tanh(*(float3*)buf2082); + *(float4*)buf2083 = native_tanh(*(float4*)buf2084); + *(float*)buf2085 = native_tanpi(*(float*)buf2086); + *(float2*)buf2087 = native_tanpi(*(float2*)buf2088); + *(float3*)buf2089 = native_tanpi(*(float3*)buf2090); + *(float4*)buf2091 = native_tanpi(*(float4*)buf2092); + *(float*)buf2093 = nextafter(*(float*)buf2094, *(float*)buf2095); + *(float2*)buf2096 = nextafter(*(float2*)buf2097, *(float2*)buf2098); + *(float3*)buf2099 = nextafter(*(float3*)buf2100, *(float3*)buf2101); + *(float4*)buf2102 = nextafter(*(float4*)buf2103, *(float4*)buf2104); + *(float*)buf2105 = normalize(*(float*)buf2106); + *(float2*)buf2107 = normalize(*(float2*)buf2108); + *(float3*)buf2109 = normalize(*(float3*)buf2110); + *(float4*)buf2111 = normalize(*(float4*)buf2112); + *(float*)buf2113 = pow(*(float*)buf2114, *(float*)buf2115); + *(float2*)buf2116 = pow(*(float2*)buf2117, *(float2*)buf2118); + *(float3*)buf2119 = pow(*(float3*)buf2120, *(float3*)buf2121); + *(float4*)buf2122 = pow(*(float4*)buf2123, *(float4*)buf2124); + *(float*)buf2125 = pown(*(float*)buf2126, *(int*)buf2127); + *(float2*)buf2128 = pown(*(float2*)buf2129, *(int2*)buf2130); + *(float3*)buf2131 = pown(*(float3*)buf2132, *(int3*)buf2133); + *(float4*)buf2134 = pown(*(float4*)buf2135, *(int4*)buf2136); + *(float*)buf2137 = powr(*(float*)buf2138, *(float*)buf2139); + *(float2*)buf2140 = powr(*(float2*)buf2141, *(float2*)buf2142); + *(float3*)buf2143 = powr(*(float3*)buf2144, *(float3*)buf2145); + *(float4*)buf2146 = powr(*(float4*)buf2147, *(float4*)buf2148); + *(float*)buf2149 = radians(*(float*)buf2150); + *(float2*)buf2151 = radians(*(float2*)buf2152); + *(float3*)buf2153 = radians(*(float3*)buf2154); + *(float4*)buf2155 = radians(*(float4*)buf2156); + *(float*)buf2157 = remainder(*(float*)buf2158, *(float*)buf2159); + *(float2*)buf2160 = remainder(*(float2*)buf2161, *(float2*)buf2162); + *(float3*)buf2163 = remainder(*(float3*)buf2164, *(float3*)buf2165); + *(float4*)buf2166 = remainder(*(float4*)buf2167, *(float4*)buf2168); + *(float*)buf2169 = remquo(*(float*)buf2170, *(float*)buf2171, (int*) buf2172); + *(float2*)buf2173 = remquo(*(float2*)buf2174, *(float2*)buf2175, (int2*) buf2176); + *(float3*)buf2177 = remquo(*(float3*)buf2178, *(float3*)buf2179, (int3*) buf2180); + *(float4*)buf2181 = remquo(*(float4*)buf2182, *(float4*)buf2183, (int4*) buf2184); + *(float*)buf2185 = rint(*(float*)buf2186); + *(float2*)buf2187 = rint(*(float2*)buf2188); + *(float3*)buf2189 = rint(*(float3*)buf2190); + *(float4*)buf2191 = rint(*(float4*)buf2192); + *(float*)buf2193 = rootn(*(float*)buf2194, *(int*)buf2195); + *(float2*)buf2196 = rootn(*(float2*)buf2197, *(int2*)buf2198); + *(float3*)buf2199 = rootn(*(float3*)buf2200, *(int3*)buf2201); + *(float4*)buf2202 = rootn(*(float4*)buf2203, *(int4*)buf2204); + *(float*)buf2205 = round(*(float*)buf2206); + *(float2*)buf2207 = round(*(float2*)buf2208); + *(float3*)buf2209 = round(*(float3*)buf2210); + *(float4*)buf2211 = round(*(float4*)buf2212); + rsAllocationCopy1DRange(*(rs_allocation*)buf2213, *(uint32_t*)buf2214, *(uint32_t*)buf2215, *(uint32_t*)buf2216, *(rs_allocation*)buf2217, *(uint32_t*)buf2218, *(uint32_t*)buf2219); + rsAllocationCopy2DRange(*(rs_allocation*)buf2220, *(uint32_t*)buf2221, *(uint32_t*)buf2222, *(uint32_t*)buf2223, *(rs_allocation_cubemap_face*)buf2224, *(uint32_t*)buf2225, *(uint32_t*)buf2226, *(rs_allocation*)buf2227, *(uint32_t*)buf2228, *(uint32_t*)buf2229, *(uint32_t*)buf2230, *(rs_allocation_cubemap_face*)buf2231); + *(uint32_t*)buf2232 = rsAllocationGetDimFaces(*(rs_allocation*)buf2233); + *(uint32_t*)buf2234 = rsAllocationGetDimLOD(*(rs_allocation*)buf2235); + *(uint32_t*)buf2236 = rsAllocationGetDimX(*(rs_allocation*)buf2237); + *(uint32_t*)buf2238 = rsAllocationGetDimY(*(rs_allocation*)buf2239); + *(uint32_t*)buf2240 = rsAllocationGetDimZ(*(rs_allocation*)buf2241); + *(rs_element*)buf2242 = rsAllocationGetElement(*(rs_allocation*)buf2243); + rsAllocationIoReceive(*(rs_allocation*)buf2244); + rsAllocationIoSend(*(rs_allocation*)buf2245); + *(int32_t*)buf2246 = rsAtomicAdd((volatile int32_t*) buf2247, *(int32_t*)buf2248); + *(int32_t*)buf2249 = rsAtomicAdd((volatile uint32_t*) buf2250, *(uint32_t*)buf2251); + *(int32_t*)buf2252 = rsAtomicAnd((volatile int32_t*) buf2253, *(int32_t*)buf2254); + *(int32_t*)buf2255 = rsAtomicAnd((volatile uint32_t*) buf2256, *(uint32_t*)buf2257); + *(int32_t*)buf2258 = rsAtomicCas((volatile int32_t*) buf2259, *(int32_t*)buf2260, *(int32_t*)buf2261); + *(uint32_t*)buf2262 = rsAtomicCas((volatile uint32_t*) buf2263, *(uint32_t*)buf2264, *(uint32_t*)buf2265); + *(int32_t*)buf2266 = rsAtomicDec((volatile int32_t*) buf2267); + *(int32_t*)buf2268 = rsAtomicDec((volatile uint32_t*) buf2269); + *(int32_t*)buf2270 = rsAtomicInc((volatile int32_t*) buf2271); + *(int32_t*)buf2272 = rsAtomicInc((volatile uint32_t*) buf2273); + *(uint32_t*)buf2274 = rsAtomicMax((volatile uint32_t*) buf2275, *(uint32_t*)buf2276); + *(int32_t*)buf2277 = rsAtomicMax((volatile int32_t*) buf2278, *(int32_t*)buf2279); + *(uint32_t*)buf2280 = rsAtomicMin((volatile uint32_t*) buf2281, *(uint32_t*)buf2282); + *(int32_t*)buf2283 = rsAtomicMin((volatile int32_t*) buf2284, *(int32_t*)buf2285); + *(int32_t*)buf2286 = rsAtomicOr((volatile int32_t*) buf2287, *(int32_t*)buf2288); + *(int32_t*)buf2289 = rsAtomicOr((volatile uint32_t*) buf2290, *(uint32_t*)buf2291); + *(int32_t*)buf2292 = rsAtomicSub((volatile int32_t*) buf2293, *(int32_t*)buf2294); + *(int32_t*)buf2295 = rsAtomicSub((volatile uint32_t*) buf2296, *(uint32_t*)buf2297); + *(int32_t*)buf2298 = rsAtomicXor((volatile int32_t*) buf2299, *(int32_t*)buf2300); + *(int32_t*)buf2301 = rsAtomicXor((volatile uint32_t*) buf2302, *(uint32_t*)buf2303); + *(char*)buf2304 = rsClamp(*(char*)buf2305, *(char*)buf2306, *(char*)buf2307); + *(uchar*)buf2308 = rsClamp(*(uchar*)buf2309, *(uchar*)buf2310, *(uchar*)buf2311); + *(short*)buf2312 = rsClamp(*(short*)buf2313, *(short*)buf2314, *(short*)buf2315); + *(ushort*)buf2316 = rsClamp(*(ushort*)buf2317, *(ushort*)buf2318, *(ushort*)buf2319); + *(int*)buf2320 = rsClamp(*(int*)buf2321, *(int*)buf2322, *(int*)buf2323); + *(uint*)buf2324 = rsClamp(*(uint*)buf2325, *(uint*)buf2326, *(uint*)buf2327); + rsClearObject((rs_element*) buf2328); + rsClearObject((rs_type*) buf2329); + rsClearObject((rs_allocation*) buf2330); + rsClearObject((rs_sampler*) buf2331); + rsClearObject((rs_script*) buf2332); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf2333); + rsClearObject((rs_program_fragment*) buf2334); + rsClearObject((rs_program_vertex*) buf2335); + rsClearObject((rs_program_raster*) buf2336); + rsClearObject((rs_program_store*) buf2337); + rsClearObject((rs_font*) buf2338); +#endif + rsDebug((const char*) buf2339, *(double*)buf2340); + rsDebug((const char*) buf2341, *(int*)buf2342); + rsDebug((const char*) buf2343, *(uint*)buf2344); + rsDebug((const char*) buf2345, *(long*)buf2346); + rsDebug((const char*) buf2347, *(ulong*)buf2348); + rsDebug((const char*) buf2349, *(int2*)buf2350); + rsDebug((const char*) buf2351, *(int3*)buf2352); + rsDebug((const char*) buf2353, *(int4*)buf2354); + rsDebug((const char*) buf2355, *(uint2*)buf2356); + rsDebug((const char*) buf2357, *(uint3*)buf2358); + rsDebug((const char*) buf2359, *(uint4*)buf2360); + rsDebug((const char*) buf2361, *(long2*)buf2362); + rsDebug((const char*) buf2363, *(long3*)buf2364); + rsDebug((const char*) buf2365, *(long4*)buf2366); + rsDebug((const char*) buf2367, *(ulong2*)buf2368); + rsDebug((const char*) buf2369, *(ulong3*)buf2370); + rsDebug((const char*) buf2371, *(ulong4*)buf2372); + rsDebug((const char*) buf2373, *(float*)buf2374); + rsDebug((const char*) buf2375, *(float2*)buf2376); + rsDebug((const char*) buf2377, *(float3*)buf2378); + rsDebug((const char*) buf2379, *(float4*)buf2380); + rsDebug((const char*) buf2381, *(char*)buf2382); + rsDebug((const char*) buf2383, *(char2*)buf2384); + rsDebug((const char*) buf2385, *(char3*)buf2386); + rsDebug((const char*) buf2387, *(char4*)buf2388); + rsDebug((const char*) buf2389, *(uchar*)buf2390); + rsDebug((const char*) buf2391, *(uchar2*)buf2392); + rsDebug((const char*) buf2393, *(uchar3*)buf2394); + rsDebug((const char*) buf2395, *(uchar4*)buf2396); + rsDebug((const char*) buf2397, *(short*)buf2398); + rsDebug((const char*) buf2399, *(short2*)buf2400); + rsDebug((const char*) buf2401, *(short3*)buf2402); + rsDebug((const char*) buf2403, *(short4*)buf2404); + rsDebug((const char*) buf2405, *(ushort*)buf2406); + rsDebug((const char*) buf2407, *(ushort2*)buf2408); + rsDebug((const char*) buf2409, *(ushort3*)buf2410); + rsDebug((const char*) buf2411, *(ushort4*)buf2412); + rsDebug((const char*) buf2413, *(float*)buf2414, *(float*)buf2415); + rsDebug((const char*) buf2416, *(float*)buf2417, *(float*)buf2418, *(float*)buf2419); + rsDebug((const char*) buf2420, *(float*)buf2421, *(float*)buf2422, *(float*)buf2423, *(float*)buf2424); + rsDebug((const char*) buf2425, *(long long*)buf2426); + rsDebug((const char*) buf2427, *(unsigned long long*)buf2428); + rsDebug((const char*) buf2429, (const void*) buf2430); + rsDebug((const char*) buf2431, (const rs_matrix4x4*) buf2432); + rsDebug((const char*) buf2433, (const rs_matrix3x3*) buf2434); + rsDebug((const char*) buf2435, (const rs_matrix2x2*) buf2436); + *(uint32_t*)buf2437 = rsElementGetBytesSize(*(rs_element*)buf2438); + *(rs_data_kind*)buf2439 = rsElementGetDataKind(*(rs_element*)buf2440); + *(rs_data_type*)buf2441 = rsElementGetDataType(*(rs_element*)buf2442); + *(rs_element*)buf2443 = rsElementGetSubElement(*(rs_element*)buf2444, *(uint32_t*)buf2445); + *(uint32_t*)buf2446 = rsElementGetSubElementArraySize(*(rs_element*)buf2447, *(uint32_t*)buf2448); + *(uint32_t*)buf2449 = rsElementGetSubElementCount(*(rs_element*)buf2450); + *(uint32_t*)buf2451 = rsElementGetSubElementName(*(rs_element*)buf2452, *(uint32_t*)buf2453, (char*) buf2454, *(uint32_t*)buf2455); + *(uint32_t*)buf2456 = rsElementGetSubElementNameLength(*(rs_element*)buf2457, *(uint32_t*)buf2458); + *(uint32_t*)buf2459 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf2460, *(uint32_t*)buf2461); + *(uint32_t*)buf2462 = rsElementGetVectorSize(*(rs_element*)buf2463); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf2464, (float4*) buf2465, (float4*) buf2466, (float4*) buf2467, (float4*) buf2468, (float4*) buf2469, (float4*) buf2470); + rsForEach(*(rs_script*)buf2471, *(rs_allocation*)buf2472, *(rs_allocation*)buf2473); + *(float*)buf2474 = rsFrac(*(float*)buf2475); + *(rs_allocation*)buf2476 = rsGetAllocation((const void*) buf2477); + *(float*)buf2478 = rsGetDt(); + *(const void**)buf2479 = rsGetElementAt(*(rs_allocation*)buf2480, *(uint32_t*)buf2481); + *(const void**)buf2482 = rsGetElementAt(*(rs_allocation*)buf2483, *(uint32_t*)buf2484, *(uint32_t*)buf2485); + *(const void**)buf2486 = rsGetElementAt(*(rs_allocation*)buf2487, *(uint32_t*)buf2488, *(uint32_t*)buf2489, *(uint32_t*)buf2490); + *(float*)buf2491 = rsGetElementAt_float(*(rs_allocation*)buf2492, *(uint32_t*)buf2493); + *(float2*)buf2494 = rsGetElementAt_float2(*(rs_allocation*)buf2495, *(uint32_t*)buf2496); + *(float3*)buf2497 = rsGetElementAt_float3(*(rs_allocation*)buf2498, *(uint32_t*)buf2499); + *(float4*)buf2500 = rsGetElementAt_float4(*(rs_allocation*)buf2501, *(uint32_t*)buf2502); + *(double*)buf2503 = rsGetElementAt_double(*(rs_allocation*)buf2504, *(uint32_t*)buf2505); + *(double2*)buf2506 = rsGetElementAt_double2(*(rs_allocation*)buf2507, *(uint32_t*)buf2508); + *(double3*)buf2509 = rsGetElementAt_double3(*(rs_allocation*)buf2510, *(uint32_t*)buf2511); + *(double4*)buf2512 = rsGetElementAt_double4(*(rs_allocation*)buf2513, *(uint32_t*)buf2514); + *(char*)buf2515 = rsGetElementAt_char(*(rs_allocation*)buf2516, *(uint32_t*)buf2517); + *(char2*)buf2518 = rsGetElementAt_char2(*(rs_allocation*)buf2519, *(uint32_t*)buf2520); + *(char3*)buf2521 = rsGetElementAt_char3(*(rs_allocation*)buf2522, *(uint32_t*)buf2523); + *(char4*)buf2524 = rsGetElementAt_char4(*(rs_allocation*)buf2525, *(uint32_t*)buf2526); + *(uchar*)buf2527 = rsGetElementAt_uchar(*(rs_allocation*)buf2528, *(uint32_t*)buf2529); + *(uchar2*)buf2530 = rsGetElementAt_uchar2(*(rs_allocation*)buf2531, *(uint32_t*)buf2532); + *(uchar3*)buf2533 = rsGetElementAt_uchar3(*(rs_allocation*)buf2534, *(uint32_t*)buf2535); + *(uchar4*)buf2536 = rsGetElementAt_uchar4(*(rs_allocation*)buf2537, *(uint32_t*)buf2538); + *(short*)buf2539 = rsGetElementAt_short(*(rs_allocation*)buf2540, *(uint32_t*)buf2541); + *(short2*)buf2542 = rsGetElementAt_short2(*(rs_allocation*)buf2543, *(uint32_t*)buf2544); + *(short3*)buf2545 = rsGetElementAt_short3(*(rs_allocation*)buf2546, *(uint32_t*)buf2547); + *(short4*)buf2548 = rsGetElementAt_short4(*(rs_allocation*)buf2549, *(uint32_t*)buf2550); + *(ushort*)buf2551 = rsGetElementAt_ushort(*(rs_allocation*)buf2552, *(uint32_t*)buf2553); + *(ushort2*)buf2554 = rsGetElementAt_ushort2(*(rs_allocation*)buf2555, *(uint32_t*)buf2556); + *(ushort3*)buf2557 = rsGetElementAt_ushort3(*(rs_allocation*)buf2558, *(uint32_t*)buf2559); + *(ushort4*)buf2560 = rsGetElementAt_ushort4(*(rs_allocation*)buf2561, *(uint32_t*)buf2562); + *(int*)buf2563 = rsGetElementAt_int(*(rs_allocation*)buf2564, *(uint32_t*)buf2565); + *(int2*)buf2566 = rsGetElementAt_int2(*(rs_allocation*)buf2567, *(uint32_t*)buf2568); + *(int3*)buf2569 = rsGetElementAt_int3(*(rs_allocation*)buf2570, *(uint32_t*)buf2571); + *(int4*)buf2572 = rsGetElementAt_int4(*(rs_allocation*)buf2573, *(uint32_t*)buf2574); + *(uint*)buf2575 = rsGetElementAt_uint(*(rs_allocation*)buf2576, *(uint32_t*)buf2577); + *(uint2*)buf2578 = rsGetElementAt_uint2(*(rs_allocation*)buf2579, *(uint32_t*)buf2580); + *(uint3*)buf2581 = rsGetElementAt_uint3(*(rs_allocation*)buf2582, *(uint32_t*)buf2583); + *(uint4*)buf2584 = rsGetElementAt_uint4(*(rs_allocation*)buf2585, *(uint32_t*)buf2586); + *(long*)buf2587 = rsGetElementAt_long(*(rs_allocation*)buf2588, *(uint32_t*)buf2589); + *(long2*)buf2590 = rsGetElementAt_long2(*(rs_allocation*)buf2591, *(uint32_t*)buf2592); + *(long3*)buf2593 = rsGetElementAt_long3(*(rs_allocation*)buf2594, *(uint32_t*)buf2595); + *(long4*)buf2596 = rsGetElementAt_long4(*(rs_allocation*)buf2597, *(uint32_t*)buf2598); + *(ulong*)buf2599 = rsGetElementAt_ulong(*(rs_allocation*)buf2600, *(uint32_t*)buf2601); + *(ulong2*)buf2602 = rsGetElementAt_ulong2(*(rs_allocation*)buf2603, *(uint32_t*)buf2604); + *(ulong3*)buf2605 = rsGetElementAt_ulong3(*(rs_allocation*)buf2606, *(uint32_t*)buf2607); + *(ulong4*)buf2608 = rsGetElementAt_ulong4(*(rs_allocation*)buf2609, *(uint32_t*)buf2610); + *(float*)buf2611 = rsGetElementAt_float(*(rs_allocation*)buf2612, *(uint32_t*)buf2613, *(uint32_t*)buf2614); + *(float2*)buf2615 = rsGetElementAt_float2(*(rs_allocation*)buf2616, *(uint32_t*)buf2617, *(uint32_t*)buf2618); + *(float3*)buf2619 = rsGetElementAt_float3(*(rs_allocation*)buf2620, *(uint32_t*)buf2621, *(uint32_t*)buf2622); + *(float4*)buf2623 = rsGetElementAt_float4(*(rs_allocation*)buf2624, *(uint32_t*)buf2625, *(uint32_t*)buf2626); + *(double*)buf2627 = rsGetElementAt_double(*(rs_allocation*)buf2628, *(uint32_t*)buf2629, *(uint32_t*)buf2630); + *(double2*)buf2631 = rsGetElementAt_double2(*(rs_allocation*)buf2632, *(uint32_t*)buf2633, *(uint32_t*)buf2634); + *(double3*)buf2635 = rsGetElementAt_double3(*(rs_allocation*)buf2636, *(uint32_t*)buf2637, *(uint32_t*)buf2638); + *(double4*)buf2639 = rsGetElementAt_double4(*(rs_allocation*)buf2640, *(uint32_t*)buf2641, *(uint32_t*)buf2642); + *(char*)buf2643 = rsGetElementAt_char(*(rs_allocation*)buf2644, *(uint32_t*)buf2645, *(uint32_t*)buf2646); + *(char2*)buf2647 = rsGetElementAt_char2(*(rs_allocation*)buf2648, *(uint32_t*)buf2649, *(uint32_t*)buf2650); + *(char3*)buf2651 = rsGetElementAt_char3(*(rs_allocation*)buf2652, *(uint32_t*)buf2653, *(uint32_t*)buf2654); + *(char4*)buf2655 = rsGetElementAt_char4(*(rs_allocation*)buf2656, *(uint32_t*)buf2657, *(uint32_t*)buf2658); + *(uchar*)buf2659 = rsGetElementAt_uchar(*(rs_allocation*)buf2660, *(uint32_t*)buf2661, *(uint32_t*)buf2662); + *(uchar2*)buf2663 = rsGetElementAt_uchar2(*(rs_allocation*)buf2664, *(uint32_t*)buf2665, *(uint32_t*)buf2666); + *(uchar3*)buf2667 = rsGetElementAt_uchar3(*(rs_allocation*)buf2668, *(uint32_t*)buf2669, *(uint32_t*)buf2670); + *(uchar4*)buf2671 = rsGetElementAt_uchar4(*(rs_allocation*)buf2672, *(uint32_t*)buf2673, *(uint32_t*)buf2674); + *(short*)buf2675 = rsGetElementAt_short(*(rs_allocation*)buf2676, *(uint32_t*)buf2677, *(uint32_t*)buf2678); + *(short2*)buf2679 = rsGetElementAt_short2(*(rs_allocation*)buf2680, *(uint32_t*)buf2681, *(uint32_t*)buf2682); + *(short3*)buf2683 = rsGetElementAt_short3(*(rs_allocation*)buf2684, *(uint32_t*)buf2685, *(uint32_t*)buf2686); + *(short4*)buf2687 = rsGetElementAt_short4(*(rs_allocation*)buf2688, *(uint32_t*)buf2689, *(uint32_t*)buf2690); + *(ushort*)buf2691 = rsGetElementAt_ushort(*(rs_allocation*)buf2692, *(uint32_t*)buf2693, *(uint32_t*)buf2694); + *(ushort2*)buf2695 = rsGetElementAt_ushort2(*(rs_allocation*)buf2696, *(uint32_t*)buf2697, *(uint32_t*)buf2698); + *(ushort3*)buf2699 = rsGetElementAt_ushort3(*(rs_allocation*)buf2700, *(uint32_t*)buf2701, *(uint32_t*)buf2702); + *(ushort4*)buf2703 = rsGetElementAt_ushort4(*(rs_allocation*)buf2704, *(uint32_t*)buf2705, *(uint32_t*)buf2706); + *(int*)buf2707 = rsGetElementAt_int(*(rs_allocation*)buf2708, *(uint32_t*)buf2709, *(uint32_t*)buf2710); + *(int2*)buf2711 = rsGetElementAt_int2(*(rs_allocation*)buf2712, *(uint32_t*)buf2713, *(uint32_t*)buf2714); + *(int3*)buf2715 = rsGetElementAt_int3(*(rs_allocation*)buf2716, *(uint32_t*)buf2717, *(uint32_t*)buf2718); + *(int4*)buf2719 = rsGetElementAt_int4(*(rs_allocation*)buf2720, *(uint32_t*)buf2721, *(uint32_t*)buf2722); + *(uint*)buf2723 = rsGetElementAt_uint(*(rs_allocation*)buf2724, *(uint32_t*)buf2725, *(uint32_t*)buf2726); + *(uint2*)buf2727 = rsGetElementAt_uint2(*(rs_allocation*)buf2728, *(uint32_t*)buf2729, *(uint32_t*)buf2730); + *(uint3*)buf2731 = rsGetElementAt_uint3(*(rs_allocation*)buf2732, *(uint32_t*)buf2733, *(uint32_t*)buf2734); + *(uint4*)buf2735 = rsGetElementAt_uint4(*(rs_allocation*)buf2736, *(uint32_t*)buf2737, *(uint32_t*)buf2738); + *(long*)buf2739 = rsGetElementAt_long(*(rs_allocation*)buf2740, *(uint32_t*)buf2741, *(uint32_t*)buf2742); + *(long2*)buf2743 = rsGetElementAt_long2(*(rs_allocation*)buf2744, *(uint32_t*)buf2745, *(uint32_t*)buf2746); + *(long3*)buf2747 = rsGetElementAt_long3(*(rs_allocation*)buf2748, *(uint32_t*)buf2749, *(uint32_t*)buf2750); + *(long4*)buf2751 = rsGetElementAt_long4(*(rs_allocation*)buf2752, *(uint32_t*)buf2753, *(uint32_t*)buf2754); + *(ulong*)buf2755 = rsGetElementAt_ulong(*(rs_allocation*)buf2756, *(uint32_t*)buf2757, *(uint32_t*)buf2758); + *(ulong2*)buf2759 = rsGetElementAt_ulong2(*(rs_allocation*)buf2760, *(uint32_t*)buf2761, *(uint32_t*)buf2762); + *(ulong3*)buf2763 = rsGetElementAt_ulong3(*(rs_allocation*)buf2764, *(uint32_t*)buf2765, *(uint32_t*)buf2766); + *(ulong4*)buf2767 = rsGetElementAt_ulong4(*(rs_allocation*)buf2768, *(uint32_t*)buf2769, *(uint32_t*)buf2770); + *(float*)buf2771 = rsGetElementAt_float(*(rs_allocation*)buf2772, *(uint32_t*)buf2773, *(uint32_t*)buf2774, *(uint32_t*)buf2775); + *(float2*)buf2776 = rsGetElementAt_float2(*(rs_allocation*)buf2777, *(uint32_t*)buf2778, *(uint32_t*)buf2779, *(uint32_t*)buf2780); + *(float3*)buf2781 = rsGetElementAt_float3(*(rs_allocation*)buf2782, *(uint32_t*)buf2783, *(uint32_t*)buf2784, *(uint32_t*)buf2785); + *(float4*)buf2786 = rsGetElementAt_float4(*(rs_allocation*)buf2787, *(uint32_t*)buf2788, *(uint32_t*)buf2789, *(uint32_t*)buf2790); + *(double*)buf2791 = rsGetElementAt_double(*(rs_allocation*)buf2792, *(uint32_t*)buf2793, *(uint32_t*)buf2794, *(uint32_t*)buf2795); + *(double2*)buf2796 = rsGetElementAt_double2(*(rs_allocation*)buf2797, *(uint32_t*)buf2798, *(uint32_t*)buf2799, *(uint32_t*)buf2800); + *(double3*)buf2801 = rsGetElementAt_double3(*(rs_allocation*)buf2802, *(uint32_t*)buf2803, *(uint32_t*)buf2804, *(uint32_t*)buf2805); + *(double4*)buf2806 = rsGetElementAt_double4(*(rs_allocation*)buf2807, *(uint32_t*)buf2808, *(uint32_t*)buf2809, *(uint32_t*)buf2810); + *(char*)buf2811 = rsGetElementAt_char(*(rs_allocation*)buf2812, *(uint32_t*)buf2813, *(uint32_t*)buf2814, *(uint32_t*)buf2815); + *(char2*)buf2816 = rsGetElementAt_char2(*(rs_allocation*)buf2817, *(uint32_t*)buf2818, *(uint32_t*)buf2819, *(uint32_t*)buf2820); + *(char3*)buf2821 = rsGetElementAt_char3(*(rs_allocation*)buf2822, *(uint32_t*)buf2823, *(uint32_t*)buf2824, *(uint32_t*)buf2825); + *(char4*)buf2826 = rsGetElementAt_char4(*(rs_allocation*)buf2827, *(uint32_t*)buf2828, *(uint32_t*)buf2829, *(uint32_t*)buf2830); + *(uchar*)buf2831 = rsGetElementAt_uchar(*(rs_allocation*)buf2832, *(uint32_t*)buf2833, *(uint32_t*)buf2834, *(uint32_t*)buf2835); + *(uchar2*)buf2836 = rsGetElementAt_uchar2(*(rs_allocation*)buf2837, *(uint32_t*)buf2838, *(uint32_t*)buf2839, *(uint32_t*)buf2840); + *(uchar3*)buf2841 = rsGetElementAt_uchar3(*(rs_allocation*)buf2842, *(uint32_t*)buf2843, *(uint32_t*)buf2844, *(uint32_t*)buf2845); + *(uchar4*)buf2846 = rsGetElementAt_uchar4(*(rs_allocation*)buf2847, *(uint32_t*)buf2848, *(uint32_t*)buf2849, *(uint32_t*)buf2850); + *(short*)buf2851 = rsGetElementAt_short(*(rs_allocation*)buf2852, *(uint32_t*)buf2853, *(uint32_t*)buf2854, *(uint32_t*)buf2855); + *(short2*)buf2856 = rsGetElementAt_short2(*(rs_allocation*)buf2857, *(uint32_t*)buf2858, *(uint32_t*)buf2859, *(uint32_t*)buf2860); + *(short3*)buf2861 = rsGetElementAt_short3(*(rs_allocation*)buf2862, *(uint32_t*)buf2863, *(uint32_t*)buf2864, *(uint32_t*)buf2865); + *(short4*)buf2866 = rsGetElementAt_short4(*(rs_allocation*)buf2867, *(uint32_t*)buf2868, *(uint32_t*)buf2869, *(uint32_t*)buf2870); + *(ushort*)buf2871 = rsGetElementAt_ushort(*(rs_allocation*)buf2872, *(uint32_t*)buf2873, *(uint32_t*)buf2874, *(uint32_t*)buf2875); + *(ushort2*)buf2876 = rsGetElementAt_ushort2(*(rs_allocation*)buf2877, *(uint32_t*)buf2878, *(uint32_t*)buf2879, *(uint32_t*)buf2880); + *(ushort3*)buf2881 = rsGetElementAt_ushort3(*(rs_allocation*)buf2882, *(uint32_t*)buf2883, *(uint32_t*)buf2884, *(uint32_t*)buf2885); + *(ushort4*)buf2886 = rsGetElementAt_ushort4(*(rs_allocation*)buf2887, *(uint32_t*)buf2888, *(uint32_t*)buf2889, *(uint32_t*)buf2890); + *(int*)buf2891 = rsGetElementAt_int(*(rs_allocation*)buf2892, *(uint32_t*)buf2893, *(uint32_t*)buf2894, *(uint32_t*)buf2895); + *(int2*)buf2896 = rsGetElementAt_int2(*(rs_allocation*)buf2897, *(uint32_t*)buf2898, *(uint32_t*)buf2899, *(uint32_t*)buf2900); + *(int3*)buf2901 = rsGetElementAt_int3(*(rs_allocation*)buf2902, *(uint32_t*)buf2903, *(uint32_t*)buf2904, *(uint32_t*)buf2905); + *(int4*)buf2906 = rsGetElementAt_int4(*(rs_allocation*)buf2907, *(uint32_t*)buf2908, *(uint32_t*)buf2909, *(uint32_t*)buf2910); + *(uint*)buf2911 = rsGetElementAt_uint(*(rs_allocation*)buf2912, *(uint32_t*)buf2913, *(uint32_t*)buf2914, *(uint32_t*)buf2915); + *(uint2*)buf2916 = rsGetElementAt_uint2(*(rs_allocation*)buf2917, *(uint32_t*)buf2918, *(uint32_t*)buf2919, *(uint32_t*)buf2920); + *(uint3*)buf2921 = rsGetElementAt_uint3(*(rs_allocation*)buf2922, *(uint32_t*)buf2923, *(uint32_t*)buf2924, *(uint32_t*)buf2925); + *(uint4*)buf2926 = rsGetElementAt_uint4(*(rs_allocation*)buf2927, *(uint32_t*)buf2928, *(uint32_t*)buf2929, *(uint32_t*)buf2930); + *(long*)buf2931 = rsGetElementAt_long(*(rs_allocation*)buf2932, *(uint32_t*)buf2933, *(uint32_t*)buf2934, *(uint32_t*)buf2935); + *(long2*)buf2936 = rsGetElementAt_long2(*(rs_allocation*)buf2937, *(uint32_t*)buf2938, *(uint32_t*)buf2939, *(uint32_t*)buf2940); + *(long3*)buf2941 = rsGetElementAt_long3(*(rs_allocation*)buf2942, *(uint32_t*)buf2943, *(uint32_t*)buf2944, *(uint32_t*)buf2945); + *(long4*)buf2946 = rsGetElementAt_long4(*(rs_allocation*)buf2947, *(uint32_t*)buf2948, *(uint32_t*)buf2949, *(uint32_t*)buf2950); + *(ulong*)buf2951 = rsGetElementAt_ulong(*(rs_allocation*)buf2952, *(uint32_t*)buf2953, *(uint32_t*)buf2954, *(uint32_t*)buf2955); + *(ulong2*)buf2956 = rsGetElementAt_ulong2(*(rs_allocation*)buf2957, *(uint32_t*)buf2958, *(uint32_t*)buf2959, *(uint32_t*)buf2960); + *(ulong3*)buf2961 = rsGetElementAt_ulong3(*(rs_allocation*)buf2962, *(uint32_t*)buf2963, *(uint32_t*)buf2964, *(uint32_t*)buf2965); + *(ulong4*)buf2966 = rsGetElementAt_ulong4(*(rs_allocation*)buf2967, *(uint32_t*)buf2968, *(uint32_t*)buf2969, *(uint32_t*)buf2970); + *(uchar*)buf2971 = rsGetElementAtYuv_uchar_U(*(rs_allocation*)buf2972, *(uint32_t*)buf2973, *(uint32_t*)buf2974); + *(uchar*)buf2975 = rsGetElementAtYuv_uchar_V(*(rs_allocation*)buf2976, *(uint32_t*)buf2977, *(uint32_t*)buf2978); + *(uchar*)buf2979 = rsGetElementAtYuv_uchar_Y(*(rs_allocation*)buf2980, *(uint32_t*)buf2981, *(uint32_t*)buf2982); + *(bool*)buf2983 = rsIsObject(*(rs_element*)buf2984); + *(bool*)buf2985 = rsIsObject(*(rs_type*)buf2986); + *(bool*)buf2987 = rsIsObject(*(rs_allocation*)buf2988); + *(bool*)buf2989 = rsIsObject(*(rs_sampler*)buf2990); + *(bool*)buf2991 = rsIsObject(*(rs_script*)buf2992); +#ifndef __LP64__ + *(bool*)buf2993 = rsIsObject(*(rs_mesh*)buf2994); + *(bool*)buf2995 = rsIsObject(*(rs_program_fragment*)buf2996); + *(bool*)buf2997 = rsIsObject(*(rs_program_vertex*)buf2998); + *(bool*)buf2999 = rsIsObject(*(rs_program_raster*)buf3000); + *(bool*)buf3001 = rsIsObject(*(rs_program_store*)buf3002); + *(bool*)buf3003 = rsIsObject(*(rs_font*)buf3004); +#endif + *(bool*)buf3005 = rsIsSphereInFrustum((float4*) buf3006, (float4*) buf3007, (float4*) buf3008, (float4*) buf3009, (float4*) buf3010, (float4*) buf3011, (float4*) buf3012); + *(rs_tm**)buf3013 = rsLocaltime((rs_tm*) buf3014, (const rs_time_t*) buf3015); + *(float*)buf3016 = rsMatrixGet((const rs_matrix4x4*) buf3017, *(uint32_t*)buf3018, *(uint32_t*)buf3019); + *(float*)buf3020 = rsMatrixGet((const rs_matrix3x3*) buf3021, *(uint32_t*)buf3022, *(uint32_t*)buf3023); + *(float*)buf3024 = rsMatrixGet((const rs_matrix2x2*) buf3025, *(uint32_t*)buf3026, *(uint32_t*)buf3027); + *(bool*)buf3028 = rsMatrixInverse((rs_matrix4x4*) buf3029); + *(bool*)buf3030 = rsMatrixInverseTranspose((rs_matrix4x4*) buf3031); + rsMatrixLoad((rs_matrix4x4*) buf3032, (const float*) buf3033); + rsMatrixLoad((rs_matrix3x3*) buf3034, (const float*) buf3035); + rsMatrixLoad((rs_matrix2x2*) buf3036, (const float*) buf3037); + rsMatrixLoad((rs_matrix4x4*) buf3038, (const rs_matrix4x4*) buf3039); + rsMatrixLoad((rs_matrix3x3*) buf3040, (const rs_matrix3x3*) buf3041); + rsMatrixLoad((rs_matrix2x2*) buf3042, (const rs_matrix2x2*) buf3043); + rsMatrixLoad((rs_matrix4x4*) buf3044, (const rs_matrix3x3*) buf3045); + rsMatrixLoad((rs_matrix4x4*) buf3046, (const rs_matrix2x2*) buf3047); + rsMatrixLoadFrustum((rs_matrix4x4*) buf3048, *(float*)buf3049, *(float*)buf3050, *(float*)buf3051, *(float*)buf3052, *(float*)buf3053, *(float*)buf3054); + rsMatrixLoadIdentity((rs_matrix4x4*) buf3055); + rsMatrixLoadIdentity((rs_matrix3x3*) buf3056); + rsMatrixLoadIdentity((rs_matrix2x2*) buf3057); + rsMatrixLoadMultiply((rs_matrix4x4*) buf3058, (const rs_matrix4x4*) buf3059, (const rs_matrix4x4*) buf3060); + rsMatrixLoadMultiply((rs_matrix3x3*) buf3061, (const rs_matrix3x3*) buf3062, (const rs_matrix3x3*) buf3063); + rsMatrixLoadMultiply((rs_matrix2x2*) buf3064, (const rs_matrix2x2*) buf3065, (const rs_matrix2x2*) buf3066); + rsMatrixLoadOrtho((rs_matrix4x4*) buf3067, *(float*)buf3068, *(float*)buf3069, *(float*)buf3070, *(float*)buf3071, *(float*)buf3072, *(float*)buf3073); + rsMatrixLoadPerspective((rs_matrix4x4*) buf3074, *(float*)buf3075, *(float*)buf3076, *(float*)buf3077, *(float*)buf3078); + rsMatrixLoadRotate((rs_matrix4x4*) buf3079, *(float*)buf3080, *(float*)buf3081, *(float*)buf3082, *(float*)buf3083); + rsMatrixLoadScale((rs_matrix4x4*) buf3084, *(float*)buf3085, *(float*)buf3086, *(float*)buf3087); + rsMatrixLoadTranslate((rs_matrix4x4*) buf3088, *(float*)buf3089, *(float*)buf3090, *(float*)buf3091); + rsMatrixMultiply((rs_matrix4x4*) buf3092, (const rs_matrix4x4*) buf3093); + rsMatrixMultiply((rs_matrix3x3*) buf3094, (const rs_matrix3x3*) buf3095); + rsMatrixMultiply((rs_matrix2x2*) buf3096, (const rs_matrix2x2*) buf3097); + *(float4*)buf3098 = rsMatrixMultiply((const rs_matrix4x4*) buf3099, *(float4*)buf3100); + *(float4*)buf3101 = rsMatrixMultiply((const rs_matrix4x4*) buf3102, *(float3*)buf3103); + *(float4*)buf3104 = rsMatrixMultiply((const rs_matrix4x4*) buf3105, *(float2*)buf3106); + *(float3*)buf3107 = rsMatrixMultiply((const rs_matrix3x3*) buf3108, *(float3*)buf3109); + *(float3*)buf3110 = rsMatrixMultiply((const rs_matrix3x3*) buf3111, *(float2*)buf3112); + *(float2*)buf3113 = rsMatrixMultiply((const rs_matrix2x2*) buf3114, *(float2*)buf3115); + rsMatrixRotate((rs_matrix4x4*) buf3116, *(float*)buf3117, *(float*)buf3118, *(float*)buf3119, *(float*)buf3120); + rsMatrixScale((rs_matrix4x4*) buf3121, *(float*)buf3122, *(float*)buf3123, *(float*)buf3124); + rsMatrixSet((rs_matrix4x4*) buf3125, *(uint32_t*)buf3126, *(uint32_t*)buf3127, *(float*)buf3128); + rsMatrixSet((rs_matrix3x3*) buf3129, *(uint32_t*)buf3130, *(uint32_t*)buf3131, *(float*)buf3132); + rsMatrixSet((rs_matrix2x2*) buf3133, *(uint32_t*)buf3134, *(uint32_t*)buf3135, *(float*)buf3136); + rsMatrixTranslate((rs_matrix4x4*) buf3137, *(float*)buf3138, *(float*)buf3139, *(float*)buf3140); + rsMatrixTranspose((rs_matrix4x4*) buf3141); + rsMatrixTranspose((rs_matrix3x3*) buf3142); + rsMatrixTranspose((rs_matrix2x2*) buf3143); + *(uchar4*)buf3144 = rsPackColorTo8888(*(float*)buf3145, *(float*)buf3146, *(float*)buf3147); + *(uchar4*)buf3148 = rsPackColorTo8888(*(float*)buf3149, *(float*)buf3150, *(float*)buf3151, *(float*)buf3152); + *(uchar4*)buf3153 = rsPackColorTo8888(*(float3*)buf3154); + *(uchar4*)buf3155 = rsPackColorTo8888(*(float4*)buf3156); + rsQuaternionAdd((rs_quaternion*) buf3157, (const rs_quaternion*) buf3158); + rsQuaternionConjugate((rs_quaternion*) buf3159); + *(float*)buf3160 = rsQuaternionDot((const rs_quaternion*) buf3161, (const rs_quaternion*) buf3162); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf3163, (const rs_quaternion*) buf3164); + rsQuaternionLoadRotate((rs_quaternion*) buf3165, *(float*)buf3166, *(float*)buf3167, *(float*)buf3168, *(float*)buf3169); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf3170, *(float*)buf3171, *(float*)buf3172, *(float*)buf3173, *(float*)buf3174); + rsQuaternionMultiply((rs_quaternion*) buf3175, *(float*)buf3176); + rsQuaternionMultiply((rs_quaternion*) buf3177, (const rs_quaternion*) buf3178); + rsQuaternionNormalize((rs_quaternion*) buf3179); + rsQuaternionSet((rs_quaternion*) buf3180, *(float*)buf3181, *(float*)buf3182, *(float*)buf3183, *(float*)buf3184); + rsQuaternionSet((rs_quaternion*) buf3185, (const rs_quaternion*) buf3186); + rsQuaternionSlerp((rs_quaternion*) buf3187, (const rs_quaternion*) buf3188, (const rs_quaternion*) buf3189, *(float*)buf3190); + *(int*)buf3191 = rsRand(*(int*)buf3192); + *(int*)buf3193 = rsRand(*(int*)buf3194, *(int*)buf3195); + *(float*)buf3196 = rsRand(*(float*)buf3197); + *(float*)buf3198 = rsRand(*(float*)buf3199, *(float*)buf3200); + *(float4*)buf3201 = rsSample(*(rs_allocation*)buf3202, *(rs_sampler*)buf3203, *(float*)buf3204); + *(float4*)buf3205 = rsSample(*(rs_allocation*)buf3206, *(rs_sampler*)buf3207, *(float*)buf3208, *(float*)buf3209); + *(float4*)buf3210 = rsSample(*(rs_allocation*)buf3211, *(rs_sampler*)buf3212, *(float2*)buf3213); + *(float4*)buf3214 = rsSample(*(rs_allocation*)buf3215, *(rs_sampler*)buf3216, *(float2*)buf3217, *(float*)buf3218); + *(float*)buf3219 = rsSamplerGetAnisotropy(*(rs_sampler*)buf3220); + *(rs_sampler_value*)buf3221 = rsSamplerGetMagnification(*(rs_sampler*)buf3222); + *(rs_sampler_value*)buf3223 = rsSamplerGetMinification(*(rs_sampler*)buf3224); + *(rs_sampler_value*)buf3225 = rsSamplerGetWrapS(*(rs_sampler*)buf3226); + *(rs_sampler_value*)buf3227 = rsSamplerGetWrapT(*(rs_sampler*)buf3228); + *(bool*)buf3229 = rsSendToClient(*(int*)buf3230); + *(bool*)buf3231 = rsSendToClient(*(int*)buf3232, (const void*) buf3233, *(uint*)buf3234); + rsSendToClientBlocking(*(int*)buf3235); + rsSendToClientBlocking(*(int*)buf3236, (const void*) buf3237, *(uint*)buf3238); + rsSetElementAt(*(rs_allocation*)buf3239, (void*) buf3240, *(uint32_t*)buf3241); + rsSetElementAt(*(rs_allocation*)buf3242, (void*) buf3243, *(uint32_t*)buf3244, *(uint32_t*)buf3245); + rsSetElementAt_float(*(rs_allocation*)buf3246, *(float*)buf3247, *(uint32_t*)buf3248); + rsSetElementAt_float2(*(rs_allocation*)buf3249, *(float2*)buf3250, *(uint32_t*)buf3251); + rsSetElementAt_float3(*(rs_allocation*)buf3252, *(float3*)buf3253, *(uint32_t*)buf3254); + rsSetElementAt_float4(*(rs_allocation*)buf3255, *(float4*)buf3256, *(uint32_t*)buf3257); + rsSetElementAt_double(*(rs_allocation*)buf3258, *(double*)buf3259, *(uint32_t*)buf3260); + rsSetElementAt_double2(*(rs_allocation*)buf3261, *(double2*)buf3262, *(uint32_t*)buf3263); + rsSetElementAt_double3(*(rs_allocation*)buf3264, *(double3*)buf3265, *(uint32_t*)buf3266); + rsSetElementAt_double4(*(rs_allocation*)buf3267, *(double4*)buf3268, *(uint32_t*)buf3269); + rsSetElementAt_char(*(rs_allocation*)buf3270, *(char*)buf3271, *(uint32_t*)buf3272); + rsSetElementAt_char2(*(rs_allocation*)buf3273, *(char2*)buf3274, *(uint32_t*)buf3275); + rsSetElementAt_char3(*(rs_allocation*)buf3276, *(char3*)buf3277, *(uint32_t*)buf3278); + rsSetElementAt_char4(*(rs_allocation*)buf3279, *(char4*)buf3280, *(uint32_t*)buf3281); + rsSetElementAt_uchar(*(rs_allocation*)buf3282, *(uchar*)buf3283, *(uint32_t*)buf3284); + rsSetElementAt_uchar2(*(rs_allocation*)buf3285, *(uchar2*)buf3286, *(uint32_t*)buf3287); + rsSetElementAt_uchar3(*(rs_allocation*)buf3288, *(uchar3*)buf3289, *(uint32_t*)buf3290); + rsSetElementAt_uchar4(*(rs_allocation*)buf3291, *(uchar4*)buf3292, *(uint32_t*)buf3293); + rsSetElementAt_short(*(rs_allocation*)buf3294, *(short*)buf3295, *(uint32_t*)buf3296); + rsSetElementAt_short2(*(rs_allocation*)buf3297, *(short2*)buf3298, *(uint32_t*)buf3299); + rsSetElementAt_short3(*(rs_allocation*)buf3300, *(short3*)buf3301, *(uint32_t*)buf3302); + rsSetElementAt_short4(*(rs_allocation*)buf3303, *(short4*)buf3304, *(uint32_t*)buf3305); + rsSetElementAt_ushort(*(rs_allocation*)buf3306, *(ushort*)buf3307, *(uint32_t*)buf3308); + rsSetElementAt_ushort2(*(rs_allocation*)buf3309, *(ushort2*)buf3310, *(uint32_t*)buf3311); + rsSetElementAt_ushort3(*(rs_allocation*)buf3312, *(ushort3*)buf3313, *(uint32_t*)buf3314); + rsSetElementAt_ushort4(*(rs_allocation*)buf3315, *(ushort4*)buf3316, *(uint32_t*)buf3317); + rsSetElementAt_int(*(rs_allocation*)buf3318, *(int*)buf3319, *(uint32_t*)buf3320); + rsSetElementAt_int2(*(rs_allocation*)buf3321, *(int2*)buf3322, *(uint32_t*)buf3323); + rsSetElementAt_int3(*(rs_allocation*)buf3324, *(int3*)buf3325, *(uint32_t*)buf3326); + rsSetElementAt_int4(*(rs_allocation*)buf3327, *(int4*)buf3328, *(uint32_t*)buf3329); + rsSetElementAt_uint(*(rs_allocation*)buf3330, *(uint*)buf3331, *(uint32_t*)buf3332); + rsSetElementAt_uint2(*(rs_allocation*)buf3333, *(uint2*)buf3334, *(uint32_t*)buf3335); + rsSetElementAt_uint3(*(rs_allocation*)buf3336, *(uint3*)buf3337, *(uint32_t*)buf3338); + rsSetElementAt_uint4(*(rs_allocation*)buf3339, *(uint4*)buf3340, *(uint32_t*)buf3341); + rsSetElementAt_long(*(rs_allocation*)buf3342, *(long*)buf3343, *(uint32_t*)buf3344); + rsSetElementAt_long2(*(rs_allocation*)buf3345, *(long2*)buf3346, *(uint32_t*)buf3347); + rsSetElementAt_long3(*(rs_allocation*)buf3348, *(long3*)buf3349, *(uint32_t*)buf3350); + rsSetElementAt_long4(*(rs_allocation*)buf3351, *(long4*)buf3352, *(uint32_t*)buf3353); + rsSetElementAt_ulong(*(rs_allocation*)buf3354, *(ulong*)buf3355, *(uint32_t*)buf3356); + rsSetElementAt_ulong2(*(rs_allocation*)buf3357, *(ulong2*)buf3358, *(uint32_t*)buf3359); + rsSetElementAt_ulong3(*(rs_allocation*)buf3360, *(ulong3*)buf3361, *(uint32_t*)buf3362); + rsSetElementAt_ulong4(*(rs_allocation*)buf3363, *(ulong4*)buf3364, *(uint32_t*)buf3365); + rsSetElementAt_float(*(rs_allocation*)buf3366, *(float*)buf3367, *(uint32_t*)buf3368, *(uint32_t*)buf3369); + rsSetElementAt_float2(*(rs_allocation*)buf3370, *(float2*)buf3371, *(uint32_t*)buf3372, *(uint32_t*)buf3373); + rsSetElementAt_float3(*(rs_allocation*)buf3374, *(float3*)buf3375, *(uint32_t*)buf3376, *(uint32_t*)buf3377); + rsSetElementAt_float4(*(rs_allocation*)buf3378, *(float4*)buf3379, *(uint32_t*)buf3380, *(uint32_t*)buf3381); + rsSetElementAt_double(*(rs_allocation*)buf3382, *(double*)buf3383, *(uint32_t*)buf3384, *(uint32_t*)buf3385); + rsSetElementAt_double2(*(rs_allocation*)buf3386, *(double2*)buf3387, *(uint32_t*)buf3388, *(uint32_t*)buf3389); + rsSetElementAt_double3(*(rs_allocation*)buf3390, *(double3*)buf3391, *(uint32_t*)buf3392, *(uint32_t*)buf3393); + rsSetElementAt_double4(*(rs_allocation*)buf3394, *(double4*)buf3395, *(uint32_t*)buf3396, *(uint32_t*)buf3397); + rsSetElementAt_char(*(rs_allocation*)buf3398, *(char*)buf3399, *(uint32_t*)buf3400, *(uint32_t*)buf3401); + rsSetElementAt_char2(*(rs_allocation*)buf3402, *(char2*)buf3403, *(uint32_t*)buf3404, *(uint32_t*)buf3405); + rsSetElementAt_char3(*(rs_allocation*)buf3406, *(char3*)buf3407, *(uint32_t*)buf3408, *(uint32_t*)buf3409); + rsSetElementAt_char4(*(rs_allocation*)buf3410, *(char4*)buf3411, *(uint32_t*)buf3412, *(uint32_t*)buf3413); + rsSetElementAt_uchar(*(rs_allocation*)buf3414, *(uchar*)buf3415, *(uint32_t*)buf3416, *(uint32_t*)buf3417); + rsSetElementAt_uchar2(*(rs_allocation*)buf3418, *(uchar2*)buf3419, *(uint32_t*)buf3420, *(uint32_t*)buf3421); + rsSetElementAt_uchar3(*(rs_allocation*)buf3422, *(uchar3*)buf3423, *(uint32_t*)buf3424, *(uint32_t*)buf3425); + rsSetElementAt_uchar4(*(rs_allocation*)buf3426, *(uchar4*)buf3427, *(uint32_t*)buf3428, *(uint32_t*)buf3429); + rsSetElementAt_short(*(rs_allocation*)buf3430, *(short*)buf3431, *(uint32_t*)buf3432, *(uint32_t*)buf3433); + rsSetElementAt_short2(*(rs_allocation*)buf3434, *(short2*)buf3435, *(uint32_t*)buf3436, *(uint32_t*)buf3437); + rsSetElementAt_short3(*(rs_allocation*)buf3438, *(short3*)buf3439, *(uint32_t*)buf3440, *(uint32_t*)buf3441); + rsSetElementAt_short4(*(rs_allocation*)buf3442, *(short4*)buf3443, *(uint32_t*)buf3444, *(uint32_t*)buf3445); + rsSetElementAt_ushort(*(rs_allocation*)buf3446, *(ushort*)buf3447, *(uint32_t*)buf3448, *(uint32_t*)buf3449); + rsSetElementAt_ushort2(*(rs_allocation*)buf3450, *(ushort2*)buf3451, *(uint32_t*)buf3452, *(uint32_t*)buf3453); + rsSetElementAt_ushort3(*(rs_allocation*)buf3454, *(ushort3*)buf3455, *(uint32_t*)buf3456, *(uint32_t*)buf3457); + rsSetElementAt_ushort4(*(rs_allocation*)buf3458, *(ushort4*)buf3459, *(uint32_t*)buf3460, *(uint32_t*)buf3461); + rsSetElementAt_int(*(rs_allocation*)buf3462, *(int*)buf3463, *(uint32_t*)buf3464, *(uint32_t*)buf3465); + rsSetElementAt_int2(*(rs_allocation*)buf3466, *(int2*)buf3467, *(uint32_t*)buf3468, *(uint32_t*)buf3469); + rsSetElementAt_int3(*(rs_allocation*)buf3470, *(int3*)buf3471, *(uint32_t*)buf3472, *(uint32_t*)buf3473); + rsSetElementAt_int4(*(rs_allocation*)buf3474, *(int4*)buf3475, *(uint32_t*)buf3476, *(uint32_t*)buf3477); + rsSetElementAt_uint(*(rs_allocation*)buf3478, *(uint*)buf3479, *(uint32_t*)buf3480, *(uint32_t*)buf3481); + rsSetElementAt_uint2(*(rs_allocation*)buf3482, *(uint2*)buf3483, *(uint32_t*)buf3484, *(uint32_t*)buf3485); + rsSetElementAt_uint3(*(rs_allocation*)buf3486, *(uint3*)buf3487, *(uint32_t*)buf3488, *(uint32_t*)buf3489); + rsSetElementAt_uint4(*(rs_allocation*)buf3490, *(uint4*)buf3491, *(uint32_t*)buf3492, *(uint32_t*)buf3493); + rsSetElementAt_long(*(rs_allocation*)buf3494, *(long*)buf3495, *(uint32_t*)buf3496, *(uint32_t*)buf3497); + rsSetElementAt_long2(*(rs_allocation*)buf3498, *(long2*)buf3499, *(uint32_t*)buf3500, *(uint32_t*)buf3501); + rsSetElementAt_long3(*(rs_allocation*)buf3502, *(long3*)buf3503, *(uint32_t*)buf3504, *(uint32_t*)buf3505); + rsSetElementAt_long4(*(rs_allocation*)buf3506, *(long4*)buf3507, *(uint32_t*)buf3508, *(uint32_t*)buf3509); + rsSetElementAt_ulong(*(rs_allocation*)buf3510, *(ulong*)buf3511, *(uint32_t*)buf3512, *(uint32_t*)buf3513); + rsSetElementAt_ulong2(*(rs_allocation*)buf3514, *(ulong2*)buf3515, *(uint32_t*)buf3516, *(uint32_t*)buf3517); + rsSetElementAt_ulong3(*(rs_allocation*)buf3518, *(ulong3*)buf3519, *(uint32_t*)buf3520, *(uint32_t*)buf3521); + rsSetElementAt_ulong4(*(rs_allocation*)buf3522, *(ulong4*)buf3523, *(uint32_t*)buf3524, *(uint32_t*)buf3525); + rsSetElementAt_float(*(rs_allocation*)buf3526, *(float*)buf3527, *(uint32_t*)buf3528, *(uint32_t*)buf3529, *(uint32_t*)buf3530); + rsSetElementAt_float2(*(rs_allocation*)buf3531, *(float2*)buf3532, *(uint32_t*)buf3533, *(uint32_t*)buf3534, *(uint32_t*)buf3535); + rsSetElementAt_float3(*(rs_allocation*)buf3536, *(float3*)buf3537, *(uint32_t*)buf3538, *(uint32_t*)buf3539, *(uint32_t*)buf3540); + rsSetElementAt_float4(*(rs_allocation*)buf3541, *(float4*)buf3542, *(uint32_t*)buf3543, *(uint32_t*)buf3544, *(uint32_t*)buf3545); + rsSetElementAt_double(*(rs_allocation*)buf3546, *(double*)buf3547, *(uint32_t*)buf3548, *(uint32_t*)buf3549, *(uint32_t*)buf3550); + rsSetElementAt_double2(*(rs_allocation*)buf3551, *(double2*)buf3552, *(uint32_t*)buf3553, *(uint32_t*)buf3554, *(uint32_t*)buf3555); + rsSetElementAt_double3(*(rs_allocation*)buf3556, *(double3*)buf3557, *(uint32_t*)buf3558, *(uint32_t*)buf3559, *(uint32_t*)buf3560); + rsSetElementAt_double4(*(rs_allocation*)buf3561, *(double4*)buf3562, *(uint32_t*)buf3563, *(uint32_t*)buf3564, *(uint32_t*)buf3565); + rsSetElementAt_char(*(rs_allocation*)buf3566, *(char*)buf3567, *(uint32_t*)buf3568, *(uint32_t*)buf3569, *(uint32_t*)buf3570); + rsSetElementAt_char2(*(rs_allocation*)buf3571, *(char2*)buf3572, *(uint32_t*)buf3573, *(uint32_t*)buf3574, *(uint32_t*)buf3575); + rsSetElementAt_char3(*(rs_allocation*)buf3576, *(char3*)buf3577, *(uint32_t*)buf3578, *(uint32_t*)buf3579, *(uint32_t*)buf3580); + rsSetElementAt_char4(*(rs_allocation*)buf3581, *(char4*)buf3582, *(uint32_t*)buf3583, *(uint32_t*)buf3584, *(uint32_t*)buf3585); + rsSetElementAt_uchar(*(rs_allocation*)buf3586, *(uchar*)buf3587, *(uint32_t*)buf3588, *(uint32_t*)buf3589, *(uint32_t*)buf3590); + rsSetElementAt_uchar2(*(rs_allocation*)buf3591, *(uchar2*)buf3592, *(uint32_t*)buf3593, *(uint32_t*)buf3594, *(uint32_t*)buf3595); + rsSetElementAt_uchar3(*(rs_allocation*)buf3596, *(uchar3*)buf3597, *(uint32_t*)buf3598, *(uint32_t*)buf3599, *(uint32_t*)buf3600); + rsSetElementAt_uchar4(*(rs_allocation*)buf3601, *(uchar4*)buf3602, *(uint32_t*)buf3603, *(uint32_t*)buf3604, *(uint32_t*)buf3605); + rsSetElementAt_short(*(rs_allocation*)buf3606, *(short*)buf3607, *(uint32_t*)buf3608, *(uint32_t*)buf3609, *(uint32_t*)buf3610); + rsSetElementAt_short2(*(rs_allocation*)buf3611, *(short2*)buf3612, *(uint32_t*)buf3613, *(uint32_t*)buf3614, *(uint32_t*)buf3615); + rsSetElementAt_short3(*(rs_allocation*)buf3616, *(short3*)buf3617, *(uint32_t*)buf3618, *(uint32_t*)buf3619, *(uint32_t*)buf3620); + rsSetElementAt_short4(*(rs_allocation*)buf3621, *(short4*)buf3622, *(uint32_t*)buf3623, *(uint32_t*)buf3624, *(uint32_t*)buf3625); + rsSetElementAt_ushort(*(rs_allocation*)buf3626, *(ushort*)buf3627, *(uint32_t*)buf3628, *(uint32_t*)buf3629, *(uint32_t*)buf3630); + rsSetElementAt_ushort2(*(rs_allocation*)buf3631, *(ushort2*)buf3632, *(uint32_t*)buf3633, *(uint32_t*)buf3634, *(uint32_t*)buf3635); + rsSetElementAt_ushort3(*(rs_allocation*)buf3636, *(ushort3*)buf3637, *(uint32_t*)buf3638, *(uint32_t*)buf3639, *(uint32_t*)buf3640); + rsSetElementAt_ushort4(*(rs_allocation*)buf3641, *(ushort4*)buf3642, *(uint32_t*)buf3643, *(uint32_t*)buf3644, *(uint32_t*)buf3645); + rsSetElementAt_int(*(rs_allocation*)buf3646, *(int*)buf3647, *(uint32_t*)buf3648, *(uint32_t*)buf3649, *(uint32_t*)buf3650); + rsSetElementAt_int2(*(rs_allocation*)buf3651, *(int2*)buf3652, *(uint32_t*)buf3653, *(uint32_t*)buf3654, *(uint32_t*)buf3655); + rsSetElementAt_int3(*(rs_allocation*)buf3656, *(int3*)buf3657, *(uint32_t*)buf3658, *(uint32_t*)buf3659, *(uint32_t*)buf3660); + rsSetElementAt_int4(*(rs_allocation*)buf3661, *(int4*)buf3662, *(uint32_t*)buf3663, *(uint32_t*)buf3664, *(uint32_t*)buf3665); + rsSetElementAt_uint(*(rs_allocation*)buf3666, *(uint*)buf3667, *(uint32_t*)buf3668, *(uint32_t*)buf3669, *(uint32_t*)buf3670); + rsSetElementAt_uint2(*(rs_allocation*)buf3671, *(uint2*)buf3672, *(uint32_t*)buf3673, *(uint32_t*)buf3674, *(uint32_t*)buf3675); + rsSetElementAt_uint3(*(rs_allocation*)buf3676, *(uint3*)buf3677, *(uint32_t*)buf3678, *(uint32_t*)buf3679, *(uint32_t*)buf3680); + rsSetElementAt_uint4(*(rs_allocation*)buf3681, *(uint4*)buf3682, *(uint32_t*)buf3683, *(uint32_t*)buf3684, *(uint32_t*)buf3685); + rsSetElementAt_long(*(rs_allocation*)buf3686, *(long*)buf3687, *(uint32_t*)buf3688, *(uint32_t*)buf3689, *(uint32_t*)buf3690); + rsSetElementAt_long2(*(rs_allocation*)buf3691, *(long2*)buf3692, *(uint32_t*)buf3693, *(uint32_t*)buf3694, *(uint32_t*)buf3695); + rsSetElementAt_long3(*(rs_allocation*)buf3696, *(long3*)buf3697, *(uint32_t*)buf3698, *(uint32_t*)buf3699, *(uint32_t*)buf3700); + rsSetElementAt_long4(*(rs_allocation*)buf3701, *(long4*)buf3702, *(uint32_t*)buf3703, *(uint32_t*)buf3704, *(uint32_t*)buf3705); + rsSetElementAt_ulong(*(rs_allocation*)buf3706, *(ulong*)buf3707, *(uint32_t*)buf3708, *(uint32_t*)buf3709, *(uint32_t*)buf3710); + rsSetElementAt_ulong2(*(rs_allocation*)buf3711, *(ulong2*)buf3712, *(uint32_t*)buf3713, *(uint32_t*)buf3714, *(uint32_t*)buf3715); + rsSetElementAt_ulong3(*(rs_allocation*)buf3716, *(ulong3*)buf3717, *(uint32_t*)buf3718, *(uint32_t*)buf3719, *(uint32_t*)buf3720); + rsSetElementAt_ulong4(*(rs_allocation*)buf3721, *(ulong4*)buf3722, *(uint32_t*)buf3723, *(uint32_t*)buf3724, *(uint32_t*)buf3725); + rsSetObject((rs_element*) buf3726, *(rs_element*)buf3727); + rsSetObject((rs_type*) buf3728, *(rs_type*)buf3729); + rsSetObject((rs_allocation*) buf3730, *(rs_allocation*)buf3731); + rsSetObject((rs_sampler*) buf3732, *(rs_sampler*)buf3733); + rsSetObject((rs_script*) buf3734, *(rs_script*)buf3735); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf3736, *(rs_mesh*)buf3737); + rsSetObject((rs_program_fragment*) buf3738, *(rs_program_fragment*)buf3739); + rsSetObject((rs_program_vertex*) buf3740, *(rs_program_vertex*)buf3741); + rsSetObject((rs_program_raster*) buf3742, *(rs_program_raster*)buf3743); + rsSetObject((rs_program_store*) buf3744, *(rs_program_store*)buf3745); + rsSetObject((rs_font*) buf3746, *(rs_font*)buf3747); +#endif + *(rs_time_t*)buf3748 = rsTime((rs_time_t*) buf3749); + *(float4*)buf3750 = rsUnpackColor8888(*(uchar4*)buf3751); + *(int64_t*)buf3752 = rsUptimeMillis(); + *(int64_t*)buf3753 = rsUptimeNanos(); + *(float4*)buf3754 = rsYuvToRGBA_float4(*(uchar*)buf3755, *(uchar*)buf3756, *(uchar*)buf3757); + *(uchar4*)buf3758 = rsYuvToRGBA_uchar4(*(uchar*)buf3759, *(uchar*)buf3760, *(uchar*)buf3761); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf3762); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf3763, *(rs_allocation_usage_type*)buf3764); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf3765, *(uint*)buf3766); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf3767, *(uint*)buf3768, *(rs_allocation*)buf3769); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf3770, *(uint*)buf3771, *(rs_allocation*)buf3772); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf3773); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf3774); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf3775); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf3776); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf3777); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf3778); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf3779, *(uint*)buf3780, *(rs_sampler*)buf3781); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf3782, *(uint*)buf3783, *(rs_allocation*)buf3784); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf3785, *(float*)buf3786, *(float*)buf3787, *(float*)buf3788); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf3789); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf3790); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3791); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3792, *(uint*)buf3793); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf3794, *(uint*)buf3795, *(uint*)buf3796, *(uint*)buf3797); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf3798, *(float*)buf3799, *(float*)buf3800, *(float*)buf3801, *(float*)buf3802, *(float*)buf3803, *(float*)buf3804, *(float*)buf3805, *(float*)buf3806, *(float*)buf3807, *(float*)buf3808, *(float*)buf3809); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf3810, *(float*)buf3811, *(float*)buf3812, *(float*)buf3813, *(float*)buf3814, *(float*)buf3815, *(float*)buf3816, *(float*)buf3817, *(float*)buf3818, *(float*)buf3819, *(float*)buf3820, *(float*)buf3821, *(float*)buf3822, *(float*)buf3823, *(float*)buf3824, *(float*)buf3825, *(float*)buf3826, *(float*)buf3827, *(float*)buf3828, *(float*)buf3829); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf3830, *(float*)buf3831, *(float*)buf3832, *(float*)buf3833, *(float*)buf3834); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf3835, *(float*)buf3836, *(float*)buf3837, *(float*)buf3838, *(float*)buf3839); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf3840, *(int*)buf3841, *(int*)buf3842); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf3843, *(int*)buf3844, *(int*)buf3845); +#endif +#ifndef __LP64__ + *(uint*)buf3846 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf3847, *(float*)buf3848, *(float*)buf3849, *(float*)buf3850); +#endif +#ifndef __LP64__ + *(uint*)buf3851 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf3852 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf3853, (int*) buf3854, (int*) buf3855, (int*) buf3856, (int*) buf3857); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf3858, (int*) buf3859, (int*) buf3860, (int*) buf3861, (int*) buf3862); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf3863, (float*) buf3864, (float*) buf3865, (float*) buf3866, (float*) buf3867, (float*) buf3868, (float*) buf3869); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf3870, (float3*) buf3871, (float3*) buf3872); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf3873 = rsgMeshGetIndexAllocation(*(rs_mesh*)buf3874, *(uint32_t*)buf3875); +#endif +#ifndef __LP64__ + *(rs_primitive*)buf3876 = rsgMeshGetPrimitive(*(rs_mesh*)buf3877, *(uint32_t*)buf3878); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3879 = rsgMeshGetPrimitiveCount(*(rs_mesh*)buf3880); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf3881 = rsgMeshGetVertexAllocation(*(rs_mesh*)buf3882, *(uint32_t*)buf3883); +#endif +#ifndef __LP64__ + *(uint32_t*)buf3884 = rsgMeshGetVertexAllocationCount(*(rs_mesh*)buf3885); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf3886, *(float*)buf3887, *(float*)buf3888, *(float*)buf3889, *(float*)buf3890); +#endif +#ifndef __LP64__ + *(rs_cull_mode*)buf3891 = rsgProgramRasterGetCullMode(*(rs_program_raster*)buf3892); +#endif +#ifndef __LP64__ + *(bool*)buf3893 = rsgProgramRasterIsPointSpriteEnabled(*(rs_program_raster*)buf3894); +#endif +#ifndef __LP64__ + *(rs_blend_dst_func*)buf3895 = rsgProgramStoreGetBlendDstFunc(*(rs_program_store*)buf3896); +#endif +#ifndef __LP64__ + *(rs_blend_src_func*)buf3897 = rsgProgramStoreGetBlendSrcFunc(*(rs_program_store*)buf3898); +#endif +#ifndef __LP64__ + *(rs_depth_func*)buf3899 = rsgProgramStoreGetDepthFunc(*(rs_program_store*)buf3900); +#endif +#ifndef __LP64__ + *(bool*)buf3901 = rsgProgramStoreIsColorMaskAlphaEnabled(*(rs_program_store*)buf3902); +#endif +#ifndef __LP64__ + *(bool*)buf3903 = rsgProgramStoreIsColorMaskBlueEnabled(*(rs_program_store*)buf3904); +#endif +#ifndef __LP64__ + *(bool*)buf3905 = rsgProgramStoreIsColorMaskGreenEnabled(*(rs_program_store*)buf3906); +#endif +#ifndef __LP64__ + *(bool*)buf3907 = rsgProgramStoreIsColorMaskRedEnabled(*(rs_program_store*)buf3908); +#endif +#ifndef __LP64__ + *(bool*)buf3909 = rsgProgramStoreIsDepthMaskEnabled(*(rs_program_store*)buf3910); +#endif +#ifndef __LP64__ + *(bool*)buf3911 = rsgProgramStoreIsDitherEnabled(*(rs_program_store*)buf3912); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf3913); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf3914); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf3915); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf3916); +#endif + *(float*)buf3917 = rsqrt(*(float*)buf3918); + *(float2*)buf3919 = rsqrt(*(float2*)buf3920); + *(float3*)buf3921 = rsqrt(*(float3*)buf3922); + *(float4*)buf3923 = rsqrt(*(float4*)buf3924); + *(float*)buf3925 = sign(*(float*)buf3926); + *(float2*)buf3927 = sign(*(float2*)buf3928); + *(float3*)buf3929 = sign(*(float3*)buf3930); + *(float4*)buf3931 = sign(*(float4*)buf3932); + *(float*)buf3933 = sin(*(float*)buf3934); + *(float2*)buf3935 = sin(*(float2*)buf3936); + *(float3*)buf3937 = sin(*(float3*)buf3938); + *(float4*)buf3939 = sin(*(float4*)buf3940); + *(float*)buf3941 = sincos(*(float*)buf3942, (float*) buf3943); + *(float2*)buf3944 = sincos(*(float2*)buf3945, (float2*) buf3946); + *(float3*)buf3947 = sincos(*(float3*)buf3948, (float3*) buf3949); + *(float4*)buf3950 = sincos(*(float4*)buf3951, (float4*) buf3952); + *(float*)buf3953 = sinh(*(float*)buf3954); + *(float2*)buf3955 = sinh(*(float2*)buf3956); + *(float3*)buf3957 = sinh(*(float3*)buf3958); + *(float4*)buf3959 = sinh(*(float4*)buf3960); + *(float*)buf3961 = sinpi(*(float*)buf3962); + *(float2*)buf3963 = sinpi(*(float2*)buf3964); + *(float3*)buf3965 = sinpi(*(float3*)buf3966); + *(float4*)buf3967 = sinpi(*(float4*)buf3968); + *(float*)buf3969 = sqrt(*(float*)buf3970); + *(float2*)buf3971 = sqrt(*(float2*)buf3972); + *(float3*)buf3973 = sqrt(*(float3*)buf3974); + *(float4*)buf3975 = sqrt(*(float4*)buf3976); + *(float*)buf3977 = step(*(float*)buf3978, *(float*)buf3979); + *(float2*)buf3980 = step(*(float2*)buf3981, *(float2*)buf3982); + *(float3*)buf3983 = step(*(float3*)buf3984, *(float3*)buf3985); + *(float4*)buf3986 = step(*(float4*)buf3987, *(float4*)buf3988); + *(float2*)buf3989 = step(*(float2*)buf3990, *(float*)buf3991); + *(float3*)buf3992 = step(*(float3*)buf3993, *(float*)buf3994); + *(float4*)buf3995 = step(*(float4*)buf3996, *(float*)buf3997); + *(float2*)buf3998 = step(*(float*)buf3999, *(float2*)buf4000); + *(float3*)buf4001 = step(*(float*)buf4002, *(float3*)buf4003); + *(float4*)buf4004 = step(*(float*)buf4005, *(float4*)buf4006); + *(float*)buf4007 = tan(*(float*)buf4008); + *(float2*)buf4009 = tan(*(float2*)buf4010); + *(float3*)buf4011 = tan(*(float3*)buf4012); + *(float4*)buf4013 = tan(*(float4*)buf4014); + *(float*)buf4015 = tanh(*(float*)buf4016); + *(float2*)buf4017 = tanh(*(float2*)buf4018); + *(float3*)buf4019 = tanh(*(float3*)buf4020); + *(float4*)buf4021 = tanh(*(float4*)buf4022); + *(float*)buf4023 = tanpi(*(float*)buf4024); + *(float2*)buf4025 = tanpi(*(float2*)buf4026); + *(float3*)buf4027 = tanpi(*(float3*)buf4028); + *(float4*)buf4029 = tanpi(*(float4*)buf4030); + *(float*)buf4031 = tgamma(*(float*)buf4032); + *(float2*)buf4033 = tgamma(*(float2*)buf4034); + *(float3*)buf4035 = tgamma(*(float3*)buf4036); + *(float4*)buf4037 = tgamma(*(float4*)buf4038); + *(float*)buf4039 = trunc(*(float*)buf4040); + *(float2*)buf4041 = trunc(*(float2*)buf4042); + *(float3*)buf4043 = trunc(*(float3*)buf4044); + *(float4*)buf4045 = trunc(*(float4*)buf4046); +}
diff --git a/slang/tests/P_all_api_21/stderr.txt.expect b/slang/tests/P_all_api_21/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_21/stderr.txt.expect
diff --git a/slang/tests/P_all_api_21/stdout.txt.expect b/slang/tests/P_all_api_21/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_21/stdout.txt.expect
diff --git a/slang/tests/P_all_api_22/all22.rs b/slang/tests/P_all_api_22/all22.rs new file mode 100644 index 0000000..9d20f7b --- /dev/null +++ b/slang/tests/P_all_api_22/all22.rs
@@ -0,0 +1,6588 @@ +// -target-api 22 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +#include "rs_graphics.rsh" + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; +char buf2493[200]; +char buf2494[200]; +char buf2495[200]; +char buf2496[200]; +char buf2497[200]; +char buf2498[200]; +char buf2499[200]; +char buf2500[200]; +char buf2501[200]; +char buf2502[200]; +char buf2503[200]; +char buf2504[200]; +char buf2505[200]; +char buf2506[200]; +char buf2507[200]; +char buf2508[200]; +char buf2509[200]; +char buf2510[200]; +char buf2511[200]; +char buf2512[200]; +char buf2513[200]; +char buf2514[200]; +char buf2515[200]; +char buf2516[200]; +char buf2517[200]; +char buf2518[200]; +char buf2519[200]; +char buf2520[200]; +char buf2521[200]; +char buf2522[200]; +char buf2523[200]; +char buf2524[200]; +char buf2525[200]; +char buf2526[200]; +char buf2527[200]; +char buf2528[200]; +char buf2529[200]; +char buf2530[200]; +char buf2531[200]; +char buf2532[200]; +char buf2533[200]; +char buf2534[200]; +char buf2535[200]; +char buf2536[200]; +char buf2537[200]; +char buf2538[200]; +char buf2539[200]; +char buf2540[200]; +char buf2541[200]; +char buf2542[200]; +char buf2543[200]; +char buf2544[200]; +char buf2545[200]; +char buf2546[200]; +char buf2547[200]; +char buf2548[200]; +char buf2549[200]; +char buf2550[200]; +char buf2551[200]; +char buf2552[200]; +char buf2553[200]; +char buf2554[200]; +char buf2555[200]; +char buf2556[200]; +char buf2557[200]; +char buf2558[200]; +char buf2559[200]; +char buf2560[200]; +char buf2561[200]; +char buf2562[200]; +char buf2563[200]; +char buf2564[200]; +char buf2565[200]; +char buf2566[200]; +char buf2567[200]; +char buf2568[200]; +char buf2569[200]; +char buf2570[200]; +char buf2571[200]; +char buf2572[200]; +char buf2573[200]; +char buf2574[200]; +char buf2575[200]; +char buf2576[200]; +char buf2577[200]; +char buf2578[200]; +char buf2579[200]; +char buf2580[200]; +char buf2581[200]; +char buf2582[200]; +char buf2583[200]; +char buf2584[200]; +char buf2585[200]; +char buf2586[200]; +char buf2587[200]; +char buf2588[200]; +char buf2589[200]; +char buf2590[200]; +char buf2591[200]; +char buf2592[200]; +char buf2593[200]; +char buf2594[200]; +char buf2595[200]; +char buf2596[200]; +char buf2597[200]; +char buf2598[200]; +char buf2599[200]; +char buf2600[200]; +char buf2601[200]; +char buf2602[200]; +char buf2603[200]; +char buf2604[200]; +char buf2605[200]; +char buf2606[200]; +char buf2607[200]; +char buf2608[200]; +char buf2609[200]; +char buf2610[200]; +char buf2611[200]; +char buf2612[200]; +char buf2613[200]; +char buf2614[200]; +char buf2615[200]; +char buf2616[200]; +char buf2617[200]; +char buf2618[200]; +char buf2619[200]; +char buf2620[200]; +char buf2621[200]; +char buf2622[200]; +char buf2623[200]; +char buf2624[200]; +char buf2625[200]; +char buf2626[200]; +char buf2627[200]; +char buf2628[200]; +char buf2629[200]; +char buf2630[200]; +char buf2631[200]; +char buf2632[200]; +char buf2633[200]; +char buf2634[200]; +char buf2635[200]; +char buf2636[200]; +char buf2637[200]; +char buf2638[200]; +char buf2639[200]; +char buf2640[200]; +char buf2641[200]; +char buf2642[200]; +char buf2643[200]; +char buf2644[200]; +char buf2645[200]; +char buf2646[200]; +char buf2647[200]; +char buf2648[200]; +char buf2649[200]; +char buf2650[200]; +char buf2651[200]; +char buf2652[200]; +char buf2653[200]; +char buf2654[200]; +char buf2655[200]; +char buf2656[200]; +char buf2657[200]; +char buf2658[200]; +char buf2659[200]; +char buf2660[200]; +char buf2661[200]; +char buf2662[200]; +char buf2663[200]; +char buf2664[200]; +char buf2665[200]; +char buf2666[200]; +char buf2667[200]; +char buf2668[200]; +char buf2669[200]; +char buf2670[200]; +char buf2671[200]; +char buf2672[200]; +char buf2673[200]; +char buf2674[200]; +char buf2675[200]; +char buf2676[200]; +char buf2677[200]; +char buf2678[200]; +char buf2679[200]; +char buf2680[200]; +char buf2681[200]; +char buf2682[200]; +char buf2683[200]; +char buf2684[200]; +char buf2685[200]; +char buf2686[200]; +char buf2687[200]; +char buf2688[200]; +char buf2689[200]; +char buf2690[200]; +char buf2691[200]; +char buf2692[200]; +char buf2693[200]; +char buf2694[200]; +char buf2695[200]; +char buf2696[200]; +char buf2697[200]; +char buf2698[200]; +char buf2699[200]; +char buf2700[200]; +char buf2701[200]; +char buf2702[200]; +char buf2703[200]; +char buf2704[200]; +char buf2705[200]; +char buf2706[200]; +char buf2707[200]; +char buf2708[200]; +char buf2709[200]; +char buf2710[200]; +char buf2711[200]; +char buf2712[200]; +char buf2713[200]; +char buf2714[200]; +char buf2715[200]; +char buf2716[200]; +char buf2717[200]; +char buf2718[200]; +char buf2719[200]; +char buf2720[200]; +char buf2721[200]; +char buf2722[200]; +char buf2723[200]; +char buf2724[200]; +char buf2725[200]; +char buf2726[200]; +char buf2727[200]; +char buf2728[200]; +char buf2729[200]; +char buf2730[200]; +char buf2731[200]; +char buf2732[200]; +char buf2733[200]; +char buf2734[200]; +char buf2735[200]; +char buf2736[200]; +char buf2737[200]; +char buf2738[200]; +char buf2739[200]; +char buf2740[200]; +char buf2741[200]; +char buf2742[200]; +char buf2743[200]; +char buf2744[200]; +char buf2745[200]; +char buf2746[200]; +char buf2747[200]; +char buf2748[200]; +char buf2749[200]; +char buf2750[200]; +char buf2751[200]; +char buf2752[200]; +char buf2753[200]; +char buf2754[200]; +char buf2755[200]; +char buf2756[200]; +char buf2757[200]; +char buf2758[200]; +char buf2759[200]; +char buf2760[200]; +char buf2761[200]; +char buf2762[200]; +char buf2763[200]; +char buf2764[200]; +char buf2765[200]; +char buf2766[200]; +char buf2767[200]; +char buf2768[200]; +char buf2769[200]; +char buf2770[200]; +char buf2771[200]; +char buf2772[200]; +char buf2773[200]; +char buf2774[200]; +char buf2775[200]; +char buf2776[200]; +char buf2777[200]; +char buf2778[200]; +char buf2779[200]; +char buf2780[200]; +char buf2781[200]; +char buf2782[200]; +char buf2783[200]; +char buf2784[200]; +char buf2785[200]; +char buf2786[200]; +char buf2787[200]; +char buf2788[200]; +char buf2789[200]; +char buf2790[200]; +char buf2791[200]; +char buf2792[200]; +char buf2793[200]; +char buf2794[200]; +char buf2795[200]; +char buf2796[200]; +char buf2797[200]; +char buf2798[200]; +char buf2799[200]; +char buf2800[200]; +char buf2801[200]; +char buf2802[200]; +char buf2803[200]; +char buf2804[200]; +char buf2805[200]; +char buf2806[200]; +char buf2807[200]; +char buf2808[200]; +char buf2809[200]; +char buf2810[200]; +char buf2811[200]; +char buf2812[200]; +char buf2813[200]; +char buf2814[200]; +char buf2815[200]; +char buf2816[200]; +char buf2817[200]; +char buf2818[200]; +char buf2819[200]; +char buf2820[200]; +char buf2821[200]; +char buf2822[200]; +char buf2823[200]; +char buf2824[200]; +char buf2825[200]; +char buf2826[200]; +char buf2827[200]; +char buf2828[200]; +char buf2829[200]; +char buf2830[200]; +char buf2831[200]; +char buf2832[200]; +char buf2833[200]; +char buf2834[200]; +char buf2835[200]; +char buf2836[200]; +char buf2837[200]; +char buf2838[200]; +char buf2839[200]; +char buf2840[200]; +char buf2841[200]; +char buf2842[200]; +char buf2843[200]; +char buf2844[200]; +char buf2845[200]; +char buf2846[200]; +char buf2847[200]; +char buf2848[200]; +char buf2849[200]; +char buf2850[200]; +char buf2851[200]; +char buf2852[200]; +char buf2853[200]; +char buf2854[200]; +char buf2855[200]; +char buf2856[200]; +char buf2857[200]; +char buf2858[200]; +char buf2859[200]; +char buf2860[200]; +char buf2861[200]; +char buf2862[200]; +char buf2863[200]; +char buf2864[200]; +char buf2865[200]; +char buf2866[200]; +char buf2867[200]; +char buf2868[200]; +char buf2869[200]; +char buf2870[200]; +char buf2871[200]; +char buf2872[200]; +char buf2873[200]; +char buf2874[200]; +char buf2875[200]; +char buf2876[200]; +char buf2877[200]; +char buf2878[200]; +char buf2879[200]; +char buf2880[200]; +char buf2881[200]; +char buf2882[200]; +char buf2883[200]; +char buf2884[200]; +char buf2885[200]; +char buf2886[200]; +char buf2887[200]; +char buf2888[200]; +char buf2889[200]; +char buf2890[200]; +char buf2891[200]; +char buf2892[200]; +char buf2893[200]; +char buf2894[200]; +char buf2895[200]; +char buf2896[200]; +char buf2897[200]; +char buf2898[200]; +char buf2899[200]; +char buf2900[200]; +char buf2901[200]; +char buf2902[200]; +char buf2903[200]; +char buf2904[200]; +char buf2905[200]; +char buf2906[200]; +char buf2907[200]; +char buf2908[200]; +char buf2909[200]; +char buf2910[200]; +char buf2911[200]; +char buf2912[200]; +char buf2913[200]; +char buf2914[200]; +char buf2915[200]; +char buf2916[200]; +char buf2917[200]; +char buf2918[200]; +char buf2919[200]; +char buf2920[200]; +char buf2921[200]; +char buf2922[200]; +char buf2923[200]; +char buf2924[200]; +char buf2925[200]; +char buf2926[200]; +char buf2927[200]; +char buf2928[200]; +char buf2929[200]; +char buf2930[200]; +char buf2931[200]; +char buf2932[200]; +char buf2933[200]; +char buf2934[200]; +char buf2935[200]; +char buf2936[200]; +char buf2937[200]; +char buf2938[200]; +char buf2939[200]; +char buf2940[200]; +char buf2941[200]; +char buf2942[200]; +char buf2943[200]; +char buf2944[200]; +char buf2945[200]; +char buf2946[200]; +char buf2947[200]; +char buf2948[200]; +char buf2949[200]; +char buf2950[200]; +char buf2951[200]; +char buf2952[200]; +char buf2953[200]; +char buf2954[200]; +char buf2955[200]; +char buf2956[200]; +char buf2957[200]; +char buf2958[200]; +char buf2959[200]; +char buf2960[200]; +char buf2961[200]; +char buf2962[200]; +char buf2963[200]; +char buf2964[200]; +char buf2965[200]; +char buf2966[200]; +char buf2967[200]; +char buf2968[200]; +char buf2969[200]; +char buf2970[200]; +char buf2971[200]; +char buf2972[200]; +char buf2973[200]; +char buf2974[200]; +char buf2975[200]; +char buf2976[200]; +char buf2977[200]; +char buf2978[200]; +char buf2979[200]; +char buf2980[200]; +char buf2981[200]; +char buf2982[200]; +char buf2983[200]; +char buf2984[200]; +char buf2985[200]; +char buf2986[200]; +char buf2987[200]; +char buf2988[200]; +char buf2989[200]; +char buf2990[200]; +char buf2991[200]; +char buf2992[200]; +char buf2993[200]; +char buf2994[200]; +char buf2995[200]; +char buf2996[200]; +char buf2997[200]; +char buf2998[200]; +char buf2999[200]; +char buf3000[200]; +char buf3001[200]; +char buf3002[200]; +char buf3003[200]; +char buf3004[200]; +char buf3005[200]; +char buf3006[200]; +char buf3007[200]; +char buf3008[200]; +char buf3009[200]; +char buf3010[200]; +char buf3011[200]; +char buf3012[200]; +char buf3013[200]; +char buf3014[200]; +char buf3015[200]; +char buf3016[200]; +char buf3017[200]; +char buf3018[200]; +char buf3019[200]; +char buf3020[200]; +char buf3021[200]; +char buf3022[200]; +char buf3023[200]; +char buf3024[200]; +char buf3025[200]; +char buf3026[200]; +char buf3027[200]; +char buf3028[200]; +char buf3029[200]; +char buf3030[200]; +char buf3031[200]; +char buf3032[200]; +char buf3033[200]; +char buf3034[200]; +char buf3035[200]; +char buf3036[200]; +char buf3037[200]; +char buf3038[200]; +char buf3039[200]; +char buf3040[200]; +char buf3041[200]; +char buf3042[200]; +char buf3043[200]; +char buf3044[200]; +char buf3045[200]; +char buf3046[200]; +char buf3047[200]; +char buf3048[200]; +char buf3049[200]; +char buf3050[200]; +char buf3051[200]; +char buf3052[200]; +char buf3053[200]; +char buf3054[200]; +char buf3055[200]; +char buf3056[200]; +char buf3057[200]; +char buf3058[200]; +char buf3059[200]; +char buf3060[200]; +char buf3061[200]; +char buf3062[200]; +char buf3063[200]; +char buf3064[200]; +char buf3065[200]; +char buf3066[200]; +char buf3067[200]; +char buf3068[200]; +char buf3069[200]; +char buf3070[200]; +char buf3071[200]; +char buf3072[200]; +char buf3073[200]; +char buf3074[200]; +char buf3075[200]; +char buf3076[200]; +char buf3077[200]; +char buf3078[200]; +char buf3079[200]; +char buf3080[200]; +char buf3081[200]; +char buf3082[200]; +char buf3083[200]; +char buf3084[200]; +char buf3085[200]; +char buf3086[200]; +char buf3087[200]; +char buf3088[200]; +char buf3089[200]; +char buf3090[200]; +char buf3091[200]; +char buf3092[200]; +char buf3093[200]; +char buf3094[200]; +char buf3095[200]; +char buf3096[200]; +char buf3097[200]; +char buf3098[200]; +char buf3099[200]; +char buf3100[200]; +char buf3101[200]; +char buf3102[200]; +char buf3103[200]; +char buf3104[200]; +char buf3105[200]; +char buf3106[200]; +char buf3107[200]; +char buf3108[200]; +char buf3109[200]; +char buf3110[200]; +char buf3111[200]; +char buf3112[200]; +char buf3113[200]; +char buf3114[200]; +char buf3115[200]; +char buf3116[200]; +char buf3117[200]; +char buf3118[200]; +char buf3119[200]; +char buf3120[200]; +char buf3121[200]; +char buf3122[200]; +char buf3123[200]; +char buf3124[200]; +char buf3125[200]; +char buf3126[200]; +char buf3127[200]; +char buf3128[200]; +char buf3129[200]; +char buf3130[200]; +char buf3131[200]; +char buf3132[200]; +char buf3133[200]; +char buf3134[200]; +char buf3135[200]; +char buf3136[200]; +char buf3137[200]; +char buf3138[200]; +char buf3139[200]; +char buf3140[200]; +char buf3141[200]; +char buf3142[200]; +char buf3143[200]; +char buf3144[200]; +char buf3145[200]; +char buf3146[200]; +char buf3147[200]; +char buf3148[200]; +char buf3149[200]; +char buf3150[200]; +char buf3151[200]; +char buf3152[200]; +char buf3153[200]; +char buf3154[200]; +char buf3155[200]; +char buf3156[200]; +char buf3157[200]; +char buf3158[200]; +char buf3159[200]; +char buf3160[200]; +char buf3161[200]; +char buf3162[200]; +char buf3163[200]; +char buf3164[200]; +char buf3165[200]; +char buf3166[200]; +char buf3167[200]; +char buf3168[200]; +char buf3169[200]; +char buf3170[200]; +char buf3171[200]; +char buf3172[200]; +char buf3173[200]; +char buf3174[200]; +char buf3175[200]; +char buf3176[200]; +char buf3177[200]; +char buf3178[200]; +char buf3179[200]; +char buf3180[200]; +char buf3181[200]; +char buf3182[200]; +char buf3183[200]; +char buf3184[200]; +char buf3185[200]; +char buf3186[200]; +char buf3187[200]; +char buf3188[200]; +char buf3189[200]; +char buf3190[200]; +char buf3191[200]; +char buf3192[200]; +char buf3193[200]; +char buf3194[200]; +char buf3195[200]; +char buf3196[200]; +char buf3197[200]; +char buf3198[200]; +char buf3199[200]; +char buf3200[200]; +char buf3201[200]; +char buf3202[200]; +char buf3203[200]; +char buf3204[200]; +char buf3205[200]; +char buf3206[200]; +char buf3207[200]; +char buf3208[200]; +char buf3209[200]; +char buf3210[200]; +char buf3211[200]; +char buf3212[200]; +char buf3213[200]; +char buf3214[200]; +char buf3215[200]; +char buf3216[200]; +char buf3217[200]; +char buf3218[200]; +char buf3219[200]; +char buf3220[200]; +char buf3221[200]; +char buf3222[200]; +char buf3223[200]; +char buf3224[200]; +char buf3225[200]; +char buf3226[200]; +char buf3227[200]; +char buf3228[200]; +char buf3229[200]; +char buf3230[200]; +char buf3231[200]; +char buf3232[200]; +char buf3233[200]; +char buf3234[200]; +char buf3235[200]; +char buf3236[200]; +char buf3237[200]; +char buf3238[200]; +char buf3239[200]; +char buf3240[200]; +char buf3241[200]; +char buf3242[200]; +char buf3243[200]; +char buf3244[200]; +char buf3245[200]; +char buf3246[200]; +char buf3247[200]; +char buf3248[200]; +char buf3249[200]; +char buf3250[200]; +char buf3251[200]; +char buf3252[200]; +char buf3253[200]; +char buf3254[200]; +char buf3255[200]; +char buf3256[200]; +char buf3257[200]; +char buf3258[200]; +char buf3259[200]; +char buf3260[200]; +char buf3261[200]; +char buf3262[200]; +char buf3263[200]; +char buf3264[200]; +char buf3265[200]; +char buf3266[200]; +char buf3267[200]; +char buf3268[200]; +char buf3269[200]; +char buf3270[200]; +char buf3271[200]; +char buf3272[200]; +char buf3273[200]; +char buf3274[200]; +char buf3275[200]; +char buf3276[200]; +char buf3277[200]; +char buf3278[200]; +char buf3279[200]; +char buf3280[200]; +char buf3281[200]; +char buf3282[200]; +char buf3283[200]; +char buf3284[200]; +char buf3285[200]; +char buf3286[200]; +char buf3287[200]; +char buf3288[200]; +char buf3289[200]; +char buf3290[200]; +char buf3291[200]; +char buf3292[200]; +char buf3293[200]; +char buf3294[200]; +char buf3295[200]; +char buf3296[200]; +char buf3297[200]; +char buf3298[200]; +char buf3299[200]; +char buf3300[200]; +char buf3301[200]; +char buf3302[200]; +char buf3303[200]; +char buf3304[200]; +char buf3305[200]; +char buf3306[200]; +char buf3307[200]; +char buf3308[200]; +char buf3309[200]; +char buf3310[200]; +char buf3311[200]; +char buf3312[200]; +char buf3313[200]; +char buf3314[200]; +char buf3315[200]; +char buf3316[200]; +char buf3317[200]; +char buf3318[200]; +char buf3319[200]; +char buf3320[200]; +char buf3321[200]; +char buf3322[200]; +char buf3323[200]; +char buf3324[200]; +char buf3325[200]; +char buf3326[200]; +char buf3327[200]; +char buf3328[200]; +char buf3329[200]; +char buf3330[200]; +char buf3331[200]; +char buf3332[200]; +char buf3333[200]; +char buf3334[200]; +char buf3335[200]; +char buf3336[200]; +char buf3337[200]; +char buf3338[200]; +char buf3339[200]; +char buf3340[200]; +char buf3341[200]; +char buf3342[200]; +char buf3343[200]; +char buf3344[200]; +char buf3345[200]; +char buf3346[200]; +char buf3347[200]; +char buf3348[200]; +char buf3349[200]; +char buf3350[200]; +char buf3351[200]; +char buf3352[200]; +char buf3353[200]; +char buf3354[200]; +char buf3355[200]; +char buf3356[200]; +char buf3357[200]; +char buf3358[200]; +char buf3359[200]; +char buf3360[200]; +char buf3361[200]; +char buf3362[200]; +char buf3363[200]; +char buf3364[200]; +char buf3365[200]; +char buf3366[200]; +char buf3367[200]; +char buf3368[200]; +char buf3369[200]; +char buf3370[200]; +char buf3371[200]; +char buf3372[200]; +char buf3373[200]; +char buf3374[200]; +char buf3375[200]; +char buf3376[200]; +char buf3377[200]; +char buf3378[200]; +char buf3379[200]; +char buf3380[200]; +char buf3381[200]; +char buf3382[200]; +char buf3383[200]; +char buf3384[200]; +char buf3385[200]; +char buf3386[200]; +char buf3387[200]; +char buf3388[200]; +char buf3389[200]; +char buf3390[200]; +char buf3391[200]; +char buf3392[200]; +char buf3393[200]; +char buf3394[200]; +char buf3395[200]; +char buf3396[200]; +char buf3397[200]; +char buf3398[200]; +char buf3399[200]; +char buf3400[200]; +char buf3401[200]; +char buf3402[200]; +char buf3403[200]; +char buf3404[200]; +char buf3405[200]; +char buf3406[200]; +char buf3407[200]; +char buf3408[200]; +char buf3409[200]; +char buf3410[200]; +char buf3411[200]; +char buf3412[200]; +char buf3413[200]; +char buf3414[200]; +char buf3415[200]; +char buf3416[200]; +char buf3417[200]; +char buf3418[200]; +char buf3419[200]; +char buf3420[200]; +char buf3421[200]; +char buf3422[200]; +char buf3423[200]; +char buf3424[200]; +char buf3425[200]; +char buf3426[200]; +char buf3427[200]; +char buf3428[200]; +char buf3429[200]; +char buf3430[200]; +char buf3431[200]; +char buf3432[200]; +char buf3433[200]; +char buf3434[200]; +char buf3435[200]; +char buf3436[200]; +char buf3437[200]; +char buf3438[200]; +char buf3439[200]; +char buf3440[200]; +char buf3441[200]; +char buf3442[200]; +char buf3443[200]; +char buf3444[200]; +char buf3445[200]; +char buf3446[200]; +char buf3447[200]; +char buf3448[200]; +char buf3449[200]; +char buf3450[200]; +char buf3451[200]; +char buf3452[200]; +char buf3453[200]; +char buf3454[200]; +char buf3455[200]; +char buf3456[200]; +char buf3457[200]; +char buf3458[200]; +char buf3459[200]; +char buf3460[200]; +char buf3461[200]; +char buf3462[200]; +char buf3463[200]; +char buf3464[200]; +char buf3465[200]; +char buf3466[200]; +char buf3467[200]; +char buf3468[200]; +char buf3469[200]; +char buf3470[200]; +char buf3471[200]; +char buf3472[200]; +char buf3473[200]; +char buf3474[200]; +char buf3475[200]; +char buf3476[200]; +char buf3477[200]; +char buf3478[200]; +char buf3479[200]; +char buf3480[200]; +char buf3481[200]; +char buf3482[200]; +char buf3483[200]; +char buf3484[200]; +char buf3485[200]; +char buf3486[200]; +char buf3487[200]; +char buf3488[200]; +char buf3489[200]; +char buf3490[200]; +char buf3491[200]; +char buf3492[200]; +char buf3493[200]; +char buf3494[200]; +char buf3495[200]; +char buf3496[200]; +char buf3497[200]; +char buf3498[200]; +char buf3499[200]; +char buf3500[200]; +char buf3501[200]; +char buf3502[200]; +char buf3503[200]; +char buf3504[200]; +char buf3505[200]; +char buf3506[200]; +char buf3507[200]; +char buf3508[200]; +char buf3509[200]; +char buf3510[200]; +char buf3511[200]; +char buf3512[200]; +char buf3513[200]; +char buf3514[200]; +char buf3515[200]; +char buf3516[200]; +char buf3517[200]; +char buf3518[200]; +char buf3519[200]; +char buf3520[200]; +char buf3521[200]; +char buf3522[200]; +char buf3523[200]; +char buf3524[200]; +char buf3525[200]; +char buf3526[200]; +char buf3527[200]; +char buf3528[200]; +char buf3529[200]; +char buf3530[200]; +char buf3531[200]; +char buf3532[200]; +char buf3533[200]; +char buf3534[200]; +char buf3535[200]; +char buf3536[200]; +char buf3537[200]; +char buf3538[200]; +char buf3539[200]; +char buf3540[200]; +char buf3541[200]; +char buf3542[200]; +char buf3543[200]; +char buf3544[200]; +char buf3545[200]; +char buf3546[200]; +char buf3547[200]; +char buf3548[200]; +char buf3549[200]; +char buf3550[200]; +char buf3551[200]; +char buf3552[200]; +char buf3553[200]; +char buf3554[200]; +char buf3555[200]; +char buf3556[200]; +char buf3557[200]; +char buf3558[200]; +char buf3559[200]; +char buf3560[200]; +char buf3561[200]; +char buf3562[200]; +char buf3563[200]; +char buf3564[200]; +char buf3565[200]; +char buf3566[200]; +char buf3567[200]; +char buf3568[200]; +char buf3569[200]; +char buf3570[200]; +char buf3571[200]; +char buf3572[200]; +char buf3573[200]; +char buf3574[200]; +char buf3575[200]; +char buf3576[200]; +char buf3577[200]; +char buf3578[200]; +char buf3579[200]; +char buf3580[200]; +char buf3581[200]; +char buf3582[200]; +char buf3583[200]; +char buf3584[200]; +char buf3585[200]; +char buf3586[200]; +char buf3587[200]; +char buf3588[200]; +char buf3589[200]; +char buf3590[200]; +char buf3591[200]; +char buf3592[200]; +char buf3593[200]; +char buf3594[200]; +char buf3595[200]; +char buf3596[200]; +char buf3597[200]; +char buf3598[200]; +char buf3599[200]; +char buf3600[200]; +char buf3601[200]; +char buf3602[200]; +char buf3603[200]; +char buf3604[200]; +char buf3605[200]; +char buf3606[200]; +char buf3607[200]; +char buf3608[200]; +char buf3609[200]; +char buf3610[200]; +char buf3611[200]; +char buf3612[200]; +char buf3613[200]; +char buf3614[200]; +char buf3615[200]; +char buf3616[200]; +char buf3617[200]; +char buf3618[200]; +char buf3619[200]; +char buf3620[200]; +char buf3621[200]; +char buf3622[200]; +char buf3623[200]; +char buf3624[200]; +char buf3625[200]; +char buf3626[200]; +char buf3627[200]; +char buf3628[200]; +char buf3629[200]; +char buf3630[200]; +char buf3631[200]; +char buf3632[200]; +char buf3633[200]; +char buf3634[200]; +char buf3635[200]; +char buf3636[200]; +char buf3637[200]; +char buf3638[200]; +char buf3639[200]; +char buf3640[200]; +char buf3641[200]; +char buf3642[200]; +char buf3643[200]; +char buf3644[200]; +char buf3645[200]; +char buf3646[200]; +char buf3647[200]; +char buf3648[200]; +char buf3649[200]; +char buf3650[200]; +char buf3651[200]; +char buf3652[200]; +char buf3653[200]; +char buf3654[200]; +char buf3655[200]; +char buf3656[200]; +char buf3657[200]; +char buf3658[200]; +char buf3659[200]; +char buf3660[200]; +char buf3661[200]; +char buf3662[200]; +char buf3663[200]; +char buf3664[200]; +char buf3665[200]; +char buf3666[200]; +char buf3667[200]; +char buf3668[200]; +char buf3669[200]; +char buf3670[200]; +char buf3671[200]; +char buf3672[200]; +char buf3673[200]; +char buf3674[200]; +char buf3675[200]; +char buf3676[200]; +char buf3677[200]; +char buf3678[200]; +char buf3679[200]; +char buf3680[200]; +char buf3681[200]; +char buf3682[200]; +char buf3683[200]; +char buf3684[200]; +char buf3685[200]; +char buf3686[200]; +char buf3687[200]; +char buf3688[200]; +char buf3689[200]; +char buf3690[200]; +char buf3691[200]; +char buf3692[200]; +char buf3693[200]; +char buf3694[200]; +char buf3695[200]; +char buf3696[200]; +char buf3697[200]; +char buf3698[200]; +char buf3699[200]; +char buf3700[200]; +char buf3701[200]; +char buf3702[200]; +char buf3703[200]; +char buf3704[200]; +char buf3705[200]; +char buf3706[200]; +char buf3707[200]; +char buf3708[200]; +char buf3709[200]; +char buf3710[200]; +char buf3711[200]; +char buf3712[200]; +char buf3713[200]; +char buf3714[200]; +char buf3715[200]; +char buf3716[200]; +char buf3717[200]; +char buf3718[200]; +char buf3719[200]; +char buf3720[200]; +char buf3721[200]; +char buf3722[200]; +char buf3723[200]; +char buf3724[200]; +char buf3725[200]; +char buf3726[200]; +char buf3727[200]; +char buf3728[200]; +char buf3729[200]; +char buf3730[200]; +char buf3731[200]; +char buf3732[200]; +char buf3733[200]; +char buf3734[200]; +char buf3735[200]; +char buf3736[200]; +char buf3737[200]; +char buf3738[200]; +char buf3739[200]; +char buf3740[200]; +char buf3741[200]; +char buf3742[200]; +char buf3743[200]; +char buf3744[200]; +char buf3745[200]; +char buf3746[200]; +char buf3747[200]; +char buf3748[200]; +char buf3749[200]; +char buf3750[200]; +char buf3751[200]; +char buf3752[200]; +char buf3753[200]; +char buf3754[200]; +char buf3755[200]; +char buf3756[200]; +char buf3757[200]; +char buf3758[200]; +char buf3759[200]; +char buf3760[200]; +char buf3761[200]; +char buf3762[200]; +char buf3763[200]; +char buf3764[200]; +char buf3765[200]; +char buf3766[200]; +char buf3767[200]; +char buf3768[200]; +char buf3769[200]; +char buf3770[200]; +char buf3771[200]; +char buf3772[200]; +char buf3773[200]; +char buf3774[200]; +char buf3775[200]; +char buf3776[200]; +char buf3777[200]; +char buf3778[200]; +char buf3779[200]; +char buf3780[200]; +char buf3781[200]; +char buf3782[200]; +char buf3783[200]; +char buf3784[200]; +char buf3785[200]; +char buf3786[200]; +char buf3787[200]; +char buf3788[200]; +char buf3789[200]; +char buf3790[200]; +char buf3791[200]; +char buf3792[200]; +char buf3793[200]; +char buf3794[200]; +char buf3795[200]; +char buf3796[200]; +char buf3797[200]; +char buf3798[200]; +char buf3799[200]; +char buf3800[200]; +char buf3801[200]; +char buf3802[200]; +char buf3803[200]; +char buf3804[200]; +char buf3805[200]; +char buf3806[200]; +char buf3807[200]; +char buf3808[200]; +char buf3809[200]; +char buf3810[200]; +char buf3811[200]; +char buf3812[200]; +char buf3813[200]; +char buf3814[200]; +char buf3815[200]; +char buf3816[200]; +char buf3817[200]; +char buf3818[200]; +char buf3819[200]; +char buf3820[200]; +char buf3821[200]; +char buf3822[200]; +char buf3823[200]; +char buf3824[200]; +char buf3825[200]; +char buf3826[200]; +char buf3827[200]; +char buf3828[200]; +char buf3829[200]; +char buf3830[200]; +char buf3831[200]; +char buf3832[200]; +char buf3833[200]; +char buf3834[200]; +char buf3835[200]; +char buf3836[200]; +char buf3837[200]; +char buf3838[200]; +char buf3839[200]; +char buf3840[200]; +char buf3841[200]; +char buf3842[200]; +char buf3843[200]; +char buf3844[200]; +char buf3845[200]; +char buf3846[200]; +char buf3847[200]; +char buf3848[200]; +char buf3849[200]; +char buf3850[200]; +char buf3851[200]; +char buf3852[200]; +char buf3853[200]; +char buf3854[200]; +char buf3855[200]; +char buf3856[200]; +char buf3857[200]; +char buf3858[200]; +char buf3859[200]; +char buf3860[200]; +char buf3861[200]; +char buf3862[200]; +char buf3863[200]; +char buf3864[200]; +char buf3865[200]; +char buf3866[200]; +char buf3867[200]; +char buf3868[200]; +char buf3869[200]; +char buf3870[200]; +char buf3871[200]; +char buf3872[200]; +char buf3873[200]; +char buf3874[200]; +char buf3875[200]; +char buf3876[200]; +char buf3877[200]; +char buf3878[200]; +char buf3879[200]; +char buf3880[200]; +char buf3881[200]; +char buf3882[200]; +char buf3883[200]; +char buf3884[200]; +char buf3885[200]; +char buf3886[200]; +char buf3887[200]; +char buf3888[200]; +char buf3889[200]; +char buf3890[200]; +char buf3891[200]; +char buf3892[200]; +char buf3893[200]; +char buf3894[200]; +char buf3895[200]; +char buf3896[200]; +char buf3897[200]; +char buf3898[200]; +char buf3899[200]; +char buf3900[200]; +char buf3901[200]; +char buf3902[200]; +char buf3903[200]; +char buf3904[200]; +char buf3905[200]; +char buf3906[200]; +char buf3907[200]; +char buf3908[200]; +char buf3909[200]; +char buf3910[200]; +char buf3911[200]; +char buf3912[200]; +char buf3913[200]; +char buf3914[200]; +char buf3915[200]; +char buf3916[200]; +char buf3917[200]; +char buf3918[200]; +char buf3919[200]; +char buf3920[200]; +char buf3921[200]; +char buf3922[200]; +char buf3923[200]; +char buf3924[200]; +char buf3925[200]; +char buf3926[200]; +char buf3927[200]; +char buf3928[200]; +char buf3929[200]; +char buf3930[200]; +char buf3931[200]; +char buf3932[200]; +char buf3933[200]; +char buf3934[200]; +char buf3935[200]; +char buf3936[200]; +char buf3937[200]; +char buf3938[200]; +char buf3939[200]; +char buf3940[200]; +char buf3941[200]; +char buf3942[200]; +char buf3943[200]; +char buf3944[200]; +char buf3945[200]; +char buf3946[200]; +char buf3947[200]; +char buf3948[200]; +char buf3949[200]; +char buf3950[200]; +char buf3951[200]; +char buf3952[200]; +char buf3953[200]; +char buf3954[200]; +char buf3955[200]; +char buf3956[200]; +char buf3957[200]; +char buf3958[200]; +char buf3959[200]; +char buf3960[200]; +char buf3961[200]; +char buf3962[200]; +char buf3963[200]; +char buf3964[200]; +char buf3965[200]; +char buf3966[200]; +char buf3967[200]; +char buf3968[200]; +char buf3969[200]; +char buf3970[200]; +char buf3971[200]; +char buf3972[200]; +char buf3973[200]; +char buf3974[200]; +char buf3975[200]; +char buf3976[200]; +char buf3977[200]; +char buf3978[200]; +char buf3979[200]; +char buf3980[200]; +char buf3981[200]; +char buf3982[200]; +char buf3983[200]; +char buf3984[200]; +char buf3985[200]; +char buf3986[200]; +char buf3987[200]; +char buf3988[200]; +char buf3989[200]; +char buf3990[200]; +char buf3991[200]; +char buf3992[200]; +char buf3993[200]; +char buf3994[200]; +char buf3995[200]; +char buf3996[200]; +char buf3997[200]; +char buf3998[200]; +char buf3999[200]; +char buf4000[200]; +char buf4001[200]; +char buf4002[200]; +char buf4003[200]; +char buf4004[200]; +char buf4005[200]; +char buf4006[200]; +char buf4007[200]; +char buf4008[200]; +char buf4009[200]; +char buf4010[200]; +char buf4011[200]; +char buf4012[200]; +char buf4013[200]; +char buf4014[200]; +char buf4015[200]; +char buf4016[200]; +char buf4017[200]; +char buf4018[200]; +char buf4019[200]; +char buf4020[200]; +char buf4021[200]; +char buf4022[200]; +char buf4023[200]; +char buf4024[200]; +char buf4025[200]; +char buf4026[200]; +char buf4027[200]; +char buf4028[200]; +char buf4029[200]; +char buf4030[200]; +char buf4031[200]; +char buf4032[200]; +char buf4033[200]; +char buf4034[200]; +char buf4035[200]; +char buf4036[200]; +char buf4037[200]; +char buf4038[200]; +char buf4039[200]; +char buf4040[200]; +char buf4041[200]; +char buf4042[200]; +char buf4043[200]; +char buf4044[200]; +char buf4045[200]; +char buf4046[200]; +char buf4047[200]; +char buf4048[200]; +char buf4049[200]; +char buf4050[200]; +char buf4051[200]; +char buf4052[200]; +char buf4053[200]; +char buf4054[200]; +char buf4055[200]; +char buf4056[200]; +char buf4057[200]; +char buf4058[200]; +char buf4059[200]; +char buf4060[200]; +char buf4061[200]; +char buf4062[200]; +char buf4063[200]; +char buf4064[200]; +char buf4065[200]; +char buf4066[200]; +char buf4067[200]; +char buf4068[200]; +char buf4069[200]; +char buf4070[200]; +char buf4071[200]; +char buf4072[200]; +char buf4073[200]; +char buf4074[200]; +char buf4075[200]; +char buf4076[200]; +char buf4077[200]; +char buf4078[200]; +char buf4079[200]; +char buf4080[200]; +char buf4081[200]; +char buf4082[200]; +char buf4083[200]; +char buf4084[200]; +char buf4085[200]; +char buf4086[200]; +char buf4087[200]; +char buf4088[200]; +char buf4089[200]; +char buf4090[200]; +char buf4091[200]; +char buf4092[200]; +char buf4093[200]; +char buf4094[200]; +char buf4095[200]; +char buf4096[200]; +char buf4097[200]; +char buf4098[200]; +char buf4099[200]; +char buf4100[200]; +char buf4101[200]; +char buf4102[200]; +char buf4103[200]; +char buf4104[200]; +char buf4105[200]; +char buf4106[200]; +char buf4107[200]; +char buf4108[200]; +char buf4109[200]; +char buf4110[200]; +char buf4111[200]; +char buf4112[200]; +char buf4113[200]; +char buf4114[200]; +char buf4115[200]; +char buf4116[200]; +char buf4117[200]; +char buf4118[200]; +char buf4119[200]; +char buf4120[200]; +char buf4121[200]; +char buf4122[200]; +char buf4123[200]; +char buf4124[200]; +char buf4125[200]; +char buf4126[200]; +char buf4127[200]; +char buf4128[200]; +char buf4129[200]; +char buf4130[200]; +char buf4131[200]; +char buf4132[200]; +char buf4133[200]; +char buf4134[200]; +char buf4135[200]; +char buf4136[200]; +char buf4137[200]; +char buf4138[200]; +char buf4139[200]; +char buf4140[200]; +char buf4141[200]; +char buf4142[200]; +char buf4143[200]; +char buf4144[200]; +char buf4145[200]; +char buf4146[200]; +char buf4147[200]; +char buf4148[200]; +char buf4149[200]; +char buf4150[200]; +char buf4151[200]; +char buf4152[200]; +char buf4153[200]; +char buf4154[200]; +char buf4155[200]; +char buf4156[200]; +char buf4157[200]; +char buf4158[200]; +char buf4159[200]; +char buf4160[200]; +char buf4161[200]; +char buf4162[200]; +char buf4163[200]; +char buf4164[200]; +char buf4165[200]; +char buf4166[200]; +char buf4167[200]; +char buf4168[200]; +char buf4169[200]; +char buf4170[200]; +char buf4171[200]; +char buf4172[200]; +char buf4173[200]; +char buf4174[200]; +char buf4175[200]; +char buf4176[200]; +char buf4177[200]; +char buf4178[200]; +char buf4179[200]; +char buf4180[200]; +char buf4181[200]; +char buf4182[200]; +char buf4183[200]; +char buf4184[200]; +char buf4185[200]; +char buf4186[200]; +char buf4187[200]; +char buf4188[200]; +char buf4189[200]; +char buf4190[200]; +char buf4191[200]; +char buf4192[200]; +char buf4193[200]; +char buf4194[200]; +char buf4195[200]; +char buf4196[200]; +char buf4197[200]; +char buf4198[200]; +char buf4199[200]; +char buf4200[200]; +char buf4201[200]; +char buf4202[200]; +char buf4203[200]; +char buf4204[200]; +char buf4205[200]; +char buf4206[200]; +char buf4207[200]; +char buf4208[200]; +char buf4209[200]; +char buf4210[200]; +char buf4211[200]; +char buf4212[200]; +char buf4213[200]; +char buf4214[200]; +char buf4215[200]; +char buf4216[200]; +char buf4217[200]; +char buf4218[200]; +char buf4219[200]; +char buf4220[200]; +char buf4221[200]; +char buf4222[200]; +char buf4223[200]; +char buf4224[200]; +char buf4225[200]; +char buf4226[200]; +char buf4227[200]; +char buf4228[200]; +char buf4229[200]; +char buf4230[200]; +char buf4231[200]; +char buf4232[200]; +char buf4233[200]; +char buf4234[200]; +char buf4235[200]; +char buf4236[200]; +char buf4237[200]; +char buf4238[200]; +char buf4239[200]; +char buf4240[200]; +char buf4241[200]; +char buf4242[200]; +char buf4243[200]; +char buf4244[200]; +char buf4245[200]; +char buf4246[200]; +char buf4247[200]; +char buf4248[200]; +char buf4249[200]; +char buf4250[200]; +char buf4251[200]; +char buf4252[200]; +char buf4253[200]; +char buf4254[200]; +char buf4255[200]; +char buf4256[200]; +char buf4257[200]; +char buf4258[200]; +char buf4259[200]; +char buf4260[200]; +char buf4261[200]; +char buf4262[200]; +char buf4263[200]; +char buf4264[200]; +char buf4265[200]; +char buf4266[200]; +char buf4267[200]; +char buf4268[200]; +char buf4269[200]; +char buf4270[200]; +char buf4271[200]; +char buf4272[200]; +char buf4273[200]; +char buf4274[200]; +char buf4275[200]; +char buf4276[200]; +char buf4277[200]; +char buf4278[200]; +char buf4279[200]; +char buf4280[200]; +char buf4281[200]; +char buf4282[200]; +char buf4283[200]; +char buf4284[200]; +char buf4285[200]; +char buf4286[200]; +char buf4287[200]; +char buf4288[200]; +char buf4289[200]; +char buf4290[200]; +char buf4291[200]; +char buf4292[200]; +char buf4293[200]; +char buf4294[200]; +char buf4295[200]; +char buf4296[200]; +char buf4297[200]; +char buf4298[200]; +char buf4299[200]; +char buf4300[200]; +char buf4301[200]; +char buf4302[200]; +char buf4303[200]; +char buf4304[200]; +char buf4305[200]; +char buf4306[200]; +char buf4307[200]; +char buf4308[200]; +char buf4309[200]; +char buf4310[200]; +char buf4311[200]; +char buf4312[200]; +char buf4313[200]; +char buf4314[200]; +char buf4315[200]; +char buf4316[200]; +char buf4317[200]; +char buf4318[200]; +char buf4319[200]; +char buf4320[200]; +char buf4321[200]; +char buf4322[200]; +char buf4323[200]; +char buf4324[200]; +char buf4325[200]; +char buf4326[200]; +char buf4327[200]; +char buf4328[200]; +char buf4329[200]; +char buf4330[200]; +char buf4331[200]; +char buf4332[200]; +char buf4333[200]; +char buf4334[200]; +char buf4335[200]; +char buf4336[200]; +char buf4337[200]; +char buf4338[200]; +char buf4339[200]; +char buf4340[200]; +char buf4341[200]; +char buf4342[200]; +char buf4343[200]; +char buf4344[200]; +char buf4345[200]; +char buf4346[200]; +char buf4347[200]; +char buf4348[200]; +char buf4349[200]; +char buf4350[200]; +char buf4351[200]; +char buf4352[200]; +char buf4353[200]; +char buf4354[200]; +char buf4355[200]; +char buf4356[200]; +char buf4357[200]; +char buf4358[200]; +char buf4359[200]; +char buf4360[200]; +char buf4361[200]; +char buf4362[200]; +char buf4363[200]; +char buf4364[200]; +char buf4365[200]; +char buf4366[200]; +char buf4367[200]; +char buf4368[200]; +char buf4369[200]; +char buf4370[200]; +char buf4371[200]; +char buf4372[200]; +char buf4373[200]; +char buf4374[200]; +char buf4375[200]; +char buf4376[200]; +char buf4377[200]; +char buf4378[200]; +char buf4379[200]; +char buf4380[200]; +char buf4381[200]; +char buf4382[200]; +char buf4383[200]; +char buf4384[200]; +char buf4385[200]; +char buf4386[200]; +char buf4387[200]; +char buf4388[200]; +char buf4389[200]; +char buf4390[200]; +char buf4391[200]; +char buf4392[200]; +char buf4393[200]; +char buf4394[200]; +char buf4395[200]; +char buf4396[200]; +char buf4397[200]; +char buf4398[200]; +char buf4399[200]; +char buf4400[200]; +char buf4401[200]; +char buf4402[200]; +char buf4403[200]; +char buf4404[200]; +char buf4405[200]; +char buf4406[200]; +char buf4407[200]; +char buf4408[200]; +char buf4409[200]; +char buf4410[200]; +char buf4411[200]; +char buf4412[200]; +char buf4413[200]; +char buf4414[200]; +char buf4415[200]; +char buf4416[200]; +char buf4417[200]; +char buf4418[200]; +char buf4419[200]; +char buf4420[200]; +char buf4421[200]; +char buf4422[200]; +char buf4423[200]; +char buf4424[200]; +char buf4425[200]; +char buf4426[200]; +char buf4427[200]; +char buf4428[200]; +char buf4429[200]; +char buf4430[200]; +char buf4431[200]; +char buf4432[200]; +char buf4433[200]; +char buf4434[200]; +char buf4435[200]; +char buf4436[200]; +char buf4437[200]; +char buf4438[200]; +char buf4439[200]; +char buf4440[200]; +char buf4441[200]; +char buf4442[200]; +char buf4443[200]; +char buf4444[200]; +char buf4445[200]; +char buf4446[200]; +char buf4447[200]; +char buf4448[200]; +char buf4449[200]; +char buf4450[200]; +char buf4451[200]; +char buf4452[200]; +char buf4453[200]; +char buf4454[200]; +char buf4455[200]; +char buf4456[200]; +char buf4457[200]; +char buf4458[200]; +char buf4459[200]; +char buf4460[200]; +char buf4461[200]; +char buf4462[200]; +char buf4463[200]; +char buf4464[200]; +char buf4465[200]; +char buf4466[200]; +char buf4467[200]; +char buf4468[200]; +char buf4469[200]; +char buf4470[200]; +char buf4471[200]; +char buf4472[200]; +char buf4473[200]; +char buf4474[200]; +char buf4475[200]; +char buf4476[200]; +char buf4477[200]; +char buf4478[200]; +char buf4479[200]; +char buf4480[200]; +char buf4481[200]; +char buf4482[200]; +char buf4483[200]; +char buf4484[200]; +char buf4485[200]; +char buf4486[200]; +char buf4487[200]; +char buf4488[200]; +char buf4489[200]; +char buf4490[200]; +char buf4491[200]; +char buf4492[200]; +char buf4493[200]; +char buf4494[200]; +char buf4495[200]; +char buf4496[200]; +char buf4497[200]; +char buf4498[200]; +char buf4499[200]; +char buf4500[200]; +char buf4501[200]; +char buf4502[200]; +char buf4503[200]; +char buf4504[200]; +char buf4505[200]; +char buf4506[200]; +char buf4507[200]; +char buf4508[200]; +char buf4509[200]; +char buf4510[200]; +char buf4511[200]; +char buf4512[200]; +char buf4513[200]; +char buf4514[200]; +char buf4515[200]; +char buf4516[200]; +char buf4517[200]; +char buf4518[200]; +char buf4519[200]; +char buf4520[200]; +char buf4521[200]; +char buf4522[200]; +char buf4523[200]; +char buf4524[200]; +char buf4525[200]; +char buf4526[200]; +char buf4527[200]; +char buf4528[200]; +char buf4529[200]; +char buf4530[200]; +char buf4531[200]; +char buf4532[200]; +char buf4533[200]; +char buf4534[200]; +char buf4535[200]; +char buf4536[200]; +char buf4537[200]; +char buf4538[200]; +char buf4539[200]; +char buf4540[200]; +char buf4541[200]; +char buf4542[200]; +char buf4543[200]; +char buf4544[200]; +char buf4545[200]; +char buf4546[200]; +char buf4547[200]; +char buf4548[200]; +char buf4549[200]; +char buf4550[200]; +char buf4551[200]; +char buf4552[200]; +char buf4553[200]; +char buf4554[200]; +char buf4555[200]; +char buf4556[200]; +char buf4557[200]; +char buf4558[200]; +char buf4559[200]; +char buf4560[200]; +char buf4561[200]; +char buf4562[200]; +char buf4563[200]; +char buf4564[200]; +char buf4565[200]; +char buf4566[200]; +char buf4567[200]; +char buf4568[200]; +char buf4569[200]; +char buf4570[200]; +char buf4571[200]; +char buf4572[200]; +char buf4573[200]; +char buf4574[200]; +char buf4575[200]; +char buf4576[200]; +char buf4577[200]; +char buf4578[200]; +char buf4579[200]; +char buf4580[200]; +char buf4581[200]; +char buf4582[200]; +char buf4583[200]; +char buf4584[200]; +char buf4585[200]; +char buf4586[200]; +char buf4587[200]; +char buf4588[200]; +char buf4589[200]; +char buf4590[200]; +char buf4591[200]; +char buf4592[200]; +char buf4593[200]; +char buf4594[200]; +char buf4595[200]; +char buf4596[200]; +char buf4597[200]; +char buf4598[200]; +char buf4599[200]; +char buf4600[200]; +char buf4601[200]; +char buf4602[200]; +char buf4603[200]; +char buf4604[200]; +char buf4605[200]; +char buf4606[200]; +char buf4607[200]; +char buf4608[200]; +char buf4609[200]; +char buf4610[200]; +char buf4611[200]; +char buf4612[200]; +char buf4613[200]; +char buf4614[200]; +char buf4615[200]; +char buf4616[200]; +char buf4617[200]; +char buf4618[200]; +char buf4619[200]; +char buf4620[200]; +char buf4621[200]; +char buf4622[200]; +char buf4623[200]; +char buf4624[200]; +char buf4625[200]; +char buf4626[200]; +char buf4627[200]; +char buf4628[200]; +char buf4629[200]; +char buf4630[200]; +char buf4631[200]; +char buf4632[200]; +char buf4633[200]; +char buf4634[200]; +char buf4635[200]; +char buf4636[200]; +char buf4637[200]; +char buf4638[200]; +char buf4639[200]; +char buf4640[200]; +char buf4641[200]; +char buf4642[200]; +char buf4643[200]; +char buf4644[200]; +char buf4645[200]; +char buf4646[200]; +char buf4647[200]; +char buf4648[200]; +char buf4649[200]; +char buf4650[200]; +char buf4651[200]; +char buf4652[200]; +char buf4653[200]; +char buf4654[200]; +char buf4655[200]; +char buf4656[200]; +char buf4657[200]; +char buf4658[200]; +char buf4659[200]; +char buf4660[200]; +char buf4661[200]; +char buf4662[200]; +char buf4663[200]; +char buf4664[200]; +char buf4665[200]; +char buf4666[200]; +char buf4667[200]; +char buf4668[200]; +char buf4669[200]; +char buf4670[200]; +char buf4671[200]; +char buf4672[200]; +char buf4673[200]; +char buf4674[200]; +char buf4675[200]; +char buf4676[200]; +char buf4677[200]; +char buf4678[200]; +char buf4679[200]; +char buf4680[200]; +char buf4681[200]; +char buf4682[200]; +char buf4683[200]; +char buf4684[200]; +char buf4685[200]; +char buf4686[200]; +char buf4687[200]; +char buf4688[200]; +char buf4689[200]; +char buf4690[200]; +char buf4691[200]; +char buf4692[200]; +char buf4693[200]; +char buf4694[200]; +char buf4695[200]; +char buf4696[200]; +char buf4697[200]; +char buf4698[200]; +char buf4699[200]; +char buf4700[200]; +char buf4701[200]; +char buf4702[200]; +char buf4703[200]; +char buf4704[200]; +char buf4705[200]; +char buf4706[200]; +char buf4707[200]; +char buf4708[200]; +char buf4709[200]; +char buf4710[200]; +char buf4711[200]; +char buf4712[200]; +char buf4713[200]; +char buf4714[200]; +char buf4715[200]; +char buf4716[200]; +char buf4717[200]; +char buf4718[200]; +char buf4719[200]; +char buf4720[200]; +char buf4721[200]; +char buf4722[200]; +char buf4723[200]; +char buf4724[200]; +char buf4725[200]; +char buf4726[200]; +char buf4727[200]; +char buf4728[200]; +char buf4729[200]; +char buf4730[200]; +char buf4731[200]; +char buf4732[200]; +char buf4733[200]; +char buf4734[200]; +char buf4735[200]; +char buf4736[200]; +char buf4737[200]; +char buf4738[200]; +char buf4739[200]; +char buf4740[200]; +char buf4741[200]; +char buf4742[200]; +char buf4743[200]; +char buf4744[200]; +char buf4745[200]; +char buf4746[200]; +char buf4747[200]; +char buf4748[200]; +char buf4749[200]; +char buf4750[200]; +char buf4751[200]; +char buf4752[200]; +char buf4753[200]; +char buf4754[200]; +char buf4755[200]; +char buf4756[200]; +char buf4757[200]; +char buf4758[200]; +char buf4759[200]; +char buf4760[200]; +char buf4761[200]; +char buf4762[200]; +char buf4763[200]; +char buf4764[200]; +char buf4765[200]; +char buf4766[200]; + +void RS_KERNEL test(int in) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clamp(*(char*)buf165, *(char*)buf166, *(char*)buf167); + *(char2*)buf168 = clamp(*(char2*)buf169, *(char2*)buf170, *(char2*)buf171); + *(char3*)buf172 = clamp(*(char3*)buf173, *(char3*)buf174, *(char3*)buf175); + *(char4*)buf176 = clamp(*(char4*)buf177, *(char4*)buf178, *(char4*)buf179); + *(uchar*)buf180 = clamp(*(uchar*)buf181, *(uchar*)buf182, *(uchar*)buf183); + *(uchar2*)buf184 = clamp(*(uchar2*)buf185, *(uchar2*)buf186, *(uchar2*)buf187); + *(uchar3*)buf188 = clamp(*(uchar3*)buf189, *(uchar3*)buf190, *(uchar3*)buf191); + *(uchar4*)buf192 = clamp(*(uchar4*)buf193, *(uchar4*)buf194, *(uchar4*)buf195); + *(short*)buf196 = clamp(*(short*)buf197, *(short*)buf198, *(short*)buf199); + *(short2*)buf200 = clamp(*(short2*)buf201, *(short2*)buf202, *(short2*)buf203); + *(short3*)buf204 = clamp(*(short3*)buf205, *(short3*)buf206, *(short3*)buf207); + *(short4*)buf208 = clamp(*(short4*)buf209, *(short4*)buf210, *(short4*)buf211); + *(ushort*)buf212 = clamp(*(ushort*)buf213, *(ushort*)buf214, *(ushort*)buf215); + *(ushort2*)buf216 = clamp(*(ushort2*)buf217, *(ushort2*)buf218, *(ushort2*)buf219); + *(ushort3*)buf220 = clamp(*(ushort3*)buf221, *(ushort3*)buf222, *(ushort3*)buf223); + *(ushort4*)buf224 = clamp(*(ushort4*)buf225, *(ushort4*)buf226, *(ushort4*)buf227); + *(int*)buf228 = clamp(*(int*)buf229, *(int*)buf230, *(int*)buf231); + *(int2*)buf232 = clamp(*(int2*)buf233, *(int2*)buf234, *(int2*)buf235); + *(int3*)buf236 = clamp(*(int3*)buf237, *(int3*)buf238, *(int3*)buf239); + *(int4*)buf240 = clamp(*(int4*)buf241, *(int4*)buf242, *(int4*)buf243); + *(uint*)buf244 = clamp(*(uint*)buf245, *(uint*)buf246, *(uint*)buf247); + *(uint2*)buf248 = clamp(*(uint2*)buf249, *(uint2*)buf250, *(uint2*)buf251); + *(uint3*)buf252 = clamp(*(uint3*)buf253, *(uint3*)buf254, *(uint3*)buf255); + *(uint4*)buf256 = clamp(*(uint4*)buf257, *(uint4*)buf258, *(uint4*)buf259); + *(long*)buf260 = clamp(*(long*)buf261, *(long*)buf262, *(long*)buf263); + *(long2*)buf264 = clamp(*(long2*)buf265, *(long2*)buf266, *(long2*)buf267); + *(long3*)buf268 = clamp(*(long3*)buf269, *(long3*)buf270, *(long3*)buf271); + *(long4*)buf272 = clamp(*(long4*)buf273, *(long4*)buf274, *(long4*)buf275); + *(ulong*)buf276 = clamp(*(ulong*)buf277, *(ulong*)buf278, *(ulong*)buf279); + *(ulong2*)buf280 = clamp(*(ulong2*)buf281, *(ulong2*)buf282, *(ulong2*)buf283); + *(ulong3*)buf284 = clamp(*(ulong3*)buf285, *(ulong3*)buf286, *(ulong3*)buf287); + *(ulong4*)buf288 = clamp(*(ulong4*)buf289, *(ulong4*)buf290, *(ulong4*)buf291); + *(char2*)buf292 = clamp(*(char2*)buf293, *(char*)buf294, *(char*)buf295); + *(char3*)buf296 = clamp(*(char3*)buf297, *(char*)buf298, *(char*)buf299); + *(char4*)buf300 = clamp(*(char4*)buf301, *(char*)buf302, *(char*)buf303); + *(uchar2*)buf304 = clamp(*(uchar2*)buf305, *(uchar*)buf306, *(uchar*)buf307); + *(uchar3*)buf308 = clamp(*(uchar3*)buf309, *(uchar*)buf310, *(uchar*)buf311); + *(uchar4*)buf312 = clamp(*(uchar4*)buf313, *(uchar*)buf314, *(uchar*)buf315); + *(short2*)buf316 = clamp(*(short2*)buf317, *(short*)buf318, *(short*)buf319); + *(short3*)buf320 = clamp(*(short3*)buf321, *(short*)buf322, *(short*)buf323); + *(short4*)buf324 = clamp(*(short4*)buf325, *(short*)buf326, *(short*)buf327); + *(ushort2*)buf328 = clamp(*(ushort2*)buf329, *(ushort*)buf330, *(ushort*)buf331); + *(ushort3*)buf332 = clamp(*(ushort3*)buf333, *(ushort*)buf334, *(ushort*)buf335); + *(ushort4*)buf336 = clamp(*(ushort4*)buf337, *(ushort*)buf338, *(ushort*)buf339); + *(int2*)buf340 = clamp(*(int2*)buf341, *(int*)buf342, *(int*)buf343); + *(int3*)buf344 = clamp(*(int3*)buf345, *(int*)buf346, *(int*)buf347); + *(int4*)buf348 = clamp(*(int4*)buf349, *(int*)buf350, *(int*)buf351); + *(uint2*)buf352 = clamp(*(uint2*)buf353, *(uint*)buf354, *(uint*)buf355); + *(uint3*)buf356 = clamp(*(uint3*)buf357, *(uint*)buf358, *(uint*)buf359); + *(uint4*)buf360 = clamp(*(uint4*)buf361, *(uint*)buf362, *(uint*)buf363); + *(long2*)buf364 = clamp(*(long2*)buf365, *(long*)buf366, *(long*)buf367); + *(long3*)buf368 = clamp(*(long3*)buf369, *(long*)buf370, *(long*)buf371); + *(long4*)buf372 = clamp(*(long4*)buf373, *(long*)buf374, *(long*)buf375); + *(ulong2*)buf376 = clamp(*(ulong2*)buf377, *(ulong*)buf378, *(ulong*)buf379); + *(ulong3*)buf380 = clamp(*(ulong3*)buf381, *(ulong*)buf382, *(ulong*)buf383); + *(ulong4*)buf384 = clamp(*(ulong4*)buf385, *(ulong*)buf386, *(ulong*)buf387); + *(char*)buf388 = clz(*(char*)buf389); + *(char2*)buf390 = clz(*(char2*)buf391); + *(char3*)buf392 = clz(*(char3*)buf393); + *(char4*)buf394 = clz(*(char4*)buf395); + *(uchar*)buf396 = clz(*(uchar*)buf397); + *(uchar2*)buf398 = clz(*(uchar2*)buf399); + *(uchar3*)buf400 = clz(*(uchar3*)buf401); + *(uchar4*)buf402 = clz(*(uchar4*)buf403); + *(short*)buf404 = clz(*(short*)buf405); + *(short2*)buf406 = clz(*(short2*)buf407); + *(short3*)buf408 = clz(*(short3*)buf409); + *(short4*)buf410 = clz(*(short4*)buf411); + *(ushort*)buf412 = clz(*(ushort*)buf413); + *(ushort2*)buf414 = clz(*(ushort2*)buf415); + *(ushort3*)buf416 = clz(*(ushort3*)buf417); + *(ushort4*)buf418 = clz(*(ushort4*)buf419); + *(int*)buf420 = clz(*(int*)buf421); + *(int2*)buf422 = clz(*(int2*)buf423); + *(int3*)buf424 = clz(*(int3*)buf425); + *(int4*)buf426 = clz(*(int4*)buf427); + *(uint*)buf428 = clz(*(uint*)buf429); + *(uint2*)buf430 = clz(*(uint2*)buf431); + *(uint3*)buf432 = clz(*(uint3*)buf433); + *(uint4*)buf434 = clz(*(uint4*)buf435); + *(float2*)buf436 = convert_float2(*(float2*)buf437); + *(float3*)buf438 = convert_float3(*(float3*)buf439); + *(float4*)buf440 = convert_float4(*(float4*)buf441); + *(float2*)buf442 = convert_float2(*(char2*)buf443); + *(float3*)buf444 = convert_float3(*(char3*)buf445); + *(float4*)buf446 = convert_float4(*(char4*)buf447); + *(float2*)buf448 = convert_float2(*(uchar2*)buf449); + *(float3*)buf450 = convert_float3(*(uchar3*)buf451); + *(float4*)buf452 = convert_float4(*(uchar4*)buf453); + *(float2*)buf454 = convert_float2(*(short2*)buf455); + *(float3*)buf456 = convert_float3(*(short3*)buf457); + *(float4*)buf458 = convert_float4(*(short4*)buf459); + *(float2*)buf460 = convert_float2(*(ushort2*)buf461); + *(float3*)buf462 = convert_float3(*(ushort3*)buf463); + *(float4*)buf464 = convert_float4(*(ushort4*)buf465); + *(float2*)buf466 = convert_float2(*(int2*)buf467); + *(float3*)buf468 = convert_float3(*(int3*)buf469); + *(float4*)buf470 = convert_float4(*(int4*)buf471); + *(float2*)buf472 = convert_float2(*(uint2*)buf473); + *(float3*)buf474 = convert_float3(*(uint3*)buf475); + *(float4*)buf476 = convert_float4(*(uint4*)buf477); + *(char2*)buf478 = convert_char2(*(float2*)buf479); + *(char3*)buf480 = convert_char3(*(float3*)buf481); + *(char4*)buf482 = convert_char4(*(float4*)buf483); + *(char2*)buf484 = convert_char2(*(char2*)buf485); + *(char3*)buf486 = convert_char3(*(char3*)buf487); + *(char4*)buf488 = convert_char4(*(char4*)buf489); + *(char2*)buf490 = convert_char2(*(uchar2*)buf491); + *(char3*)buf492 = convert_char3(*(uchar3*)buf493); + *(char4*)buf494 = convert_char4(*(uchar4*)buf495); + *(char2*)buf496 = convert_char2(*(short2*)buf497); + *(char3*)buf498 = convert_char3(*(short3*)buf499); + *(char4*)buf500 = convert_char4(*(short4*)buf501); + *(char2*)buf502 = convert_char2(*(ushort2*)buf503); + *(char3*)buf504 = convert_char3(*(ushort3*)buf505); + *(char4*)buf506 = convert_char4(*(ushort4*)buf507); + *(char2*)buf508 = convert_char2(*(int2*)buf509); + *(char3*)buf510 = convert_char3(*(int3*)buf511); + *(char4*)buf512 = convert_char4(*(int4*)buf513); + *(char2*)buf514 = convert_char2(*(uint2*)buf515); + *(char3*)buf516 = convert_char3(*(uint3*)buf517); + *(char4*)buf518 = convert_char4(*(uint4*)buf519); + *(uchar2*)buf520 = convert_uchar2(*(float2*)buf521); + *(uchar3*)buf522 = convert_uchar3(*(float3*)buf523); + *(uchar4*)buf524 = convert_uchar4(*(float4*)buf525); + *(uchar2*)buf526 = convert_uchar2(*(char2*)buf527); + *(uchar3*)buf528 = convert_uchar3(*(char3*)buf529); + *(uchar4*)buf530 = convert_uchar4(*(char4*)buf531); + *(uchar2*)buf532 = convert_uchar2(*(uchar2*)buf533); + *(uchar3*)buf534 = convert_uchar3(*(uchar3*)buf535); + *(uchar4*)buf536 = convert_uchar4(*(uchar4*)buf537); + *(uchar2*)buf538 = convert_uchar2(*(short2*)buf539); + *(uchar3*)buf540 = convert_uchar3(*(short3*)buf541); + *(uchar4*)buf542 = convert_uchar4(*(short4*)buf543); + *(uchar2*)buf544 = convert_uchar2(*(ushort2*)buf545); + *(uchar3*)buf546 = convert_uchar3(*(ushort3*)buf547); + *(uchar4*)buf548 = convert_uchar4(*(ushort4*)buf549); + *(uchar2*)buf550 = convert_uchar2(*(int2*)buf551); + *(uchar3*)buf552 = convert_uchar3(*(int3*)buf553); + *(uchar4*)buf554 = convert_uchar4(*(int4*)buf555); + *(uchar2*)buf556 = convert_uchar2(*(uint2*)buf557); + *(uchar3*)buf558 = convert_uchar3(*(uint3*)buf559); + *(uchar4*)buf560 = convert_uchar4(*(uint4*)buf561); + *(short2*)buf562 = convert_short2(*(float2*)buf563); + *(short3*)buf564 = convert_short3(*(float3*)buf565); + *(short4*)buf566 = convert_short4(*(float4*)buf567); + *(short2*)buf568 = convert_short2(*(char2*)buf569); + *(short3*)buf570 = convert_short3(*(char3*)buf571); + *(short4*)buf572 = convert_short4(*(char4*)buf573); + *(short2*)buf574 = convert_short2(*(uchar2*)buf575); + *(short3*)buf576 = convert_short3(*(uchar3*)buf577); + *(short4*)buf578 = convert_short4(*(uchar4*)buf579); + *(short2*)buf580 = convert_short2(*(short2*)buf581); + *(short3*)buf582 = convert_short3(*(short3*)buf583); + *(short4*)buf584 = convert_short4(*(short4*)buf585); + *(short2*)buf586 = convert_short2(*(ushort2*)buf587); + *(short3*)buf588 = convert_short3(*(ushort3*)buf589); + *(short4*)buf590 = convert_short4(*(ushort4*)buf591); + *(short2*)buf592 = convert_short2(*(int2*)buf593); + *(short3*)buf594 = convert_short3(*(int3*)buf595); + *(short4*)buf596 = convert_short4(*(int4*)buf597); + *(short2*)buf598 = convert_short2(*(uint2*)buf599); + *(short3*)buf600 = convert_short3(*(uint3*)buf601); + *(short4*)buf602 = convert_short4(*(uint4*)buf603); + *(ushort2*)buf604 = convert_ushort2(*(float2*)buf605); + *(ushort3*)buf606 = convert_ushort3(*(float3*)buf607); + *(ushort4*)buf608 = convert_ushort4(*(float4*)buf609); + *(ushort2*)buf610 = convert_ushort2(*(char2*)buf611); + *(ushort3*)buf612 = convert_ushort3(*(char3*)buf613); + *(ushort4*)buf614 = convert_ushort4(*(char4*)buf615); + *(ushort2*)buf616 = convert_ushort2(*(uchar2*)buf617); + *(ushort3*)buf618 = convert_ushort3(*(uchar3*)buf619); + *(ushort4*)buf620 = convert_ushort4(*(uchar4*)buf621); + *(ushort2*)buf622 = convert_ushort2(*(short2*)buf623); + *(ushort3*)buf624 = convert_ushort3(*(short3*)buf625); + *(ushort4*)buf626 = convert_ushort4(*(short4*)buf627); + *(ushort2*)buf628 = convert_ushort2(*(ushort2*)buf629); + *(ushort3*)buf630 = convert_ushort3(*(ushort3*)buf631); + *(ushort4*)buf632 = convert_ushort4(*(ushort4*)buf633); + *(ushort2*)buf634 = convert_ushort2(*(int2*)buf635); + *(ushort3*)buf636 = convert_ushort3(*(int3*)buf637); + *(ushort4*)buf638 = convert_ushort4(*(int4*)buf639); + *(ushort2*)buf640 = convert_ushort2(*(uint2*)buf641); + *(ushort3*)buf642 = convert_ushort3(*(uint3*)buf643); + *(ushort4*)buf644 = convert_ushort4(*(uint4*)buf645); + *(int2*)buf646 = convert_int2(*(float2*)buf647); + *(int3*)buf648 = convert_int3(*(float3*)buf649); + *(int4*)buf650 = convert_int4(*(float4*)buf651); + *(int2*)buf652 = convert_int2(*(char2*)buf653); + *(int3*)buf654 = convert_int3(*(char3*)buf655); + *(int4*)buf656 = convert_int4(*(char4*)buf657); + *(int2*)buf658 = convert_int2(*(uchar2*)buf659); + *(int3*)buf660 = convert_int3(*(uchar3*)buf661); + *(int4*)buf662 = convert_int4(*(uchar4*)buf663); + *(int2*)buf664 = convert_int2(*(short2*)buf665); + *(int3*)buf666 = convert_int3(*(short3*)buf667); + *(int4*)buf668 = convert_int4(*(short4*)buf669); + *(int2*)buf670 = convert_int2(*(ushort2*)buf671); + *(int3*)buf672 = convert_int3(*(ushort3*)buf673); + *(int4*)buf674 = convert_int4(*(ushort4*)buf675); + *(int2*)buf676 = convert_int2(*(int2*)buf677); + *(int3*)buf678 = convert_int3(*(int3*)buf679); + *(int4*)buf680 = convert_int4(*(int4*)buf681); + *(int2*)buf682 = convert_int2(*(uint2*)buf683); + *(int3*)buf684 = convert_int3(*(uint3*)buf685); + *(int4*)buf686 = convert_int4(*(uint4*)buf687); + *(uint2*)buf688 = convert_uint2(*(float2*)buf689); + *(uint3*)buf690 = convert_uint3(*(float3*)buf691); + *(uint4*)buf692 = convert_uint4(*(float4*)buf693); + *(uint2*)buf694 = convert_uint2(*(char2*)buf695); + *(uint3*)buf696 = convert_uint3(*(char3*)buf697); + *(uint4*)buf698 = convert_uint4(*(char4*)buf699); + *(uint2*)buf700 = convert_uint2(*(uchar2*)buf701); + *(uint3*)buf702 = convert_uint3(*(uchar3*)buf703); + *(uint4*)buf704 = convert_uint4(*(uchar4*)buf705); + *(uint2*)buf706 = convert_uint2(*(short2*)buf707); + *(uint3*)buf708 = convert_uint3(*(short3*)buf709); + *(uint4*)buf710 = convert_uint4(*(short4*)buf711); + *(uint2*)buf712 = convert_uint2(*(ushort2*)buf713); + *(uint3*)buf714 = convert_uint3(*(ushort3*)buf715); + *(uint4*)buf716 = convert_uint4(*(ushort4*)buf717); + *(uint2*)buf718 = convert_uint2(*(int2*)buf719); + *(uint3*)buf720 = convert_uint3(*(int3*)buf721); + *(uint4*)buf722 = convert_uint4(*(int4*)buf723); + *(uint2*)buf724 = convert_uint2(*(uint2*)buf725); + *(uint3*)buf726 = convert_uint3(*(uint3*)buf727); + *(uint4*)buf728 = convert_uint4(*(uint4*)buf729); + *(double2*)buf730 = convert_double2(*(double2*)buf731); + *(double3*)buf732 = convert_double3(*(double3*)buf733); + *(double4*)buf734 = convert_double4(*(double4*)buf735); + *(double2*)buf736 = convert_double2(*(long2*)buf737); + *(double3*)buf738 = convert_double3(*(long3*)buf739); + *(double4*)buf740 = convert_double4(*(long4*)buf741); + *(double2*)buf742 = convert_double2(*(ulong2*)buf743); + *(double3*)buf744 = convert_double3(*(ulong3*)buf745); + *(double4*)buf746 = convert_double4(*(ulong4*)buf747); + *(long2*)buf748 = convert_long2(*(double2*)buf749); + *(long3*)buf750 = convert_long3(*(double3*)buf751); + *(long4*)buf752 = convert_long4(*(double4*)buf753); + *(long2*)buf754 = convert_long2(*(long2*)buf755); + *(long3*)buf756 = convert_long3(*(long3*)buf757); + *(long4*)buf758 = convert_long4(*(long4*)buf759); + *(long2*)buf760 = convert_long2(*(ulong2*)buf761); + *(long3*)buf762 = convert_long3(*(ulong3*)buf763); + *(long4*)buf764 = convert_long4(*(ulong4*)buf765); + *(ulong2*)buf766 = convert_ulong2(*(double2*)buf767); + *(ulong3*)buf768 = convert_ulong3(*(double3*)buf769); + *(ulong4*)buf770 = convert_ulong4(*(double4*)buf771); + *(ulong2*)buf772 = convert_ulong2(*(long2*)buf773); + *(ulong3*)buf774 = convert_ulong3(*(long3*)buf775); + *(ulong4*)buf776 = convert_ulong4(*(long4*)buf777); + *(ulong2*)buf778 = convert_ulong2(*(ulong2*)buf779); + *(ulong3*)buf780 = convert_ulong3(*(ulong3*)buf781); + *(ulong4*)buf782 = convert_ulong4(*(ulong4*)buf783); + *(float2*)buf784 = convert_float2(*(double2*)buf785); + *(float3*)buf786 = convert_float3(*(double3*)buf787); + *(float4*)buf788 = convert_float4(*(double4*)buf789); + *(float2*)buf790 = convert_float2(*(long2*)buf791); + *(float3*)buf792 = convert_float3(*(long3*)buf793); + *(float4*)buf794 = convert_float4(*(long4*)buf795); + *(float2*)buf796 = convert_float2(*(ulong2*)buf797); + *(float3*)buf798 = convert_float3(*(ulong3*)buf799); + *(float4*)buf800 = convert_float4(*(ulong4*)buf801); + *(char2*)buf802 = convert_char2(*(double2*)buf803); + *(char3*)buf804 = convert_char3(*(double3*)buf805); + *(char4*)buf806 = convert_char4(*(double4*)buf807); + *(char2*)buf808 = convert_char2(*(long2*)buf809); + *(char3*)buf810 = convert_char3(*(long3*)buf811); + *(char4*)buf812 = convert_char4(*(long4*)buf813); + *(char2*)buf814 = convert_char2(*(ulong2*)buf815); + *(char3*)buf816 = convert_char3(*(ulong3*)buf817); + *(char4*)buf818 = convert_char4(*(ulong4*)buf819); + *(uchar2*)buf820 = convert_uchar2(*(double2*)buf821); + *(uchar3*)buf822 = convert_uchar3(*(double3*)buf823); + *(uchar4*)buf824 = convert_uchar4(*(double4*)buf825); + *(uchar2*)buf826 = convert_uchar2(*(long2*)buf827); + *(uchar3*)buf828 = convert_uchar3(*(long3*)buf829); + *(uchar4*)buf830 = convert_uchar4(*(long4*)buf831); + *(uchar2*)buf832 = convert_uchar2(*(ulong2*)buf833); + *(uchar3*)buf834 = convert_uchar3(*(ulong3*)buf835); + *(uchar4*)buf836 = convert_uchar4(*(ulong4*)buf837); + *(short2*)buf838 = convert_short2(*(double2*)buf839); + *(short3*)buf840 = convert_short3(*(double3*)buf841); + *(short4*)buf842 = convert_short4(*(double4*)buf843); + *(short2*)buf844 = convert_short2(*(long2*)buf845); + *(short3*)buf846 = convert_short3(*(long3*)buf847); + *(short4*)buf848 = convert_short4(*(long4*)buf849); + *(short2*)buf850 = convert_short2(*(ulong2*)buf851); + *(short3*)buf852 = convert_short3(*(ulong3*)buf853); + *(short4*)buf854 = convert_short4(*(ulong4*)buf855); + *(ushort2*)buf856 = convert_ushort2(*(double2*)buf857); + *(ushort3*)buf858 = convert_ushort3(*(double3*)buf859); + *(ushort4*)buf860 = convert_ushort4(*(double4*)buf861); + *(ushort2*)buf862 = convert_ushort2(*(long2*)buf863); + *(ushort3*)buf864 = convert_ushort3(*(long3*)buf865); + *(ushort4*)buf866 = convert_ushort4(*(long4*)buf867); + *(ushort2*)buf868 = convert_ushort2(*(ulong2*)buf869); + *(ushort3*)buf870 = convert_ushort3(*(ulong3*)buf871); + *(ushort4*)buf872 = convert_ushort4(*(ulong4*)buf873); + *(int2*)buf874 = convert_int2(*(double2*)buf875); + *(int3*)buf876 = convert_int3(*(double3*)buf877); + *(int4*)buf878 = convert_int4(*(double4*)buf879); + *(int2*)buf880 = convert_int2(*(long2*)buf881); + *(int3*)buf882 = convert_int3(*(long3*)buf883); + *(int4*)buf884 = convert_int4(*(long4*)buf885); + *(int2*)buf886 = convert_int2(*(ulong2*)buf887); + *(int3*)buf888 = convert_int3(*(ulong3*)buf889); + *(int4*)buf890 = convert_int4(*(ulong4*)buf891); + *(uint2*)buf892 = convert_uint2(*(double2*)buf893); + *(uint3*)buf894 = convert_uint3(*(double3*)buf895); + *(uint4*)buf896 = convert_uint4(*(double4*)buf897); + *(uint2*)buf898 = convert_uint2(*(long2*)buf899); + *(uint3*)buf900 = convert_uint3(*(long3*)buf901); + *(uint4*)buf902 = convert_uint4(*(long4*)buf903); + *(uint2*)buf904 = convert_uint2(*(ulong2*)buf905); + *(uint3*)buf906 = convert_uint3(*(ulong3*)buf907); + *(uint4*)buf908 = convert_uint4(*(ulong4*)buf909); + *(double2*)buf910 = convert_double2(*(float2*)buf911); + *(double3*)buf912 = convert_double3(*(float3*)buf913); + *(double4*)buf914 = convert_double4(*(float4*)buf915); + *(double2*)buf916 = convert_double2(*(char2*)buf917); + *(double3*)buf918 = convert_double3(*(char3*)buf919); + *(double4*)buf920 = convert_double4(*(char4*)buf921); + *(double2*)buf922 = convert_double2(*(uchar2*)buf923); + *(double3*)buf924 = convert_double3(*(uchar3*)buf925); + *(double4*)buf926 = convert_double4(*(uchar4*)buf927); + *(double2*)buf928 = convert_double2(*(short2*)buf929); + *(double3*)buf930 = convert_double3(*(short3*)buf931); + *(double4*)buf932 = convert_double4(*(short4*)buf933); + *(double2*)buf934 = convert_double2(*(ushort2*)buf935); + *(double3*)buf936 = convert_double3(*(ushort3*)buf937); + *(double4*)buf938 = convert_double4(*(ushort4*)buf939); + *(double2*)buf940 = convert_double2(*(int2*)buf941); + *(double3*)buf942 = convert_double3(*(int3*)buf943); + *(double4*)buf944 = convert_double4(*(int4*)buf945); + *(double2*)buf946 = convert_double2(*(uint2*)buf947); + *(double3*)buf948 = convert_double3(*(uint3*)buf949); + *(double4*)buf950 = convert_double4(*(uint4*)buf951); + *(long2*)buf952 = convert_long2(*(float2*)buf953); + *(long3*)buf954 = convert_long3(*(float3*)buf955); + *(long4*)buf956 = convert_long4(*(float4*)buf957); + *(long2*)buf958 = convert_long2(*(char2*)buf959); + *(long3*)buf960 = convert_long3(*(char3*)buf961); + *(long4*)buf962 = convert_long4(*(char4*)buf963); + *(long2*)buf964 = convert_long2(*(uchar2*)buf965); + *(long3*)buf966 = convert_long3(*(uchar3*)buf967); + *(long4*)buf968 = convert_long4(*(uchar4*)buf969); + *(long2*)buf970 = convert_long2(*(short2*)buf971); + *(long3*)buf972 = convert_long3(*(short3*)buf973); + *(long4*)buf974 = convert_long4(*(short4*)buf975); + *(long2*)buf976 = convert_long2(*(ushort2*)buf977); + *(long3*)buf978 = convert_long3(*(ushort3*)buf979); + *(long4*)buf980 = convert_long4(*(ushort4*)buf981); + *(long2*)buf982 = convert_long2(*(int2*)buf983); + *(long3*)buf984 = convert_long3(*(int3*)buf985); + *(long4*)buf986 = convert_long4(*(int4*)buf987); + *(long2*)buf988 = convert_long2(*(uint2*)buf989); + *(long3*)buf990 = convert_long3(*(uint3*)buf991); + *(long4*)buf992 = convert_long4(*(uint4*)buf993); + *(ulong2*)buf994 = convert_ulong2(*(float2*)buf995); + *(ulong3*)buf996 = convert_ulong3(*(float3*)buf997); + *(ulong4*)buf998 = convert_ulong4(*(float4*)buf999); + *(ulong2*)buf1000 = convert_ulong2(*(char2*)buf1001); + *(ulong3*)buf1002 = convert_ulong3(*(char3*)buf1003); + *(ulong4*)buf1004 = convert_ulong4(*(char4*)buf1005); + *(ulong2*)buf1006 = convert_ulong2(*(uchar2*)buf1007); + *(ulong3*)buf1008 = convert_ulong3(*(uchar3*)buf1009); + *(ulong4*)buf1010 = convert_ulong4(*(uchar4*)buf1011); + *(ulong2*)buf1012 = convert_ulong2(*(short2*)buf1013); + *(ulong3*)buf1014 = convert_ulong3(*(short3*)buf1015); + *(ulong4*)buf1016 = convert_ulong4(*(short4*)buf1017); + *(ulong2*)buf1018 = convert_ulong2(*(ushort2*)buf1019); + *(ulong3*)buf1020 = convert_ulong3(*(ushort3*)buf1021); + *(ulong4*)buf1022 = convert_ulong4(*(ushort4*)buf1023); + *(ulong2*)buf1024 = convert_ulong2(*(int2*)buf1025); + *(ulong3*)buf1026 = convert_ulong3(*(int3*)buf1027); + *(ulong4*)buf1028 = convert_ulong4(*(int4*)buf1029); + *(ulong2*)buf1030 = convert_ulong2(*(uint2*)buf1031); + *(ulong3*)buf1032 = convert_ulong3(*(uint3*)buf1033); + *(ulong4*)buf1034 = convert_ulong4(*(uint4*)buf1035); + *(float*)buf1036 = copysign(*(float*)buf1037, *(float*)buf1038); + *(float2*)buf1039 = copysign(*(float2*)buf1040, *(float2*)buf1041); + *(float3*)buf1042 = copysign(*(float3*)buf1043, *(float3*)buf1044); + *(float4*)buf1045 = copysign(*(float4*)buf1046, *(float4*)buf1047); + *(float*)buf1048 = cos(*(float*)buf1049); + *(float2*)buf1050 = cos(*(float2*)buf1051); + *(float3*)buf1052 = cos(*(float3*)buf1053); + *(float4*)buf1054 = cos(*(float4*)buf1055); + *(float*)buf1056 = cosh(*(float*)buf1057); + *(float2*)buf1058 = cosh(*(float2*)buf1059); + *(float3*)buf1060 = cosh(*(float3*)buf1061); + *(float4*)buf1062 = cosh(*(float4*)buf1063); + *(float*)buf1064 = cospi(*(float*)buf1065); + *(float2*)buf1066 = cospi(*(float2*)buf1067); + *(float3*)buf1068 = cospi(*(float3*)buf1069); + *(float4*)buf1070 = cospi(*(float4*)buf1071); + *(float3*)buf1072 = cross(*(float3*)buf1073, *(float3*)buf1074); + *(float4*)buf1075 = cross(*(float4*)buf1076, *(float4*)buf1077); + *(float*)buf1078 = degrees(*(float*)buf1079); + *(float2*)buf1080 = degrees(*(float2*)buf1081); + *(float3*)buf1082 = degrees(*(float3*)buf1083); + *(float4*)buf1084 = degrees(*(float4*)buf1085); + *(float*)buf1086 = distance(*(float*)buf1087, *(float*)buf1088); + *(float*)buf1089 = distance(*(float2*)buf1090, *(float2*)buf1091); + *(float*)buf1092 = distance(*(float3*)buf1093, *(float3*)buf1094); + *(float*)buf1095 = distance(*(float4*)buf1096, *(float4*)buf1097); + *(float*)buf1098 = dot(*(float*)buf1099, *(float*)buf1100); + *(float*)buf1101 = dot(*(float2*)buf1102, *(float2*)buf1103); + *(float*)buf1104 = dot(*(float3*)buf1105, *(float3*)buf1106); + *(float*)buf1107 = dot(*(float4*)buf1108, *(float4*)buf1109); + *(float*)buf1110 = erf(*(float*)buf1111); + *(float2*)buf1112 = erf(*(float2*)buf1113); + *(float3*)buf1114 = erf(*(float3*)buf1115); + *(float4*)buf1116 = erf(*(float4*)buf1117); + *(float*)buf1118 = erfc(*(float*)buf1119); + *(float2*)buf1120 = erfc(*(float2*)buf1121); + *(float3*)buf1122 = erfc(*(float3*)buf1123); + *(float4*)buf1124 = erfc(*(float4*)buf1125); + *(float*)buf1126 = exp(*(float*)buf1127); + *(float2*)buf1128 = exp(*(float2*)buf1129); + *(float3*)buf1130 = exp(*(float3*)buf1131); + *(float4*)buf1132 = exp(*(float4*)buf1133); + *(float*)buf1134 = exp10(*(float*)buf1135); + *(float2*)buf1136 = exp10(*(float2*)buf1137); + *(float3*)buf1138 = exp10(*(float3*)buf1139); + *(float4*)buf1140 = exp10(*(float4*)buf1141); + *(float*)buf1142 = exp2(*(float*)buf1143); + *(float2*)buf1144 = exp2(*(float2*)buf1145); + *(float3*)buf1146 = exp2(*(float3*)buf1147); + *(float4*)buf1148 = exp2(*(float4*)buf1149); + *(float*)buf1150 = expm1(*(float*)buf1151); + *(float2*)buf1152 = expm1(*(float2*)buf1153); + *(float3*)buf1154 = expm1(*(float3*)buf1155); + *(float4*)buf1156 = expm1(*(float4*)buf1157); + *(float*)buf1158 = fabs(*(float*)buf1159); + *(float2*)buf1160 = fabs(*(float2*)buf1161); + *(float3*)buf1162 = fabs(*(float3*)buf1163); + *(float4*)buf1164 = fabs(*(float4*)buf1165); + *(float*)buf1166 = fast_distance(*(float*)buf1167, *(float*)buf1168); + *(float*)buf1169 = fast_distance(*(float2*)buf1170, *(float2*)buf1171); + *(float*)buf1172 = fast_distance(*(float3*)buf1173, *(float3*)buf1174); + *(float*)buf1175 = fast_distance(*(float4*)buf1176, *(float4*)buf1177); + *(float*)buf1178 = fast_length(*(float*)buf1179); + *(float*)buf1180 = fast_length(*(float2*)buf1181); + *(float*)buf1182 = fast_length(*(float3*)buf1183); + *(float*)buf1184 = fast_length(*(float4*)buf1185); + *(float*)buf1186 = fast_normalize(*(float*)buf1187); + *(float2*)buf1188 = fast_normalize(*(float2*)buf1189); + *(float3*)buf1190 = fast_normalize(*(float3*)buf1191); + *(float4*)buf1192 = fast_normalize(*(float4*)buf1193); + *(float*)buf1194 = fdim(*(float*)buf1195, *(float*)buf1196); + *(float2*)buf1197 = fdim(*(float2*)buf1198, *(float2*)buf1199); + *(float3*)buf1200 = fdim(*(float3*)buf1201, *(float3*)buf1202); + *(float4*)buf1203 = fdim(*(float4*)buf1204, *(float4*)buf1205); + *(float*)buf1206 = floor(*(float*)buf1207); + *(float2*)buf1208 = floor(*(float2*)buf1209); + *(float3*)buf1210 = floor(*(float3*)buf1211); + *(float4*)buf1212 = floor(*(float4*)buf1213); + *(float*)buf1214 = fma(*(float*)buf1215, *(float*)buf1216, *(float*)buf1217); + *(float2*)buf1218 = fma(*(float2*)buf1219, *(float2*)buf1220, *(float2*)buf1221); + *(float3*)buf1222 = fma(*(float3*)buf1223, *(float3*)buf1224, *(float3*)buf1225); + *(float4*)buf1226 = fma(*(float4*)buf1227, *(float4*)buf1228, *(float4*)buf1229); + *(float*)buf1230 = fmax(*(float*)buf1231, *(float*)buf1232); + *(float2*)buf1233 = fmax(*(float2*)buf1234, *(float2*)buf1235); + *(float3*)buf1236 = fmax(*(float3*)buf1237, *(float3*)buf1238); + *(float4*)buf1239 = fmax(*(float4*)buf1240, *(float4*)buf1241); + *(float2*)buf1242 = fmax(*(float2*)buf1243, *(float*)buf1244); + *(float3*)buf1245 = fmax(*(float3*)buf1246, *(float*)buf1247); + *(float4*)buf1248 = fmax(*(float4*)buf1249, *(float*)buf1250); + *(float*)buf1251 = fmin(*(float*)buf1252, *(float*)buf1253); + *(float2*)buf1254 = fmin(*(float2*)buf1255, *(float2*)buf1256); + *(float3*)buf1257 = fmin(*(float3*)buf1258, *(float3*)buf1259); + *(float4*)buf1260 = fmin(*(float4*)buf1261, *(float4*)buf1262); + *(float2*)buf1263 = fmin(*(float2*)buf1264, *(float*)buf1265); + *(float3*)buf1266 = fmin(*(float3*)buf1267, *(float*)buf1268); + *(float4*)buf1269 = fmin(*(float4*)buf1270, *(float*)buf1271); + *(float*)buf1272 = fmod(*(float*)buf1273, *(float*)buf1274); + *(float2*)buf1275 = fmod(*(float2*)buf1276, *(float2*)buf1277); + *(float3*)buf1278 = fmod(*(float3*)buf1279, *(float3*)buf1280); + *(float4*)buf1281 = fmod(*(float4*)buf1282, *(float4*)buf1283); + *(float*)buf1284 = fract(*(float*)buf1285, (float*) buf1286); + *(float2*)buf1287 = fract(*(float2*)buf1288, (float2*) buf1289); + *(float3*)buf1290 = fract(*(float3*)buf1291, (float3*) buf1292); + *(float4*)buf1293 = fract(*(float4*)buf1294, (float4*) buf1295); + *(float*)buf1296 = fract(*(float*)buf1297); + *(float2*)buf1298 = fract(*(float2*)buf1299); + *(float3*)buf1300 = fract(*(float3*)buf1301); + *(float4*)buf1302 = fract(*(float4*)buf1303); + *(float*)buf1304 = frexp(*(float*)buf1305, (int*) buf1306); + *(float2*)buf1307 = frexp(*(float2*)buf1308, (int2*) buf1309); + *(float3*)buf1310 = frexp(*(float3*)buf1311, (int3*) buf1312); + *(float4*)buf1313 = frexp(*(float4*)buf1314, (int4*) buf1315); + *(float*)buf1316 = half_recip(*(float*)buf1317); + *(float2*)buf1318 = half_recip(*(float2*)buf1319); + *(float3*)buf1320 = half_recip(*(float3*)buf1321); + *(float4*)buf1322 = half_recip(*(float4*)buf1323); + *(float*)buf1324 = half_rsqrt(*(float*)buf1325); + *(float2*)buf1326 = half_rsqrt(*(float2*)buf1327); + *(float3*)buf1328 = half_rsqrt(*(float3*)buf1329); + *(float4*)buf1330 = half_rsqrt(*(float4*)buf1331); + *(float*)buf1332 = half_sqrt(*(float*)buf1333); + *(float2*)buf1334 = half_sqrt(*(float2*)buf1335); + *(float3*)buf1336 = half_sqrt(*(float3*)buf1337); + *(float4*)buf1338 = half_sqrt(*(float4*)buf1339); + *(float*)buf1340 = hypot(*(float*)buf1341, *(float*)buf1342); + *(float2*)buf1343 = hypot(*(float2*)buf1344, *(float2*)buf1345); + *(float3*)buf1346 = hypot(*(float3*)buf1347, *(float3*)buf1348); + *(float4*)buf1349 = hypot(*(float4*)buf1350, *(float4*)buf1351); + *(int*)buf1352 = ilogb(*(float*)buf1353); + *(int2*)buf1354 = ilogb(*(float2*)buf1355); + *(int3*)buf1356 = ilogb(*(float3*)buf1357); + *(int4*)buf1358 = ilogb(*(float4*)buf1359); + *(float*)buf1360 = ldexp(*(float*)buf1361, *(int*)buf1362); + *(float2*)buf1363 = ldexp(*(float2*)buf1364, *(int2*)buf1365); + *(float3*)buf1366 = ldexp(*(float3*)buf1367, *(int3*)buf1368); + *(float4*)buf1369 = ldexp(*(float4*)buf1370, *(int4*)buf1371); + *(float2*)buf1372 = ldexp(*(float2*)buf1373, *(int*)buf1374); + *(float3*)buf1375 = ldexp(*(float3*)buf1376, *(int*)buf1377); + *(float4*)buf1378 = ldexp(*(float4*)buf1379, *(int*)buf1380); + *(float*)buf1381 = length(*(float*)buf1382); + *(float*)buf1383 = length(*(float2*)buf1384); + *(float*)buf1385 = length(*(float3*)buf1386); + *(float*)buf1387 = length(*(float4*)buf1388); + *(float*)buf1389 = lgamma(*(float*)buf1390); + *(float2*)buf1391 = lgamma(*(float2*)buf1392); + *(float3*)buf1393 = lgamma(*(float3*)buf1394); + *(float4*)buf1395 = lgamma(*(float4*)buf1396); + *(float*)buf1397 = lgamma(*(float*)buf1398, (int*) buf1399); + *(float2*)buf1400 = lgamma(*(float2*)buf1401, (int2*) buf1402); + *(float3*)buf1403 = lgamma(*(float3*)buf1404, (int3*) buf1405); + *(float4*)buf1406 = lgamma(*(float4*)buf1407, (int4*) buf1408); + *(float*)buf1409 = log(*(float*)buf1410); + *(float2*)buf1411 = log(*(float2*)buf1412); + *(float3*)buf1413 = log(*(float3*)buf1414); + *(float4*)buf1415 = log(*(float4*)buf1416); + *(float*)buf1417 = log10(*(float*)buf1418); + *(float2*)buf1419 = log10(*(float2*)buf1420); + *(float3*)buf1421 = log10(*(float3*)buf1422); + *(float4*)buf1423 = log10(*(float4*)buf1424); + *(float*)buf1425 = log1p(*(float*)buf1426); + *(float2*)buf1427 = log1p(*(float2*)buf1428); + *(float3*)buf1429 = log1p(*(float3*)buf1430); + *(float4*)buf1431 = log1p(*(float4*)buf1432); + *(float*)buf1433 = log2(*(float*)buf1434); + *(float2*)buf1435 = log2(*(float2*)buf1436); + *(float3*)buf1437 = log2(*(float3*)buf1438); + *(float4*)buf1439 = log2(*(float4*)buf1440); + *(float*)buf1441 = logb(*(float*)buf1442); + *(float2*)buf1443 = logb(*(float2*)buf1444); + *(float3*)buf1445 = logb(*(float3*)buf1446); + *(float4*)buf1447 = logb(*(float4*)buf1448); + *(float*)buf1449 = mad(*(float*)buf1450, *(float*)buf1451, *(float*)buf1452); + *(float2*)buf1453 = mad(*(float2*)buf1454, *(float2*)buf1455, *(float2*)buf1456); + *(float3*)buf1457 = mad(*(float3*)buf1458, *(float3*)buf1459, *(float3*)buf1460); + *(float4*)buf1461 = mad(*(float4*)buf1462, *(float4*)buf1463, *(float4*)buf1464); + *(float*)buf1465 = max(*(float*)buf1466, *(float*)buf1467); + *(float2*)buf1468 = max(*(float2*)buf1469, *(float2*)buf1470); + *(float3*)buf1471 = max(*(float3*)buf1472, *(float3*)buf1473); + *(float4*)buf1474 = max(*(float4*)buf1475, *(float4*)buf1476); + *(float2*)buf1477 = max(*(float2*)buf1478, *(float*)buf1479); + *(float3*)buf1480 = max(*(float3*)buf1481, *(float*)buf1482); + *(float4*)buf1483 = max(*(float4*)buf1484, *(float*)buf1485); + *(char*)buf1486 = max(*(char*)buf1487, *(char*)buf1488); + *(char2*)buf1489 = max(*(char2*)buf1490, *(char2*)buf1491); + *(char3*)buf1492 = max(*(char3*)buf1493, *(char3*)buf1494); + *(char4*)buf1495 = max(*(char4*)buf1496, *(char4*)buf1497); + *(uchar*)buf1498 = max(*(uchar*)buf1499, *(uchar*)buf1500); + *(uchar2*)buf1501 = max(*(uchar2*)buf1502, *(uchar2*)buf1503); + *(uchar3*)buf1504 = max(*(uchar3*)buf1505, *(uchar3*)buf1506); + *(uchar4*)buf1507 = max(*(uchar4*)buf1508, *(uchar4*)buf1509); + *(short*)buf1510 = max(*(short*)buf1511, *(short*)buf1512); + *(short2*)buf1513 = max(*(short2*)buf1514, *(short2*)buf1515); + *(short3*)buf1516 = max(*(short3*)buf1517, *(short3*)buf1518); + *(short4*)buf1519 = max(*(short4*)buf1520, *(short4*)buf1521); + *(ushort*)buf1522 = max(*(ushort*)buf1523, *(ushort*)buf1524); + *(ushort2*)buf1525 = max(*(ushort2*)buf1526, *(ushort2*)buf1527); + *(ushort3*)buf1528 = max(*(ushort3*)buf1529, *(ushort3*)buf1530); + *(ushort4*)buf1531 = max(*(ushort4*)buf1532, *(ushort4*)buf1533); + *(int*)buf1534 = max(*(int*)buf1535, *(int*)buf1536); + *(int2*)buf1537 = max(*(int2*)buf1538, *(int2*)buf1539); + *(int3*)buf1540 = max(*(int3*)buf1541, *(int3*)buf1542); + *(int4*)buf1543 = max(*(int4*)buf1544, *(int4*)buf1545); + *(uint*)buf1546 = max(*(uint*)buf1547, *(uint*)buf1548); + *(uint2*)buf1549 = max(*(uint2*)buf1550, *(uint2*)buf1551); + *(uint3*)buf1552 = max(*(uint3*)buf1553, *(uint3*)buf1554); + *(uint4*)buf1555 = max(*(uint4*)buf1556, *(uint4*)buf1557); + *(long*)buf1558 = max(*(long*)buf1559, *(long*)buf1560); + *(long2*)buf1561 = max(*(long2*)buf1562, *(long2*)buf1563); + *(long3*)buf1564 = max(*(long3*)buf1565, *(long3*)buf1566); + *(long4*)buf1567 = max(*(long4*)buf1568, *(long4*)buf1569); + *(ulong*)buf1570 = max(*(ulong*)buf1571, *(ulong*)buf1572); + *(ulong2*)buf1573 = max(*(ulong2*)buf1574, *(ulong2*)buf1575); + *(ulong3*)buf1576 = max(*(ulong3*)buf1577, *(ulong3*)buf1578); + *(ulong4*)buf1579 = max(*(ulong4*)buf1580, *(ulong4*)buf1581); + *(float*)buf1582 = min(*(float*)buf1583, *(float*)buf1584); + *(float2*)buf1585 = min(*(float2*)buf1586, *(float2*)buf1587); + *(float3*)buf1588 = min(*(float3*)buf1589, *(float3*)buf1590); + *(float4*)buf1591 = min(*(float4*)buf1592, *(float4*)buf1593); + *(float2*)buf1594 = min(*(float2*)buf1595, *(float*)buf1596); + *(float3*)buf1597 = min(*(float3*)buf1598, *(float*)buf1599); + *(float4*)buf1600 = min(*(float4*)buf1601, *(float*)buf1602); + *(char*)buf1603 = min(*(char*)buf1604, *(char*)buf1605); + *(char2*)buf1606 = min(*(char2*)buf1607, *(char2*)buf1608); + *(char3*)buf1609 = min(*(char3*)buf1610, *(char3*)buf1611); + *(char4*)buf1612 = min(*(char4*)buf1613, *(char4*)buf1614); + *(uchar*)buf1615 = min(*(uchar*)buf1616, *(uchar*)buf1617); + *(uchar2*)buf1618 = min(*(uchar2*)buf1619, *(uchar2*)buf1620); + *(uchar3*)buf1621 = min(*(uchar3*)buf1622, *(uchar3*)buf1623); + *(uchar4*)buf1624 = min(*(uchar4*)buf1625, *(uchar4*)buf1626); + *(short*)buf1627 = min(*(short*)buf1628, *(short*)buf1629); + *(short2*)buf1630 = min(*(short2*)buf1631, *(short2*)buf1632); + *(short3*)buf1633 = min(*(short3*)buf1634, *(short3*)buf1635); + *(short4*)buf1636 = min(*(short4*)buf1637, *(short4*)buf1638); + *(ushort*)buf1639 = min(*(ushort*)buf1640, *(ushort*)buf1641); + *(ushort2*)buf1642 = min(*(ushort2*)buf1643, *(ushort2*)buf1644); + *(ushort3*)buf1645 = min(*(ushort3*)buf1646, *(ushort3*)buf1647); + *(ushort4*)buf1648 = min(*(ushort4*)buf1649, *(ushort4*)buf1650); + *(int*)buf1651 = min(*(int*)buf1652, *(int*)buf1653); + *(int2*)buf1654 = min(*(int2*)buf1655, *(int2*)buf1656); + *(int3*)buf1657 = min(*(int3*)buf1658, *(int3*)buf1659); + *(int4*)buf1660 = min(*(int4*)buf1661, *(int4*)buf1662); + *(uint*)buf1663 = min(*(uint*)buf1664, *(uint*)buf1665); + *(uint2*)buf1666 = min(*(uint2*)buf1667, *(uint2*)buf1668); + *(uint3*)buf1669 = min(*(uint3*)buf1670, *(uint3*)buf1671); + *(uint4*)buf1672 = min(*(uint4*)buf1673, *(uint4*)buf1674); + *(long*)buf1675 = min(*(long*)buf1676, *(long*)buf1677); + *(long2*)buf1678 = min(*(long2*)buf1679, *(long2*)buf1680); + *(long3*)buf1681 = min(*(long3*)buf1682, *(long3*)buf1683); + *(long4*)buf1684 = min(*(long4*)buf1685, *(long4*)buf1686); + *(ulong*)buf1687 = min(*(ulong*)buf1688, *(ulong*)buf1689); + *(ulong2*)buf1690 = min(*(ulong2*)buf1691, *(ulong2*)buf1692); + *(ulong3*)buf1693 = min(*(ulong3*)buf1694, *(ulong3*)buf1695); + *(ulong4*)buf1696 = min(*(ulong4*)buf1697, *(ulong4*)buf1698); + *(float*)buf1699 = mix(*(float*)buf1700, *(float*)buf1701, *(float*)buf1702); + *(float2*)buf1703 = mix(*(float2*)buf1704, *(float2*)buf1705, *(float2*)buf1706); + *(float3*)buf1707 = mix(*(float3*)buf1708, *(float3*)buf1709, *(float3*)buf1710); + *(float4*)buf1711 = mix(*(float4*)buf1712, *(float4*)buf1713, *(float4*)buf1714); + *(float2*)buf1715 = mix(*(float2*)buf1716, *(float2*)buf1717, *(float*)buf1718); + *(float3*)buf1719 = mix(*(float3*)buf1720, *(float3*)buf1721, *(float*)buf1722); + *(float4*)buf1723 = mix(*(float4*)buf1724, *(float4*)buf1725, *(float*)buf1726); + *(float*)buf1727 = modf(*(float*)buf1728, (float*) buf1729); + *(float2*)buf1730 = modf(*(float2*)buf1731, (float2*) buf1732); + *(float3*)buf1733 = modf(*(float3*)buf1734, (float3*) buf1735); + *(float4*)buf1736 = modf(*(float4*)buf1737, (float4*) buf1738); + *(float*)buf1739 = nan(*(uint*)buf1740); + *(float*)buf1741 = native_acos(*(float*)buf1742); + *(float2*)buf1743 = native_acos(*(float2*)buf1744); + *(float3*)buf1745 = native_acos(*(float3*)buf1746); + *(float4*)buf1747 = native_acos(*(float4*)buf1748); + *(float*)buf1749 = native_acosh(*(float*)buf1750); + *(float2*)buf1751 = native_acosh(*(float2*)buf1752); + *(float3*)buf1753 = native_acosh(*(float3*)buf1754); + *(float4*)buf1755 = native_acosh(*(float4*)buf1756); + *(float*)buf1757 = native_acospi(*(float*)buf1758); + *(float2*)buf1759 = native_acospi(*(float2*)buf1760); + *(float3*)buf1761 = native_acospi(*(float3*)buf1762); + *(float4*)buf1763 = native_acospi(*(float4*)buf1764); + *(float*)buf1765 = native_asin(*(float*)buf1766); + *(float2*)buf1767 = native_asin(*(float2*)buf1768); + *(float3*)buf1769 = native_asin(*(float3*)buf1770); + *(float4*)buf1771 = native_asin(*(float4*)buf1772); + *(float*)buf1773 = native_asinh(*(float*)buf1774); + *(float2*)buf1775 = native_asinh(*(float2*)buf1776); + *(float3*)buf1777 = native_asinh(*(float3*)buf1778); + *(float4*)buf1779 = native_asinh(*(float4*)buf1780); + *(float*)buf1781 = native_asinpi(*(float*)buf1782); + *(float2*)buf1783 = native_asinpi(*(float2*)buf1784); + *(float3*)buf1785 = native_asinpi(*(float3*)buf1786); + *(float4*)buf1787 = native_asinpi(*(float4*)buf1788); + *(float*)buf1789 = native_atan(*(float*)buf1790); + *(float2*)buf1791 = native_atan(*(float2*)buf1792); + *(float3*)buf1793 = native_atan(*(float3*)buf1794); + *(float4*)buf1795 = native_atan(*(float4*)buf1796); + *(float*)buf1797 = native_atan2(*(float*)buf1798, *(float*)buf1799); + *(float2*)buf1800 = native_atan2(*(float2*)buf1801, *(float2*)buf1802); + *(float3*)buf1803 = native_atan2(*(float3*)buf1804, *(float3*)buf1805); + *(float4*)buf1806 = native_atan2(*(float4*)buf1807, *(float4*)buf1808); + *(float*)buf1809 = native_atan2pi(*(float*)buf1810, *(float*)buf1811); + *(float2*)buf1812 = native_atan2pi(*(float2*)buf1813, *(float2*)buf1814); + *(float3*)buf1815 = native_atan2pi(*(float3*)buf1816, *(float3*)buf1817); + *(float4*)buf1818 = native_atan2pi(*(float4*)buf1819, *(float4*)buf1820); + *(float*)buf1821 = native_atanh(*(float*)buf1822); + *(float2*)buf1823 = native_atanh(*(float2*)buf1824); + *(float3*)buf1825 = native_atanh(*(float3*)buf1826); + *(float4*)buf1827 = native_atanh(*(float4*)buf1828); + *(float*)buf1829 = native_atanpi(*(float*)buf1830); + *(float2*)buf1831 = native_atanpi(*(float2*)buf1832); + *(float3*)buf1833 = native_atanpi(*(float3*)buf1834); + *(float4*)buf1835 = native_atanpi(*(float4*)buf1836); + *(float*)buf1837 = native_cbrt(*(float*)buf1838); + *(float2*)buf1839 = native_cbrt(*(float2*)buf1840); + *(float3*)buf1841 = native_cbrt(*(float3*)buf1842); + *(float4*)buf1843 = native_cbrt(*(float4*)buf1844); + *(float*)buf1845 = native_cos(*(float*)buf1846); + *(float2*)buf1847 = native_cos(*(float2*)buf1848); + *(float3*)buf1849 = native_cos(*(float3*)buf1850); + *(float4*)buf1851 = native_cos(*(float4*)buf1852); + *(float*)buf1853 = native_cosh(*(float*)buf1854); + *(float2*)buf1855 = native_cosh(*(float2*)buf1856); + *(float3*)buf1857 = native_cosh(*(float3*)buf1858); + *(float4*)buf1859 = native_cosh(*(float4*)buf1860); + *(float*)buf1861 = native_cospi(*(float*)buf1862); + *(float2*)buf1863 = native_cospi(*(float2*)buf1864); + *(float3*)buf1865 = native_cospi(*(float3*)buf1866); + *(float4*)buf1867 = native_cospi(*(float4*)buf1868); + *(float*)buf1869 = native_distance(*(float*)buf1870, *(float*)buf1871); + *(float*)buf1872 = native_distance(*(float2*)buf1873, *(float2*)buf1874); + *(float*)buf1875 = native_distance(*(float3*)buf1876, *(float3*)buf1877); + *(float*)buf1878 = native_distance(*(float4*)buf1879, *(float4*)buf1880); + *(float*)buf1881 = native_divide(*(float*)buf1882, *(float*)buf1883); + *(float2*)buf1884 = native_divide(*(float2*)buf1885, *(float2*)buf1886); + *(float3*)buf1887 = native_divide(*(float3*)buf1888, *(float3*)buf1889); + *(float4*)buf1890 = native_divide(*(float4*)buf1891, *(float4*)buf1892); + *(float*)buf1893 = native_exp(*(float*)buf1894); + *(float2*)buf1895 = native_exp(*(float2*)buf1896); + *(float3*)buf1897 = native_exp(*(float3*)buf1898); + *(float4*)buf1899 = native_exp(*(float4*)buf1900); + *(float*)buf1901 = native_exp10(*(float*)buf1902); + *(float2*)buf1903 = native_exp10(*(float2*)buf1904); + *(float3*)buf1905 = native_exp10(*(float3*)buf1906); + *(float4*)buf1907 = native_exp10(*(float4*)buf1908); + *(float*)buf1909 = native_exp2(*(float*)buf1910); + *(float2*)buf1911 = native_exp2(*(float2*)buf1912); + *(float3*)buf1913 = native_exp2(*(float3*)buf1914); + *(float4*)buf1915 = native_exp2(*(float4*)buf1916); + *(float*)buf1917 = native_expm1(*(float*)buf1918); + *(float2*)buf1919 = native_expm1(*(float2*)buf1920); + *(float3*)buf1921 = native_expm1(*(float3*)buf1922); + *(float4*)buf1923 = native_expm1(*(float4*)buf1924); + *(float*)buf1925 = native_hypot(*(float*)buf1926, *(float*)buf1927); + *(float2*)buf1928 = native_hypot(*(float2*)buf1929, *(float2*)buf1930); + *(float3*)buf1931 = native_hypot(*(float3*)buf1932, *(float3*)buf1933); + *(float4*)buf1934 = native_hypot(*(float4*)buf1935, *(float4*)buf1936); + *(float*)buf1937 = native_length(*(float*)buf1938); + *(float*)buf1939 = native_length(*(float2*)buf1940); + *(float*)buf1941 = native_length(*(float3*)buf1942); + *(float*)buf1943 = native_length(*(float4*)buf1944); + *(float*)buf1945 = native_log(*(float*)buf1946); + *(float2*)buf1947 = native_log(*(float2*)buf1948); + *(float3*)buf1949 = native_log(*(float3*)buf1950); + *(float4*)buf1951 = native_log(*(float4*)buf1952); + *(float*)buf1953 = native_log10(*(float*)buf1954); + *(float2*)buf1955 = native_log10(*(float2*)buf1956); + *(float3*)buf1957 = native_log10(*(float3*)buf1958); + *(float4*)buf1959 = native_log10(*(float4*)buf1960); + *(float*)buf1961 = native_log1p(*(float*)buf1962); + *(float2*)buf1963 = native_log1p(*(float2*)buf1964); + *(float3*)buf1965 = native_log1p(*(float3*)buf1966); + *(float4*)buf1967 = native_log1p(*(float4*)buf1968); + *(float*)buf1969 = native_log2(*(float*)buf1970); + *(float2*)buf1971 = native_log2(*(float2*)buf1972); + *(float3*)buf1973 = native_log2(*(float3*)buf1974); + *(float4*)buf1975 = native_log2(*(float4*)buf1976); + *(float*)buf1977 = native_normalize(*(float*)buf1978); + *(float2*)buf1979 = native_normalize(*(float2*)buf1980); + *(float3*)buf1981 = native_normalize(*(float3*)buf1982); + *(float4*)buf1983 = native_normalize(*(float4*)buf1984); + *(float*)buf1985 = native_powr(*(float*)buf1986, *(float*)buf1987); + *(float2*)buf1988 = native_powr(*(float2*)buf1989, *(float2*)buf1990); + *(float3*)buf1991 = native_powr(*(float3*)buf1992, *(float3*)buf1993); + *(float4*)buf1994 = native_powr(*(float4*)buf1995, *(float4*)buf1996); + *(float*)buf1997 = native_recip(*(float*)buf1998); + *(float2*)buf1999 = native_recip(*(float2*)buf2000); + *(float3*)buf2001 = native_recip(*(float3*)buf2002); + *(float4*)buf2003 = native_recip(*(float4*)buf2004); + *(float*)buf2005 = native_rootn(*(float*)buf2006, *(int*)buf2007); + *(float2*)buf2008 = native_rootn(*(float2*)buf2009, *(int2*)buf2010); + *(float3*)buf2011 = native_rootn(*(float3*)buf2012, *(int3*)buf2013); + *(float4*)buf2014 = native_rootn(*(float4*)buf2015, *(int4*)buf2016); + *(float*)buf2017 = native_rsqrt(*(float*)buf2018); + *(float2*)buf2019 = native_rsqrt(*(float2*)buf2020); + *(float3*)buf2021 = native_rsqrt(*(float3*)buf2022); + *(float4*)buf2023 = native_rsqrt(*(float4*)buf2024); + *(float*)buf2025 = native_sin(*(float*)buf2026); + *(float2*)buf2027 = native_sin(*(float2*)buf2028); + *(float3*)buf2029 = native_sin(*(float3*)buf2030); + *(float4*)buf2031 = native_sin(*(float4*)buf2032); + *(float*)buf2033 = native_sincos(*(float*)buf2034, (float*) buf2035); + *(float2*)buf2036 = native_sincos(*(float2*)buf2037, (float2*) buf2038); + *(float3*)buf2039 = native_sincos(*(float3*)buf2040, (float3*) buf2041); + *(float4*)buf2042 = native_sincos(*(float4*)buf2043, (float4*) buf2044); + *(float*)buf2045 = native_sinh(*(float*)buf2046); + *(float2*)buf2047 = native_sinh(*(float2*)buf2048); + *(float3*)buf2049 = native_sinh(*(float3*)buf2050); + *(float4*)buf2051 = native_sinh(*(float4*)buf2052); + *(float*)buf2053 = native_sinpi(*(float*)buf2054); + *(float2*)buf2055 = native_sinpi(*(float2*)buf2056); + *(float3*)buf2057 = native_sinpi(*(float3*)buf2058); + *(float4*)buf2059 = native_sinpi(*(float4*)buf2060); + *(float*)buf2061 = native_sqrt(*(float*)buf2062); + *(float2*)buf2063 = native_sqrt(*(float2*)buf2064); + *(float3*)buf2065 = native_sqrt(*(float3*)buf2066); + *(float4*)buf2067 = native_sqrt(*(float4*)buf2068); + *(float*)buf2069 = native_tan(*(float*)buf2070); + *(float2*)buf2071 = native_tan(*(float2*)buf2072); + *(float3*)buf2073 = native_tan(*(float3*)buf2074); + *(float4*)buf2075 = native_tan(*(float4*)buf2076); + *(float*)buf2077 = native_tanh(*(float*)buf2078); + *(float2*)buf2079 = native_tanh(*(float2*)buf2080); + *(float3*)buf2081 = native_tanh(*(float3*)buf2082); + *(float4*)buf2083 = native_tanh(*(float4*)buf2084); + *(float*)buf2085 = native_tanpi(*(float*)buf2086); + *(float2*)buf2087 = native_tanpi(*(float2*)buf2088); + *(float3*)buf2089 = native_tanpi(*(float3*)buf2090); + *(float4*)buf2091 = native_tanpi(*(float4*)buf2092); + *(float*)buf2093 = nextafter(*(float*)buf2094, *(float*)buf2095); + *(float2*)buf2096 = nextafter(*(float2*)buf2097, *(float2*)buf2098); + *(float3*)buf2099 = nextafter(*(float3*)buf2100, *(float3*)buf2101); + *(float4*)buf2102 = nextafter(*(float4*)buf2103, *(float4*)buf2104); + *(float*)buf2105 = normalize(*(float*)buf2106); + *(float2*)buf2107 = normalize(*(float2*)buf2108); + *(float3*)buf2109 = normalize(*(float3*)buf2110); + *(float4*)buf2111 = normalize(*(float4*)buf2112); + *(float*)buf2113 = pow(*(float*)buf2114, *(float*)buf2115); + *(float2*)buf2116 = pow(*(float2*)buf2117, *(float2*)buf2118); + *(float3*)buf2119 = pow(*(float3*)buf2120, *(float3*)buf2121); + *(float4*)buf2122 = pow(*(float4*)buf2123, *(float4*)buf2124); + *(float*)buf2125 = pown(*(float*)buf2126, *(int*)buf2127); + *(float2*)buf2128 = pown(*(float2*)buf2129, *(int2*)buf2130); + *(float3*)buf2131 = pown(*(float3*)buf2132, *(int3*)buf2133); + *(float4*)buf2134 = pown(*(float4*)buf2135, *(int4*)buf2136); + *(float*)buf2137 = powr(*(float*)buf2138, *(float*)buf2139); + *(float2*)buf2140 = powr(*(float2*)buf2141, *(float2*)buf2142); + *(float3*)buf2143 = powr(*(float3*)buf2144, *(float3*)buf2145); + *(float4*)buf2146 = powr(*(float4*)buf2147, *(float4*)buf2148); + *(float*)buf2149 = radians(*(float*)buf2150); + *(float2*)buf2151 = radians(*(float2*)buf2152); + *(float3*)buf2153 = radians(*(float3*)buf2154); + *(float4*)buf2155 = radians(*(float4*)buf2156); + *(float*)buf2157 = remainder(*(float*)buf2158, *(float*)buf2159); + *(float2*)buf2160 = remainder(*(float2*)buf2161, *(float2*)buf2162); + *(float3*)buf2163 = remainder(*(float3*)buf2164, *(float3*)buf2165); + *(float4*)buf2166 = remainder(*(float4*)buf2167, *(float4*)buf2168); + *(float*)buf2169 = remquo(*(float*)buf2170, *(float*)buf2171, (int*) buf2172); + *(float2*)buf2173 = remquo(*(float2*)buf2174, *(float2*)buf2175, (int2*) buf2176); + *(float3*)buf2177 = remquo(*(float3*)buf2178, *(float3*)buf2179, (int3*) buf2180); + *(float4*)buf2181 = remquo(*(float4*)buf2182, *(float4*)buf2183, (int4*) buf2184); + *(float*)buf2185 = rint(*(float*)buf2186); + *(float2*)buf2187 = rint(*(float2*)buf2188); + *(float3*)buf2189 = rint(*(float3*)buf2190); + *(float4*)buf2191 = rint(*(float4*)buf2192); + *(float*)buf2193 = rootn(*(float*)buf2194, *(int*)buf2195); + *(float2*)buf2196 = rootn(*(float2*)buf2197, *(int2*)buf2198); + *(float3*)buf2199 = rootn(*(float3*)buf2200, *(int3*)buf2201); + *(float4*)buf2202 = rootn(*(float4*)buf2203, *(int4*)buf2204); + *(float*)buf2205 = round(*(float*)buf2206); + *(float2*)buf2207 = round(*(float2*)buf2208); + *(float3*)buf2209 = round(*(float3*)buf2210); + *(float4*)buf2211 = round(*(float4*)buf2212); + rsAllocationCopy1DRange(*(rs_allocation*)buf2213, *(uint32_t*)buf2214, *(uint32_t*)buf2215, *(uint32_t*)buf2216, *(rs_allocation*)buf2217, *(uint32_t*)buf2218, *(uint32_t*)buf2219); + rsAllocationCopy2DRange(*(rs_allocation*)buf2220, *(uint32_t*)buf2221, *(uint32_t*)buf2222, *(uint32_t*)buf2223, *(rs_allocation_cubemap_face*)buf2224, *(uint32_t*)buf2225, *(uint32_t*)buf2226, *(rs_allocation*)buf2227, *(uint32_t*)buf2228, *(uint32_t*)buf2229, *(uint32_t*)buf2230, *(rs_allocation_cubemap_face*)buf2231); + *(uint32_t*)buf2232 = rsAllocationGetDimFaces(*(rs_allocation*)buf2233); + *(uint32_t*)buf2234 = rsAllocationGetDimLOD(*(rs_allocation*)buf2235); + *(uint32_t*)buf2236 = rsAllocationGetDimX(*(rs_allocation*)buf2237); + *(uint32_t*)buf2238 = rsAllocationGetDimY(*(rs_allocation*)buf2239); + *(uint32_t*)buf2240 = rsAllocationGetDimZ(*(rs_allocation*)buf2241); + *(rs_element*)buf2242 = rsAllocationGetElement(*(rs_allocation*)buf2243); + rsAllocationIoReceive(*(rs_allocation*)buf2244); + rsAllocationIoSend(*(rs_allocation*)buf2245); + *(float2*)buf2246 = rsAllocationVLoadX_float2(*(rs_allocation*)buf2247, *(uint32_t*)buf2248); + *(float3*)buf2249 = rsAllocationVLoadX_float3(*(rs_allocation*)buf2250, *(uint32_t*)buf2251); + *(float4*)buf2252 = rsAllocationVLoadX_float4(*(rs_allocation*)buf2253, *(uint32_t*)buf2254); + *(double2*)buf2255 = rsAllocationVLoadX_double2(*(rs_allocation*)buf2256, *(uint32_t*)buf2257); + *(double3*)buf2258 = rsAllocationVLoadX_double3(*(rs_allocation*)buf2259, *(uint32_t*)buf2260); + *(double4*)buf2261 = rsAllocationVLoadX_double4(*(rs_allocation*)buf2262, *(uint32_t*)buf2263); + *(char2*)buf2264 = rsAllocationVLoadX_char2(*(rs_allocation*)buf2265, *(uint32_t*)buf2266); + *(char3*)buf2267 = rsAllocationVLoadX_char3(*(rs_allocation*)buf2268, *(uint32_t*)buf2269); + *(char4*)buf2270 = rsAllocationVLoadX_char4(*(rs_allocation*)buf2271, *(uint32_t*)buf2272); + *(uchar2*)buf2273 = rsAllocationVLoadX_uchar2(*(rs_allocation*)buf2274, *(uint32_t*)buf2275); + *(uchar3*)buf2276 = rsAllocationVLoadX_uchar3(*(rs_allocation*)buf2277, *(uint32_t*)buf2278); + *(uchar4*)buf2279 = rsAllocationVLoadX_uchar4(*(rs_allocation*)buf2280, *(uint32_t*)buf2281); + *(short2*)buf2282 = rsAllocationVLoadX_short2(*(rs_allocation*)buf2283, *(uint32_t*)buf2284); + *(short3*)buf2285 = rsAllocationVLoadX_short3(*(rs_allocation*)buf2286, *(uint32_t*)buf2287); + *(short4*)buf2288 = rsAllocationVLoadX_short4(*(rs_allocation*)buf2289, *(uint32_t*)buf2290); + *(ushort2*)buf2291 = rsAllocationVLoadX_ushort2(*(rs_allocation*)buf2292, *(uint32_t*)buf2293); + *(ushort3*)buf2294 = rsAllocationVLoadX_ushort3(*(rs_allocation*)buf2295, *(uint32_t*)buf2296); + *(ushort4*)buf2297 = rsAllocationVLoadX_ushort4(*(rs_allocation*)buf2298, *(uint32_t*)buf2299); + *(int2*)buf2300 = rsAllocationVLoadX_int2(*(rs_allocation*)buf2301, *(uint32_t*)buf2302); + *(int3*)buf2303 = rsAllocationVLoadX_int3(*(rs_allocation*)buf2304, *(uint32_t*)buf2305); + *(int4*)buf2306 = rsAllocationVLoadX_int4(*(rs_allocation*)buf2307, *(uint32_t*)buf2308); + *(uint2*)buf2309 = rsAllocationVLoadX_uint2(*(rs_allocation*)buf2310, *(uint32_t*)buf2311); + *(uint3*)buf2312 = rsAllocationVLoadX_uint3(*(rs_allocation*)buf2313, *(uint32_t*)buf2314); + *(uint4*)buf2315 = rsAllocationVLoadX_uint4(*(rs_allocation*)buf2316, *(uint32_t*)buf2317); + *(long2*)buf2318 = rsAllocationVLoadX_long2(*(rs_allocation*)buf2319, *(uint32_t*)buf2320); + *(long3*)buf2321 = rsAllocationVLoadX_long3(*(rs_allocation*)buf2322, *(uint32_t*)buf2323); + *(long4*)buf2324 = rsAllocationVLoadX_long4(*(rs_allocation*)buf2325, *(uint32_t*)buf2326); + *(ulong2*)buf2327 = rsAllocationVLoadX_ulong2(*(rs_allocation*)buf2328, *(uint32_t*)buf2329); + *(ulong3*)buf2330 = rsAllocationVLoadX_ulong3(*(rs_allocation*)buf2331, *(uint32_t*)buf2332); + *(ulong4*)buf2333 = rsAllocationVLoadX_ulong4(*(rs_allocation*)buf2334, *(uint32_t*)buf2335); + *(float2*)buf2336 = rsAllocationVLoadX_float2(*(rs_allocation*)buf2337, *(uint32_t*)buf2338, *(uint32_t*)buf2339); + *(float3*)buf2340 = rsAllocationVLoadX_float3(*(rs_allocation*)buf2341, *(uint32_t*)buf2342, *(uint32_t*)buf2343); + *(float4*)buf2344 = rsAllocationVLoadX_float4(*(rs_allocation*)buf2345, *(uint32_t*)buf2346, *(uint32_t*)buf2347); + *(double2*)buf2348 = rsAllocationVLoadX_double2(*(rs_allocation*)buf2349, *(uint32_t*)buf2350, *(uint32_t*)buf2351); + *(double3*)buf2352 = rsAllocationVLoadX_double3(*(rs_allocation*)buf2353, *(uint32_t*)buf2354, *(uint32_t*)buf2355); + *(double4*)buf2356 = rsAllocationVLoadX_double4(*(rs_allocation*)buf2357, *(uint32_t*)buf2358, *(uint32_t*)buf2359); + *(char2*)buf2360 = rsAllocationVLoadX_char2(*(rs_allocation*)buf2361, *(uint32_t*)buf2362, *(uint32_t*)buf2363); + *(char3*)buf2364 = rsAllocationVLoadX_char3(*(rs_allocation*)buf2365, *(uint32_t*)buf2366, *(uint32_t*)buf2367); + *(char4*)buf2368 = rsAllocationVLoadX_char4(*(rs_allocation*)buf2369, *(uint32_t*)buf2370, *(uint32_t*)buf2371); + *(uchar2*)buf2372 = rsAllocationVLoadX_uchar2(*(rs_allocation*)buf2373, *(uint32_t*)buf2374, *(uint32_t*)buf2375); + *(uchar3*)buf2376 = rsAllocationVLoadX_uchar3(*(rs_allocation*)buf2377, *(uint32_t*)buf2378, *(uint32_t*)buf2379); + *(uchar4*)buf2380 = rsAllocationVLoadX_uchar4(*(rs_allocation*)buf2381, *(uint32_t*)buf2382, *(uint32_t*)buf2383); + *(short2*)buf2384 = rsAllocationVLoadX_short2(*(rs_allocation*)buf2385, *(uint32_t*)buf2386, *(uint32_t*)buf2387); + *(short3*)buf2388 = rsAllocationVLoadX_short3(*(rs_allocation*)buf2389, *(uint32_t*)buf2390, *(uint32_t*)buf2391); + *(short4*)buf2392 = rsAllocationVLoadX_short4(*(rs_allocation*)buf2393, *(uint32_t*)buf2394, *(uint32_t*)buf2395); + *(ushort2*)buf2396 = rsAllocationVLoadX_ushort2(*(rs_allocation*)buf2397, *(uint32_t*)buf2398, *(uint32_t*)buf2399); + *(ushort3*)buf2400 = rsAllocationVLoadX_ushort3(*(rs_allocation*)buf2401, *(uint32_t*)buf2402, *(uint32_t*)buf2403); + *(ushort4*)buf2404 = rsAllocationVLoadX_ushort4(*(rs_allocation*)buf2405, *(uint32_t*)buf2406, *(uint32_t*)buf2407); + *(int2*)buf2408 = rsAllocationVLoadX_int2(*(rs_allocation*)buf2409, *(uint32_t*)buf2410, *(uint32_t*)buf2411); + *(int3*)buf2412 = rsAllocationVLoadX_int3(*(rs_allocation*)buf2413, *(uint32_t*)buf2414, *(uint32_t*)buf2415); + *(int4*)buf2416 = rsAllocationVLoadX_int4(*(rs_allocation*)buf2417, *(uint32_t*)buf2418, *(uint32_t*)buf2419); + *(uint2*)buf2420 = rsAllocationVLoadX_uint2(*(rs_allocation*)buf2421, *(uint32_t*)buf2422, *(uint32_t*)buf2423); + *(uint3*)buf2424 = rsAllocationVLoadX_uint3(*(rs_allocation*)buf2425, *(uint32_t*)buf2426, *(uint32_t*)buf2427); + *(uint4*)buf2428 = rsAllocationVLoadX_uint4(*(rs_allocation*)buf2429, *(uint32_t*)buf2430, *(uint32_t*)buf2431); + *(long2*)buf2432 = rsAllocationVLoadX_long2(*(rs_allocation*)buf2433, *(uint32_t*)buf2434, *(uint32_t*)buf2435); + *(long3*)buf2436 = rsAllocationVLoadX_long3(*(rs_allocation*)buf2437, *(uint32_t*)buf2438, *(uint32_t*)buf2439); + *(long4*)buf2440 = rsAllocationVLoadX_long4(*(rs_allocation*)buf2441, *(uint32_t*)buf2442, *(uint32_t*)buf2443); + *(ulong2*)buf2444 = rsAllocationVLoadX_ulong2(*(rs_allocation*)buf2445, *(uint32_t*)buf2446, *(uint32_t*)buf2447); + *(ulong3*)buf2448 = rsAllocationVLoadX_ulong3(*(rs_allocation*)buf2449, *(uint32_t*)buf2450, *(uint32_t*)buf2451); + *(ulong4*)buf2452 = rsAllocationVLoadX_ulong4(*(rs_allocation*)buf2453, *(uint32_t*)buf2454, *(uint32_t*)buf2455); + *(float2*)buf2456 = rsAllocationVLoadX_float2(*(rs_allocation*)buf2457, *(uint32_t*)buf2458, *(uint32_t*)buf2459, *(uint32_t*)buf2460); + *(float3*)buf2461 = rsAllocationVLoadX_float3(*(rs_allocation*)buf2462, *(uint32_t*)buf2463, *(uint32_t*)buf2464, *(uint32_t*)buf2465); + *(float4*)buf2466 = rsAllocationVLoadX_float4(*(rs_allocation*)buf2467, *(uint32_t*)buf2468, *(uint32_t*)buf2469, *(uint32_t*)buf2470); + *(double2*)buf2471 = rsAllocationVLoadX_double2(*(rs_allocation*)buf2472, *(uint32_t*)buf2473, *(uint32_t*)buf2474, *(uint32_t*)buf2475); + *(double3*)buf2476 = rsAllocationVLoadX_double3(*(rs_allocation*)buf2477, *(uint32_t*)buf2478, *(uint32_t*)buf2479, *(uint32_t*)buf2480); + *(double4*)buf2481 = rsAllocationVLoadX_double4(*(rs_allocation*)buf2482, *(uint32_t*)buf2483, *(uint32_t*)buf2484, *(uint32_t*)buf2485); + *(char2*)buf2486 = rsAllocationVLoadX_char2(*(rs_allocation*)buf2487, *(uint32_t*)buf2488, *(uint32_t*)buf2489, *(uint32_t*)buf2490); + *(char3*)buf2491 = rsAllocationVLoadX_char3(*(rs_allocation*)buf2492, *(uint32_t*)buf2493, *(uint32_t*)buf2494, *(uint32_t*)buf2495); + *(char4*)buf2496 = rsAllocationVLoadX_char4(*(rs_allocation*)buf2497, *(uint32_t*)buf2498, *(uint32_t*)buf2499, *(uint32_t*)buf2500); + *(uchar2*)buf2501 = rsAllocationVLoadX_uchar2(*(rs_allocation*)buf2502, *(uint32_t*)buf2503, *(uint32_t*)buf2504, *(uint32_t*)buf2505); + *(uchar3*)buf2506 = rsAllocationVLoadX_uchar3(*(rs_allocation*)buf2507, *(uint32_t*)buf2508, *(uint32_t*)buf2509, *(uint32_t*)buf2510); + *(uchar4*)buf2511 = rsAllocationVLoadX_uchar4(*(rs_allocation*)buf2512, *(uint32_t*)buf2513, *(uint32_t*)buf2514, *(uint32_t*)buf2515); + *(short2*)buf2516 = rsAllocationVLoadX_short2(*(rs_allocation*)buf2517, *(uint32_t*)buf2518, *(uint32_t*)buf2519, *(uint32_t*)buf2520); + *(short3*)buf2521 = rsAllocationVLoadX_short3(*(rs_allocation*)buf2522, *(uint32_t*)buf2523, *(uint32_t*)buf2524, *(uint32_t*)buf2525); + *(short4*)buf2526 = rsAllocationVLoadX_short4(*(rs_allocation*)buf2527, *(uint32_t*)buf2528, *(uint32_t*)buf2529, *(uint32_t*)buf2530); + *(ushort2*)buf2531 = rsAllocationVLoadX_ushort2(*(rs_allocation*)buf2532, *(uint32_t*)buf2533, *(uint32_t*)buf2534, *(uint32_t*)buf2535); + *(ushort3*)buf2536 = rsAllocationVLoadX_ushort3(*(rs_allocation*)buf2537, *(uint32_t*)buf2538, *(uint32_t*)buf2539, *(uint32_t*)buf2540); + *(ushort4*)buf2541 = rsAllocationVLoadX_ushort4(*(rs_allocation*)buf2542, *(uint32_t*)buf2543, *(uint32_t*)buf2544, *(uint32_t*)buf2545); + *(int2*)buf2546 = rsAllocationVLoadX_int2(*(rs_allocation*)buf2547, *(uint32_t*)buf2548, *(uint32_t*)buf2549, *(uint32_t*)buf2550); + *(int3*)buf2551 = rsAllocationVLoadX_int3(*(rs_allocation*)buf2552, *(uint32_t*)buf2553, *(uint32_t*)buf2554, *(uint32_t*)buf2555); + *(int4*)buf2556 = rsAllocationVLoadX_int4(*(rs_allocation*)buf2557, *(uint32_t*)buf2558, *(uint32_t*)buf2559, *(uint32_t*)buf2560); + *(uint2*)buf2561 = rsAllocationVLoadX_uint2(*(rs_allocation*)buf2562, *(uint32_t*)buf2563, *(uint32_t*)buf2564, *(uint32_t*)buf2565); + *(uint3*)buf2566 = rsAllocationVLoadX_uint3(*(rs_allocation*)buf2567, *(uint32_t*)buf2568, *(uint32_t*)buf2569, *(uint32_t*)buf2570); + *(uint4*)buf2571 = rsAllocationVLoadX_uint4(*(rs_allocation*)buf2572, *(uint32_t*)buf2573, *(uint32_t*)buf2574, *(uint32_t*)buf2575); + *(long2*)buf2576 = rsAllocationVLoadX_long2(*(rs_allocation*)buf2577, *(uint32_t*)buf2578, *(uint32_t*)buf2579, *(uint32_t*)buf2580); + *(long3*)buf2581 = rsAllocationVLoadX_long3(*(rs_allocation*)buf2582, *(uint32_t*)buf2583, *(uint32_t*)buf2584, *(uint32_t*)buf2585); + *(long4*)buf2586 = rsAllocationVLoadX_long4(*(rs_allocation*)buf2587, *(uint32_t*)buf2588, *(uint32_t*)buf2589, *(uint32_t*)buf2590); + *(ulong2*)buf2591 = rsAllocationVLoadX_ulong2(*(rs_allocation*)buf2592, *(uint32_t*)buf2593, *(uint32_t*)buf2594, *(uint32_t*)buf2595); + *(ulong3*)buf2596 = rsAllocationVLoadX_ulong3(*(rs_allocation*)buf2597, *(uint32_t*)buf2598, *(uint32_t*)buf2599, *(uint32_t*)buf2600); + *(ulong4*)buf2601 = rsAllocationVLoadX_ulong4(*(rs_allocation*)buf2602, *(uint32_t*)buf2603, *(uint32_t*)buf2604, *(uint32_t*)buf2605); + rsAllocationVStoreX_float2(*(rs_allocation*)buf2606, *(float2*)buf2607, *(uint32_t*)buf2608); + rsAllocationVStoreX_float3(*(rs_allocation*)buf2609, *(float3*)buf2610, *(uint32_t*)buf2611); + rsAllocationVStoreX_float4(*(rs_allocation*)buf2612, *(float4*)buf2613, *(uint32_t*)buf2614); + rsAllocationVStoreX_double2(*(rs_allocation*)buf2615, *(double2*)buf2616, *(uint32_t*)buf2617); + rsAllocationVStoreX_double3(*(rs_allocation*)buf2618, *(double3*)buf2619, *(uint32_t*)buf2620); + rsAllocationVStoreX_double4(*(rs_allocation*)buf2621, *(double4*)buf2622, *(uint32_t*)buf2623); + rsAllocationVStoreX_char2(*(rs_allocation*)buf2624, *(char2*)buf2625, *(uint32_t*)buf2626); + rsAllocationVStoreX_char3(*(rs_allocation*)buf2627, *(char3*)buf2628, *(uint32_t*)buf2629); + rsAllocationVStoreX_char4(*(rs_allocation*)buf2630, *(char4*)buf2631, *(uint32_t*)buf2632); + rsAllocationVStoreX_uchar2(*(rs_allocation*)buf2633, *(uchar2*)buf2634, *(uint32_t*)buf2635); + rsAllocationVStoreX_uchar3(*(rs_allocation*)buf2636, *(uchar3*)buf2637, *(uint32_t*)buf2638); + rsAllocationVStoreX_uchar4(*(rs_allocation*)buf2639, *(uchar4*)buf2640, *(uint32_t*)buf2641); + rsAllocationVStoreX_short2(*(rs_allocation*)buf2642, *(short2*)buf2643, *(uint32_t*)buf2644); + rsAllocationVStoreX_short3(*(rs_allocation*)buf2645, *(short3*)buf2646, *(uint32_t*)buf2647); + rsAllocationVStoreX_short4(*(rs_allocation*)buf2648, *(short4*)buf2649, *(uint32_t*)buf2650); + rsAllocationVStoreX_ushort2(*(rs_allocation*)buf2651, *(ushort2*)buf2652, *(uint32_t*)buf2653); + rsAllocationVStoreX_ushort3(*(rs_allocation*)buf2654, *(ushort3*)buf2655, *(uint32_t*)buf2656); + rsAllocationVStoreX_ushort4(*(rs_allocation*)buf2657, *(ushort4*)buf2658, *(uint32_t*)buf2659); + rsAllocationVStoreX_int2(*(rs_allocation*)buf2660, *(int2*)buf2661, *(uint32_t*)buf2662); + rsAllocationVStoreX_int3(*(rs_allocation*)buf2663, *(int3*)buf2664, *(uint32_t*)buf2665); + rsAllocationVStoreX_int4(*(rs_allocation*)buf2666, *(int4*)buf2667, *(uint32_t*)buf2668); + rsAllocationVStoreX_uint2(*(rs_allocation*)buf2669, *(uint2*)buf2670, *(uint32_t*)buf2671); + rsAllocationVStoreX_uint3(*(rs_allocation*)buf2672, *(uint3*)buf2673, *(uint32_t*)buf2674); + rsAllocationVStoreX_uint4(*(rs_allocation*)buf2675, *(uint4*)buf2676, *(uint32_t*)buf2677); + rsAllocationVStoreX_long2(*(rs_allocation*)buf2678, *(long2*)buf2679, *(uint32_t*)buf2680); + rsAllocationVStoreX_long3(*(rs_allocation*)buf2681, *(long3*)buf2682, *(uint32_t*)buf2683); + rsAllocationVStoreX_long4(*(rs_allocation*)buf2684, *(long4*)buf2685, *(uint32_t*)buf2686); + rsAllocationVStoreX_ulong2(*(rs_allocation*)buf2687, *(ulong2*)buf2688, *(uint32_t*)buf2689); + rsAllocationVStoreX_ulong3(*(rs_allocation*)buf2690, *(ulong3*)buf2691, *(uint32_t*)buf2692); + rsAllocationVStoreX_ulong4(*(rs_allocation*)buf2693, *(ulong4*)buf2694, *(uint32_t*)buf2695); + rsAllocationVStoreX_float2(*(rs_allocation*)buf2696, *(float2*)buf2697, *(uint32_t*)buf2698, *(uint32_t*)buf2699); + rsAllocationVStoreX_float3(*(rs_allocation*)buf2700, *(float3*)buf2701, *(uint32_t*)buf2702, *(uint32_t*)buf2703); + rsAllocationVStoreX_float4(*(rs_allocation*)buf2704, *(float4*)buf2705, *(uint32_t*)buf2706, *(uint32_t*)buf2707); + rsAllocationVStoreX_double2(*(rs_allocation*)buf2708, *(double2*)buf2709, *(uint32_t*)buf2710, *(uint32_t*)buf2711); + rsAllocationVStoreX_double3(*(rs_allocation*)buf2712, *(double3*)buf2713, *(uint32_t*)buf2714, *(uint32_t*)buf2715); + rsAllocationVStoreX_double4(*(rs_allocation*)buf2716, *(double4*)buf2717, *(uint32_t*)buf2718, *(uint32_t*)buf2719); + rsAllocationVStoreX_char2(*(rs_allocation*)buf2720, *(char2*)buf2721, *(uint32_t*)buf2722, *(uint32_t*)buf2723); + rsAllocationVStoreX_char3(*(rs_allocation*)buf2724, *(char3*)buf2725, *(uint32_t*)buf2726, *(uint32_t*)buf2727); + rsAllocationVStoreX_char4(*(rs_allocation*)buf2728, *(char4*)buf2729, *(uint32_t*)buf2730, *(uint32_t*)buf2731); + rsAllocationVStoreX_uchar2(*(rs_allocation*)buf2732, *(uchar2*)buf2733, *(uint32_t*)buf2734, *(uint32_t*)buf2735); + rsAllocationVStoreX_uchar3(*(rs_allocation*)buf2736, *(uchar3*)buf2737, *(uint32_t*)buf2738, *(uint32_t*)buf2739); + rsAllocationVStoreX_uchar4(*(rs_allocation*)buf2740, *(uchar4*)buf2741, *(uint32_t*)buf2742, *(uint32_t*)buf2743); + rsAllocationVStoreX_short2(*(rs_allocation*)buf2744, *(short2*)buf2745, *(uint32_t*)buf2746, *(uint32_t*)buf2747); + rsAllocationVStoreX_short3(*(rs_allocation*)buf2748, *(short3*)buf2749, *(uint32_t*)buf2750, *(uint32_t*)buf2751); + rsAllocationVStoreX_short4(*(rs_allocation*)buf2752, *(short4*)buf2753, *(uint32_t*)buf2754, *(uint32_t*)buf2755); + rsAllocationVStoreX_ushort2(*(rs_allocation*)buf2756, *(ushort2*)buf2757, *(uint32_t*)buf2758, *(uint32_t*)buf2759); + rsAllocationVStoreX_ushort3(*(rs_allocation*)buf2760, *(ushort3*)buf2761, *(uint32_t*)buf2762, *(uint32_t*)buf2763); + rsAllocationVStoreX_ushort4(*(rs_allocation*)buf2764, *(ushort4*)buf2765, *(uint32_t*)buf2766, *(uint32_t*)buf2767); + rsAllocationVStoreX_int2(*(rs_allocation*)buf2768, *(int2*)buf2769, *(uint32_t*)buf2770, *(uint32_t*)buf2771); + rsAllocationVStoreX_int3(*(rs_allocation*)buf2772, *(int3*)buf2773, *(uint32_t*)buf2774, *(uint32_t*)buf2775); + rsAllocationVStoreX_int4(*(rs_allocation*)buf2776, *(int4*)buf2777, *(uint32_t*)buf2778, *(uint32_t*)buf2779); + rsAllocationVStoreX_uint2(*(rs_allocation*)buf2780, *(uint2*)buf2781, *(uint32_t*)buf2782, *(uint32_t*)buf2783); + rsAllocationVStoreX_uint3(*(rs_allocation*)buf2784, *(uint3*)buf2785, *(uint32_t*)buf2786, *(uint32_t*)buf2787); + rsAllocationVStoreX_uint4(*(rs_allocation*)buf2788, *(uint4*)buf2789, *(uint32_t*)buf2790, *(uint32_t*)buf2791); + rsAllocationVStoreX_long2(*(rs_allocation*)buf2792, *(long2*)buf2793, *(uint32_t*)buf2794, *(uint32_t*)buf2795); + rsAllocationVStoreX_long3(*(rs_allocation*)buf2796, *(long3*)buf2797, *(uint32_t*)buf2798, *(uint32_t*)buf2799); + rsAllocationVStoreX_long4(*(rs_allocation*)buf2800, *(long4*)buf2801, *(uint32_t*)buf2802, *(uint32_t*)buf2803); + rsAllocationVStoreX_ulong2(*(rs_allocation*)buf2804, *(ulong2*)buf2805, *(uint32_t*)buf2806, *(uint32_t*)buf2807); + rsAllocationVStoreX_ulong3(*(rs_allocation*)buf2808, *(ulong3*)buf2809, *(uint32_t*)buf2810, *(uint32_t*)buf2811); + rsAllocationVStoreX_ulong4(*(rs_allocation*)buf2812, *(ulong4*)buf2813, *(uint32_t*)buf2814, *(uint32_t*)buf2815); + rsAllocationVStoreX_float2(*(rs_allocation*)buf2816, *(float2*)buf2817, *(uint32_t*)buf2818, *(uint32_t*)buf2819, *(uint32_t*)buf2820); + rsAllocationVStoreX_float3(*(rs_allocation*)buf2821, *(float3*)buf2822, *(uint32_t*)buf2823, *(uint32_t*)buf2824, *(uint32_t*)buf2825); + rsAllocationVStoreX_float4(*(rs_allocation*)buf2826, *(float4*)buf2827, *(uint32_t*)buf2828, *(uint32_t*)buf2829, *(uint32_t*)buf2830); + rsAllocationVStoreX_double2(*(rs_allocation*)buf2831, *(double2*)buf2832, *(uint32_t*)buf2833, *(uint32_t*)buf2834, *(uint32_t*)buf2835); + rsAllocationVStoreX_double3(*(rs_allocation*)buf2836, *(double3*)buf2837, *(uint32_t*)buf2838, *(uint32_t*)buf2839, *(uint32_t*)buf2840); + rsAllocationVStoreX_double4(*(rs_allocation*)buf2841, *(double4*)buf2842, *(uint32_t*)buf2843, *(uint32_t*)buf2844, *(uint32_t*)buf2845); + rsAllocationVStoreX_char2(*(rs_allocation*)buf2846, *(char2*)buf2847, *(uint32_t*)buf2848, *(uint32_t*)buf2849, *(uint32_t*)buf2850); + rsAllocationVStoreX_char3(*(rs_allocation*)buf2851, *(char3*)buf2852, *(uint32_t*)buf2853, *(uint32_t*)buf2854, *(uint32_t*)buf2855); + rsAllocationVStoreX_char4(*(rs_allocation*)buf2856, *(char4*)buf2857, *(uint32_t*)buf2858, *(uint32_t*)buf2859, *(uint32_t*)buf2860); + rsAllocationVStoreX_uchar2(*(rs_allocation*)buf2861, *(uchar2*)buf2862, *(uint32_t*)buf2863, *(uint32_t*)buf2864, *(uint32_t*)buf2865); + rsAllocationVStoreX_uchar3(*(rs_allocation*)buf2866, *(uchar3*)buf2867, *(uint32_t*)buf2868, *(uint32_t*)buf2869, *(uint32_t*)buf2870); + rsAllocationVStoreX_uchar4(*(rs_allocation*)buf2871, *(uchar4*)buf2872, *(uint32_t*)buf2873, *(uint32_t*)buf2874, *(uint32_t*)buf2875); + rsAllocationVStoreX_short2(*(rs_allocation*)buf2876, *(short2*)buf2877, *(uint32_t*)buf2878, *(uint32_t*)buf2879, *(uint32_t*)buf2880); + rsAllocationVStoreX_short3(*(rs_allocation*)buf2881, *(short3*)buf2882, *(uint32_t*)buf2883, *(uint32_t*)buf2884, *(uint32_t*)buf2885); + rsAllocationVStoreX_short4(*(rs_allocation*)buf2886, *(short4*)buf2887, *(uint32_t*)buf2888, *(uint32_t*)buf2889, *(uint32_t*)buf2890); + rsAllocationVStoreX_ushort2(*(rs_allocation*)buf2891, *(ushort2*)buf2892, *(uint32_t*)buf2893, *(uint32_t*)buf2894, *(uint32_t*)buf2895); + rsAllocationVStoreX_ushort3(*(rs_allocation*)buf2896, *(ushort3*)buf2897, *(uint32_t*)buf2898, *(uint32_t*)buf2899, *(uint32_t*)buf2900); + rsAllocationVStoreX_ushort4(*(rs_allocation*)buf2901, *(ushort4*)buf2902, *(uint32_t*)buf2903, *(uint32_t*)buf2904, *(uint32_t*)buf2905); + rsAllocationVStoreX_int2(*(rs_allocation*)buf2906, *(int2*)buf2907, *(uint32_t*)buf2908, *(uint32_t*)buf2909, *(uint32_t*)buf2910); + rsAllocationVStoreX_int3(*(rs_allocation*)buf2911, *(int3*)buf2912, *(uint32_t*)buf2913, *(uint32_t*)buf2914, *(uint32_t*)buf2915); + rsAllocationVStoreX_int4(*(rs_allocation*)buf2916, *(int4*)buf2917, *(uint32_t*)buf2918, *(uint32_t*)buf2919, *(uint32_t*)buf2920); + rsAllocationVStoreX_uint2(*(rs_allocation*)buf2921, *(uint2*)buf2922, *(uint32_t*)buf2923, *(uint32_t*)buf2924, *(uint32_t*)buf2925); + rsAllocationVStoreX_uint3(*(rs_allocation*)buf2926, *(uint3*)buf2927, *(uint32_t*)buf2928, *(uint32_t*)buf2929, *(uint32_t*)buf2930); + rsAllocationVStoreX_uint4(*(rs_allocation*)buf2931, *(uint4*)buf2932, *(uint32_t*)buf2933, *(uint32_t*)buf2934, *(uint32_t*)buf2935); + rsAllocationVStoreX_long2(*(rs_allocation*)buf2936, *(long2*)buf2937, *(uint32_t*)buf2938, *(uint32_t*)buf2939, *(uint32_t*)buf2940); + rsAllocationVStoreX_long3(*(rs_allocation*)buf2941, *(long3*)buf2942, *(uint32_t*)buf2943, *(uint32_t*)buf2944, *(uint32_t*)buf2945); + rsAllocationVStoreX_long4(*(rs_allocation*)buf2946, *(long4*)buf2947, *(uint32_t*)buf2948, *(uint32_t*)buf2949, *(uint32_t*)buf2950); + rsAllocationVStoreX_ulong2(*(rs_allocation*)buf2951, *(ulong2*)buf2952, *(uint32_t*)buf2953, *(uint32_t*)buf2954, *(uint32_t*)buf2955); + rsAllocationVStoreX_ulong3(*(rs_allocation*)buf2956, *(ulong3*)buf2957, *(uint32_t*)buf2958, *(uint32_t*)buf2959, *(uint32_t*)buf2960); + rsAllocationVStoreX_ulong4(*(rs_allocation*)buf2961, *(ulong4*)buf2962, *(uint32_t*)buf2963, *(uint32_t*)buf2964, *(uint32_t*)buf2965); + *(int32_t*)buf2966 = rsAtomicAdd((volatile int32_t*) buf2967, *(int32_t*)buf2968); + *(int32_t*)buf2969 = rsAtomicAdd((volatile uint32_t*) buf2970, *(uint32_t*)buf2971); + *(int32_t*)buf2972 = rsAtomicAnd((volatile int32_t*) buf2973, *(int32_t*)buf2974); + *(int32_t*)buf2975 = rsAtomicAnd((volatile uint32_t*) buf2976, *(uint32_t*)buf2977); + *(int32_t*)buf2978 = rsAtomicCas((volatile int32_t*) buf2979, *(int32_t*)buf2980, *(int32_t*)buf2981); + *(uint32_t*)buf2982 = rsAtomicCas((volatile uint32_t*) buf2983, *(uint32_t*)buf2984, *(uint32_t*)buf2985); + *(int32_t*)buf2986 = rsAtomicDec((volatile int32_t*) buf2987); + *(int32_t*)buf2988 = rsAtomicDec((volatile uint32_t*) buf2989); + *(int32_t*)buf2990 = rsAtomicInc((volatile int32_t*) buf2991); + *(int32_t*)buf2992 = rsAtomicInc((volatile uint32_t*) buf2993); + *(uint32_t*)buf2994 = rsAtomicMax((volatile uint32_t*) buf2995, *(uint32_t*)buf2996); + *(int32_t*)buf2997 = rsAtomicMax((volatile int32_t*) buf2998, *(int32_t*)buf2999); + *(uint32_t*)buf3000 = rsAtomicMin((volatile uint32_t*) buf3001, *(uint32_t*)buf3002); + *(int32_t*)buf3003 = rsAtomicMin((volatile int32_t*) buf3004, *(int32_t*)buf3005); + *(int32_t*)buf3006 = rsAtomicOr((volatile int32_t*) buf3007, *(int32_t*)buf3008); + *(int32_t*)buf3009 = rsAtomicOr((volatile uint32_t*) buf3010, *(uint32_t*)buf3011); + *(int32_t*)buf3012 = rsAtomicSub((volatile int32_t*) buf3013, *(int32_t*)buf3014); + *(int32_t*)buf3015 = rsAtomicSub((volatile uint32_t*) buf3016, *(uint32_t*)buf3017); + *(int32_t*)buf3018 = rsAtomicXor((volatile int32_t*) buf3019, *(int32_t*)buf3020); + *(int32_t*)buf3021 = rsAtomicXor((volatile uint32_t*) buf3022, *(uint32_t*)buf3023); + *(char*)buf3024 = rsClamp(*(char*)buf3025, *(char*)buf3026, *(char*)buf3027); + *(uchar*)buf3028 = rsClamp(*(uchar*)buf3029, *(uchar*)buf3030, *(uchar*)buf3031); + *(short*)buf3032 = rsClamp(*(short*)buf3033, *(short*)buf3034, *(short*)buf3035); + *(ushort*)buf3036 = rsClamp(*(ushort*)buf3037, *(ushort*)buf3038, *(ushort*)buf3039); + *(int*)buf3040 = rsClamp(*(int*)buf3041, *(int*)buf3042, *(int*)buf3043); + *(uint*)buf3044 = rsClamp(*(uint*)buf3045, *(uint*)buf3046, *(uint*)buf3047); + rsClearObject((rs_element*) buf3048); + rsClearObject((rs_type*) buf3049); + rsClearObject((rs_allocation*) buf3050); + rsClearObject((rs_sampler*) buf3051); + rsClearObject((rs_script*) buf3052); +#ifndef __LP64__ + rsClearObject((rs_mesh*) buf3053); + rsClearObject((rs_program_fragment*) buf3054); + rsClearObject((rs_program_vertex*) buf3055); + rsClearObject((rs_program_raster*) buf3056); + rsClearObject((rs_program_store*) buf3057); + rsClearObject((rs_font*) buf3058); +#endif + rsDebug((const char*) buf3059, *(double*)buf3060); + rsDebug((const char*) buf3061, *(int*)buf3062); + rsDebug((const char*) buf3063, *(uint*)buf3064); + rsDebug((const char*) buf3065, *(long*)buf3066); + rsDebug((const char*) buf3067, *(ulong*)buf3068); + rsDebug((const char*) buf3069, *(int2*)buf3070); + rsDebug((const char*) buf3071, *(int3*)buf3072); + rsDebug((const char*) buf3073, *(int4*)buf3074); + rsDebug((const char*) buf3075, *(uint2*)buf3076); + rsDebug((const char*) buf3077, *(uint3*)buf3078); + rsDebug((const char*) buf3079, *(uint4*)buf3080); + rsDebug((const char*) buf3081, *(long2*)buf3082); + rsDebug((const char*) buf3083, *(long3*)buf3084); + rsDebug((const char*) buf3085, *(long4*)buf3086); + rsDebug((const char*) buf3087, *(ulong2*)buf3088); + rsDebug((const char*) buf3089, *(ulong3*)buf3090); + rsDebug((const char*) buf3091, *(ulong4*)buf3092); + rsDebug((const char*) buf3093, *(float*)buf3094); + rsDebug((const char*) buf3095, *(float2*)buf3096); + rsDebug((const char*) buf3097, *(float3*)buf3098); + rsDebug((const char*) buf3099, *(float4*)buf3100); + rsDebug((const char*) buf3101, *(char*)buf3102); + rsDebug((const char*) buf3103, *(char2*)buf3104); + rsDebug((const char*) buf3105, *(char3*)buf3106); + rsDebug((const char*) buf3107, *(char4*)buf3108); + rsDebug((const char*) buf3109, *(uchar*)buf3110); + rsDebug((const char*) buf3111, *(uchar2*)buf3112); + rsDebug((const char*) buf3113, *(uchar3*)buf3114); + rsDebug((const char*) buf3115, *(uchar4*)buf3116); + rsDebug((const char*) buf3117, *(short*)buf3118); + rsDebug((const char*) buf3119, *(short2*)buf3120); + rsDebug((const char*) buf3121, *(short3*)buf3122); + rsDebug((const char*) buf3123, *(short4*)buf3124); + rsDebug((const char*) buf3125, *(ushort*)buf3126); + rsDebug((const char*) buf3127, *(ushort2*)buf3128); + rsDebug((const char*) buf3129, *(ushort3*)buf3130); + rsDebug((const char*) buf3131, *(ushort4*)buf3132); + rsDebug((const char*) buf3133, *(float*)buf3134, *(float*)buf3135); + rsDebug((const char*) buf3136, *(float*)buf3137, *(float*)buf3138, *(float*)buf3139); + rsDebug((const char*) buf3140, *(float*)buf3141, *(float*)buf3142, *(float*)buf3143, *(float*)buf3144); + rsDebug((const char*) buf3145, *(long long*)buf3146); + rsDebug((const char*) buf3147, *(unsigned long long*)buf3148); + rsDebug((const char*) buf3149, (const void*) buf3150); + rsDebug((const char*) buf3151, (const rs_matrix4x4*) buf3152); + rsDebug((const char*) buf3153, (const rs_matrix3x3*) buf3154); + rsDebug((const char*) buf3155, (const rs_matrix2x2*) buf3156); + *(uint32_t*)buf3157 = rsElementGetBytesSize(*(rs_element*)buf3158); + *(rs_data_kind*)buf3159 = rsElementGetDataKind(*(rs_element*)buf3160); + *(rs_data_type*)buf3161 = rsElementGetDataType(*(rs_element*)buf3162); + *(rs_element*)buf3163 = rsElementGetSubElement(*(rs_element*)buf3164, *(uint32_t*)buf3165); + *(uint32_t*)buf3166 = rsElementGetSubElementArraySize(*(rs_element*)buf3167, *(uint32_t*)buf3168); + *(uint32_t*)buf3169 = rsElementGetSubElementCount(*(rs_element*)buf3170); + *(uint32_t*)buf3171 = rsElementGetSubElementName(*(rs_element*)buf3172, *(uint32_t*)buf3173, (char*) buf3174, *(uint32_t*)buf3175); + *(uint32_t*)buf3176 = rsElementGetSubElementNameLength(*(rs_element*)buf3177, *(uint32_t*)buf3178); + *(uint32_t*)buf3179 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf3180, *(uint32_t*)buf3181); + *(uint32_t*)buf3182 = rsElementGetVectorSize(*(rs_element*)buf3183); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf3184, (float4*) buf3185, (float4*) buf3186, (float4*) buf3187, (float4*) buf3188, (float4*) buf3189, (float4*) buf3190); + rsForEach(*(rs_script*)buf3191, *(rs_allocation*)buf3192, *(rs_allocation*)buf3193); + *(float*)buf3194 = rsFrac(*(float*)buf3195); + *(rs_allocation*)buf3196 = rsGetAllocation((const void*) buf3197); + *(float*)buf3198 = rsGetDt(); + *(const void**)buf3199 = rsGetElementAt(*(rs_allocation*)buf3200, *(uint32_t*)buf3201); + *(const void**)buf3202 = rsGetElementAt(*(rs_allocation*)buf3203, *(uint32_t*)buf3204, *(uint32_t*)buf3205); + *(const void**)buf3206 = rsGetElementAt(*(rs_allocation*)buf3207, *(uint32_t*)buf3208, *(uint32_t*)buf3209, *(uint32_t*)buf3210); + *(float*)buf3211 = rsGetElementAt_float(*(rs_allocation*)buf3212, *(uint32_t*)buf3213); + *(float2*)buf3214 = rsGetElementAt_float2(*(rs_allocation*)buf3215, *(uint32_t*)buf3216); + *(float3*)buf3217 = rsGetElementAt_float3(*(rs_allocation*)buf3218, *(uint32_t*)buf3219); + *(float4*)buf3220 = rsGetElementAt_float4(*(rs_allocation*)buf3221, *(uint32_t*)buf3222); + *(double*)buf3223 = rsGetElementAt_double(*(rs_allocation*)buf3224, *(uint32_t*)buf3225); + *(double2*)buf3226 = rsGetElementAt_double2(*(rs_allocation*)buf3227, *(uint32_t*)buf3228); + *(double3*)buf3229 = rsGetElementAt_double3(*(rs_allocation*)buf3230, *(uint32_t*)buf3231); + *(double4*)buf3232 = rsGetElementAt_double4(*(rs_allocation*)buf3233, *(uint32_t*)buf3234); + *(char*)buf3235 = rsGetElementAt_char(*(rs_allocation*)buf3236, *(uint32_t*)buf3237); + *(char2*)buf3238 = rsGetElementAt_char2(*(rs_allocation*)buf3239, *(uint32_t*)buf3240); + *(char3*)buf3241 = rsGetElementAt_char3(*(rs_allocation*)buf3242, *(uint32_t*)buf3243); + *(char4*)buf3244 = rsGetElementAt_char4(*(rs_allocation*)buf3245, *(uint32_t*)buf3246); + *(uchar*)buf3247 = rsGetElementAt_uchar(*(rs_allocation*)buf3248, *(uint32_t*)buf3249); + *(uchar2*)buf3250 = rsGetElementAt_uchar2(*(rs_allocation*)buf3251, *(uint32_t*)buf3252); + *(uchar3*)buf3253 = rsGetElementAt_uchar3(*(rs_allocation*)buf3254, *(uint32_t*)buf3255); + *(uchar4*)buf3256 = rsGetElementAt_uchar4(*(rs_allocation*)buf3257, *(uint32_t*)buf3258); + *(short*)buf3259 = rsGetElementAt_short(*(rs_allocation*)buf3260, *(uint32_t*)buf3261); + *(short2*)buf3262 = rsGetElementAt_short2(*(rs_allocation*)buf3263, *(uint32_t*)buf3264); + *(short3*)buf3265 = rsGetElementAt_short3(*(rs_allocation*)buf3266, *(uint32_t*)buf3267); + *(short4*)buf3268 = rsGetElementAt_short4(*(rs_allocation*)buf3269, *(uint32_t*)buf3270); + *(ushort*)buf3271 = rsGetElementAt_ushort(*(rs_allocation*)buf3272, *(uint32_t*)buf3273); + *(ushort2*)buf3274 = rsGetElementAt_ushort2(*(rs_allocation*)buf3275, *(uint32_t*)buf3276); + *(ushort3*)buf3277 = rsGetElementAt_ushort3(*(rs_allocation*)buf3278, *(uint32_t*)buf3279); + *(ushort4*)buf3280 = rsGetElementAt_ushort4(*(rs_allocation*)buf3281, *(uint32_t*)buf3282); + *(int*)buf3283 = rsGetElementAt_int(*(rs_allocation*)buf3284, *(uint32_t*)buf3285); + *(int2*)buf3286 = rsGetElementAt_int2(*(rs_allocation*)buf3287, *(uint32_t*)buf3288); + *(int3*)buf3289 = rsGetElementAt_int3(*(rs_allocation*)buf3290, *(uint32_t*)buf3291); + *(int4*)buf3292 = rsGetElementAt_int4(*(rs_allocation*)buf3293, *(uint32_t*)buf3294); + *(uint*)buf3295 = rsGetElementAt_uint(*(rs_allocation*)buf3296, *(uint32_t*)buf3297); + *(uint2*)buf3298 = rsGetElementAt_uint2(*(rs_allocation*)buf3299, *(uint32_t*)buf3300); + *(uint3*)buf3301 = rsGetElementAt_uint3(*(rs_allocation*)buf3302, *(uint32_t*)buf3303); + *(uint4*)buf3304 = rsGetElementAt_uint4(*(rs_allocation*)buf3305, *(uint32_t*)buf3306); + *(long*)buf3307 = rsGetElementAt_long(*(rs_allocation*)buf3308, *(uint32_t*)buf3309); + *(long2*)buf3310 = rsGetElementAt_long2(*(rs_allocation*)buf3311, *(uint32_t*)buf3312); + *(long3*)buf3313 = rsGetElementAt_long3(*(rs_allocation*)buf3314, *(uint32_t*)buf3315); + *(long4*)buf3316 = rsGetElementAt_long4(*(rs_allocation*)buf3317, *(uint32_t*)buf3318); + *(ulong*)buf3319 = rsGetElementAt_ulong(*(rs_allocation*)buf3320, *(uint32_t*)buf3321); + *(ulong2*)buf3322 = rsGetElementAt_ulong2(*(rs_allocation*)buf3323, *(uint32_t*)buf3324); + *(ulong3*)buf3325 = rsGetElementAt_ulong3(*(rs_allocation*)buf3326, *(uint32_t*)buf3327); + *(ulong4*)buf3328 = rsGetElementAt_ulong4(*(rs_allocation*)buf3329, *(uint32_t*)buf3330); + *(float*)buf3331 = rsGetElementAt_float(*(rs_allocation*)buf3332, *(uint32_t*)buf3333, *(uint32_t*)buf3334); + *(float2*)buf3335 = rsGetElementAt_float2(*(rs_allocation*)buf3336, *(uint32_t*)buf3337, *(uint32_t*)buf3338); + *(float3*)buf3339 = rsGetElementAt_float3(*(rs_allocation*)buf3340, *(uint32_t*)buf3341, *(uint32_t*)buf3342); + *(float4*)buf3343 = rsGetElementAt_float4(*(rs_allocation*)buf3344, *(uint32_t*)buf3345, *(uint32_t*)buf3346); + *(double*)buf3347 = rsGetElementAt_double(*(rs_allocation*)buf3348, *(uint32_t*)buf3349, *(uint32_t*)buf3350); + *(double2*)buf3351 = rsGetElementAt_double2(*(rs_allocation*)buf3352, *(uint32_t*)buf3353, *(uint32_t*)buf3354); + *(double3*)buf3355 = rsGetElementAt_double3(*(rs_allocation*)buf3356, *(uint32_t*)buf3357, *(uint32_t*)buf3358); + *(double4*)buf3359 = rsGetElementAt_double4(*(rs_allocation*)buf3360, *(uint32_t*)buf3361, *(uint32_t*)buf3362); + *(char*)buf3363 = rsGetElementAt_char(*(rs_allocation*)buf3364, *(uint32_t*)buf3365, *(uint32_t*)buf3366); + *(char2*)buf3367 = rsGetElementAt_char2(*(rs_allocation*)buf3368, *(uint32_t*)buf3369, *(uint32_t*)buf3370); + *(char3*)buf3371 = rsGetElementAt_char3(*(rs_allocation*)buf3372, *(uint32_t*)buf3373, *(uint32_t*)buf3374); + *(char4*)buf3375 = rsGetElementAt_char4(*(rs_allocation*)buf3376, *(uint32_t*)buf3377, *(uint32_t*)buf3378); + *(uchar*)buf3379 = rsGetElementAt_uchar(*(rs_allocation*)buf3380, *(uint32_t*)buf3381, *(uint32_t*)buf3382); + *(uchar2*)buf3383 = rsGetElementAt_uchar2(*(rs_allocation*)buf3384, *(uint32_t*)buf3385, *(uint32_t*)buf3386); + *(uchar3*)buf3387 = rsGetElementAt_uchar3(*(rs_allocation*)buf3388, *(uint32_t*)buf3389, *(uint32_t*)buf3390); + *(uchar4*)buf3391 = rsGetElementAt_uchar4(*(rs_allocation*)buf3392, *(uint32_t*)buf3393, *(uint32_t*)buf3394); + *(short*)buf3395 = rsGetElementAt_short(*(rs_allocation*)buf3396, *(uint32_t*)buf3397, *(uint32_t*)buf3398); + *(short2*)buf3399 = rsGetElementAt_short2(*(rs_allocation*)buf3400, *(uint32_t*)buf3401, *(uint32_t*)buf3402); + *(short3*)buf3403 = rsGetElementAt_short3(*(rs_allocation*)buf3404, *(uint32_t*)buf3405, *(uint32_t*)buf3406); + *(short4*)buf3407 = rsGetElementAt_short4(*(rs_allocation*)buf3408, *(uint32_t*)buf3409, *(uint32_t*)buf3410); + *(ushort*)buf3411 = rsGetElementAt_ushort(*(rs_allocation*)buf3412, *(uint32_t*)buf3413, *(uint32_t*)buf3414); + *(ushort2*)buf3415 = rsGetElementAt_ushort2(*(rs_allocation*)buf3416, *(uint32_t*)buf3417, *(uint32_t*)buf3418); + *(ushort3*)buf3419 = rsGetElementAt_ushort3(*(rs_allocation*)buf3420, *(uint32_t*)buf3421, *(uint32_t*)buf3422); + *(ushort4*)buf3423 = rsGetElementAt_ushort4(*(rs_allocation*)buf3424, *(uint32_t*)buf3425, *(uint32_t*)buf3426); + *(int*)buf3427 = rsGetElementAt_int(*(rs_allocation*)buf3428, *(uint32_t*)buf3429, *(uint32_t*)buf3430); + *(int2*)buf3431 = rsGetElementAt_int2(*(rs_allocation*)buf3432, *(uint32_t*)buf3433, *(uint32_t*)buf3434); + *(int3*)buf3435 = rsGetElementAt_int3(*(rs_allocation*)buf3436, *(uint32_t*)buf3437, *(uint32_t*)buf3438); + *(int4*)buf3439 = rsGetElementAt_int4(*(rs_allocation*)buf3440, *(uint32_t*)buf3441, *(uint32_t*)buf3442); + *(uint*)buf3443 = rsGetElementAt_uint(*(rs_allocation*)buf3444, *(uint32_t*)buf3445, *(uint32_t*)buf3446); + *(uint2*)buf3447 = rsGetElementAt_uint2(*(rs_allocation*)buf3448, *(uint32_t*)buf3449, *(uint32_t*)buf3450); + *(uint3*)buf3451 = rsGetElementAt_uint3(*(rs_allocation*)buf3452, *(uint32_t*)buf3453, *(uint32_t*)buf3454); + *(uint4*)buf3455 = rsGetElementAt_uint4(*(rs_allocation*)buf3456, *(uint32_t*)buf3457, *(uint32_t*)buf3458); + *(long*)buf3459 = rsGetElementAt_long(*(rs_allocation*)buf3460, *(uint32_t*)buf3461, *(uint32_t*)buf3462); + *(long2*)buf3463 = rsGetElementAt_long2(*(rs_allocation*)buf3464, *(uint32_t*)buf3465, *(uint32_t*)buf3466); + *(long3*)buf3467 = rsGetElementAt_long3(*(rs_allocation*)buf3468, *(uint32_t*)buf3469, *(uint32_t*)buf3470); + *(long4*)buf3471 = rsGetElementAt_long4(*(rs_allocation*)buf3472, *(uint32_t*)buf3473, *(uint32_t*)buf3474); + *(ulong*)buf3475 = rsGetElementAt_ulong(*(rs_allocation*)buf3476, *(uint32_t*)buf3477, *(uint32_t*)buf3478); + *(ulong2*)buf3479 = rsGetElementAt_ulong2(*(rs_allocation*)buf3480, *(uint32_t*)buf3481, *(uint32_t*)buf3482); + *(ulong3*)buf3483 = rsGetElementAt_ulong3(*(rs_allocation*)buf3484, *(uint32_t*)buf3485, *(uint32_t*)buf3486); + *(ulong4*)buf3487 = rsGetElementAt_ulong4(*(rs_allocation*)buf3488, *(uint32_t*)buf3489, *(uint32_t*)buf3490); + *(float*)buf3491 = rsGetElementAt_float(*(rs_allocation*)buf3492, *(uint32_t*)buf3493, *(uint32_t*)buf3494, *(uint32_t*)buf3495); + *(float2*)buf3496 = rsGetElementAt_float2(*(rs_allocation*)buf3497, *(uint32_t*)buf3498, *(uint32_t*)buf3499, *(uint32_t*)buf3500); + *(float3*)buf3501 = rsGetElementAt_float3(*(rs_allocation*)buf3502, *(uint32_t*)buf3503, *(uint32_t*)buf3504, *(uint32_t*)buf3505); + *(float4*)buf3506 = rsGetElementAt_float4(*(rs_allocation*)buf3507, *(uint32_t*)buf3508, *(uint32_t*)buf3509, *(uint32_t*)buf3510); + *(double*)buf3511 = rsGetElementAt_double(*(rs_allocation*)buf3512, *(uint32_t*)buf3513, *(uint32_t*)buf3514, *(uint32_t*)buf3515); + *(double2*)buf3516 = rsGetElementAt_double2(*(rs_allocation*)buf3517, *(uint32_t*)buf3518, *(uint32_t*)buf3519, *(uint32_t*)buf3520); + *(double3*)buf3521 = rsGetElementAt_double3(*(rs_allocation*)buf3522, *(uint32_t*)buf3523, *(uint32_t*)buf3524, *(uint32_t*)buf3525); + *(double4*)buf3526 = rsGetElementAt_double4(*(rs_allocation*)buf3527, *(uint32_t*)buf3528, *(uint32_t*)buf3529, *(uint32_t*)buf3530); + *(char*)buf3531 = rsGetElementAt_char(*(rs_allocation*)buf3532, *(uint32_t*)buf3533, *(uint32_t*)buf3534, *(uint32_t*)buf3535); + *(char2*)buf3536 = rsGetElementAt_char2(*(rs_allocation*)buf3537, *(uint32_t*)buf3538, *(uint32_t*)buf3539, *(uint32_t*)buf3540); + *(char3*)buf3541 = rsGetElementAt_char3(*(rs_allocation*)buf3542, *(uint32_t*)buf3543, *(uint32_t*)buf3544, *(uint32_t*)buf3545); + *(char4*)buf3546 = rsGetElementAt_char4(*(rs_allocation*)buf3547, *(uint32_t*)buf3548, *(uint32_t*)buf3549, *(uint32_t*)buf3550); + *(uchar*)buf3551 = rsGetElementAt_uchar(*(rs_allocation*)buf3552, *(uint32_t*)buf3553, *(uint32_t*)buf3554, *(uint32_t*)buf3555); + *(uchar2*)buf3556 = rsGetElementAt_uchar2(*(rs_allocation*)buf3557, *(uint32_t*)buf3558, *(uint32_t*)buf3559, *(uint32_t*)buf3560); + *(uchar3*)buf3561 = rsGetElementAt_uchar3(*(rs_allocation*)buf3562, *(uint32_t*)buf3563, *(uint32_t*)buf3564, *(uint32_t*)buf3565); + *(uchar4*)buf3566 = rsGetElementAt_uchar4(*(rs_allocation*)buf3567, *(uint32_t*)buf3568, *(uint32_t*)buf3569, *(uint32_t*)buf3570); + *(short*)buf3571 = rsGetElementAt_short(*(rs_allocation*)buf3572, *(uint32_t*)buf3573, *(uint32_t*)buf3574, *(uint32_t*)buf3575); + *(short2*)buf3576 = rsGetElementAt_short2(*(rs_allocation*)buf3577, *(uint32_t*)buf3578, *(uint32_t*)buf3579, *(uint32_t*)buf3580); + *(short3*)buf3581 = rsGetElementAt_short3(*(rs_allocation*)buf3582, *(uint32_t*)buf3583, *(uint32_t*)buf3584, *(uint32_t*)buf3585); + *(short4*)buf3586 = rsGetElementAt_short4(*(rs_allocation*)buf3587, *(uint32_t*)buf3588, *(uint32_t*)buf3589, *(uint32_t*)buf3590); + *(ushort*)buf3591 = rsGetElementAt_ushort(*(rs_allocation*)buf3592, *(uint32_t*)buf3593, *(uint32_t*)buf3594, *(uint32_t*)buf3595); + *(ushort2*)buf3596 = rsGetElementAt_ushort2(*(rs_allocation*)buf3597, *(uint32_t*)buf3598, *(uint32_t*)buf3599, *(uint32_t*)buf3600); + *(ushort3*)buf3601 = rsGetElementAt_ushort3(*(rs_allocation*)buf3602, *(uint32_t*)buf3603, *(uint32_t*)buf3604, *(uint32_t*)buf3605); + *(ushort4*)buf3606 = rsGetElementAt_ushort4(*(rs_allocation*)buf3607, *(uint32_t*)buf3608, *(uint32_t*)buf3609, *(uint32_t*)buf3610); + *(int*)buf3611 = rsGetElementAt_int(*(rs_allocation*)buf3612, *(uint32_t*)buf3613, *(uint32_t*)buf3614, *(uint32_t*)buf3615); + *(int2*)buf3616 = rsGetElementAt_int2(*(rs_allocation*)buf3617, *(uint32_t*)buf3618, *(uint32_t*)buf3619, *(uint32_t*)buf3620); + *(int3*)buf3621 = rsGetElementAt_int3(*(rs_allocation*)buf3622, *(uint32_t*)buf3623, *(uint32_t*)buf3624, *(uint32_t*)buf3625); + *(int4*)buf3626 = rsGetElementAt_int4(*(rs_allocation*)buf3627, *(uint32_t*)buf3628, *(uint32_t*)buf3629, *(uint32_t*)buf3630); + *(uint*)buf3631 = rsGetElementAt_uint(*(rs_allocation*)buf3632, *(uint32_t*)buf3633, *(uint32_t*)buf3634, *(uint32_t*)buf3635); + *(uint2*)buf3636 = rsGetElementAt_uint2(*(rs_allocation*)buf3637, *(uint32_t*)buf3638, *(uint32_t*)buf3639, *(uint32_t*)buf3640); + *(uint3*)buf3641 = rsGetElementAt_uint3(*(rs_allocation*)buf3642, *(uint32_t*)buf3643, *(uint32_t*)buf3644, *(uint32_t*)buf3645); + *(uint4*)buf3646 = rsGetElementAt_uint4(*(rs_allocation*)buf3647, *(uint32_t*)buf3648, *(uint32_t*)buf3649, *(uint32_t*)buf3650); + *(long*)buf3651 = rsGetElementAt_long(*(rs_allocation*)buf3652, *(uint32_t*)buf3653, *(uint32_t*)buf3654, *(uint32_t*)buf3655); + *(long2*)buf3656 = rsGetElementAt_long2(*(rs_allocation*)buf3657, *(uint32_t*)buf3658, *(uint32_t*)buf3659, *(uint32_t*)buf3660); + *(long3*)buf3661 = rsGetElementAt_long3(*(rs_allocation*)buf3662, *(uint32_t*)buf3663, *(uint32_t*)buf3664, *(uint32_t*)buf3665); + *(long4*)buf3666 = rsGetElementAt_long4(*(rs_allocation*)buf3667, *(uint32_t*)buf3668, *(uint32_t*)buf3669, *(uint32_t*)buf3670); + *(ulong*)buf3671 = rsGetElementAt_ulong(*(rs_allocation*)buf3672, *(uint32_t*)buf3673, *(uint32_t*)buf3674, *(uint32_t*)buf3675); + *(ulong2*)buf3676 = rsGetElementAt_ulong2(*(rs_allocation*)buf3677, *(uint32_t*)buf3678, *(uint32_t*)buf3679, *(uint32_t*)buf3680); + *(ulong3*)buf3681 = rsGetElementAt_ulong3(*(rs_allocation*)buf3682, *(uint32_t*)buf3683, *(uint32_t*)buf3684, *(uint32_t*)buf3685); + *(ulong4*)buf3686 = rsGetElementAt_ulong4(*(rs_allocation*)buf3687, *(uint32_t*)buf3688, *(uint32_t*)buf3689, *(uint32_t*)buf3690); + *(uchar*)buf3691 = rsGetElementAtYuv_uchar_U(*(rs_allocation*)buf3692, *(uint32_t*)buf3693, *(uint32_t*)buf3694); + *(uchar*)buf3695 = rsGetElementAtYuv_uchar_V(*(rs_allocation*)buf3696, *(uint32_t*)buf3697, *(uint32_t*)buf3698); + *(uchar*)buf3699 = rsGetElementAtYuv_uchar_Y(*(rs_allocation*)buf3700, *(uint32_t*)buf3701, *(uint32_t*)buf3702); + *(bool*)buf3703 = rsIsObject(*(rs_element*)buf3704); + *(bool*)buf3705 = rsIsObject(*(rs_type*)buf3706); + *(bool*)buf3707 = rsIsObject(*(rs_allocation*)buf3708); + *(bool*)buf3709 = rsIsObject(*(rs_sampler*)buf3710); + *(bool*)buf3711 = rsIsObject(*(rs_script*)buf3712); +#ifndef __LP64__ + *(bool*)buf3713 = rsIsObject(*(rs_mesh*)buf3714); + *(bool*)buf3715 = rsIsObject(*(rs_program_fragment*)buf3716); + *(bool*)buf3717 = rsIsObject(*(rs_program_vertex*)buf3718); + *(bool*)buf3719 = rsIsObject(*(rs_program_raster*)buf3720); + *(bool*)buf3721 = rsIsObject(*(rs_program_store*)buf3722); + *(bool*)buf3723 = rsIsObject(*(rs_font*)buf3724); +#endif + *(bool*)buf3725 = rsIsSphereInFrustum((float4*) buf3726, (float4*) buf3727, (float4*) buf3728, (float4*) buf3729, (float4*) buf3730, (float4*) buf3731, (float4*) buf3732); + *(rs_tm**)buf3733 = rsLocaltime((rs_tm*) buf3734, (const rs_time_t*) buf3735); + *(float*)buf3736 = rsMatrixGet((const rs_matrix4x4*) buf3737, *(uint32_t*)buf3738, *(uint32_t*)buf3739); + *(float*)buf3740 = rsMatrixGet((const rs_matrix3x3*) buf3741, *(uint32_t*)buf3742, *(uint32_t*)buf3743); + *(float*)buf3744 = rsMatrixGet((const rs_matrix2x2*) buf3745, *(uint32_t*)buf3746, *(uint32_t*)buf3747); + *(bool*)buf3748 = rsMatrixInverse((rs_matrix4x4*) buf3749); + *(bool*)buf3750 = rsMatrixInverseTranspose((rs_matrix4x4*) buf3751); + rsMatrixLoad((rs_matrix4x4*) buf3752, (const float*) buf3753); + rsMatrixLoad((rs_matrix3x3*) buf3754, (const float*) buf3755); + rsMatrixLoad((rs_matrix2x2*) buf3756, (const float*) buf3757); + rsMatrixLoad((rs_matrix4x4*) buf3758, (const rs_matrix4x4*) buf3759); + rsMatrixLoad((rs_matrix3x3*) buf3760, (const rs_matrix3x3*) buf3761); + rsMatrixLoad((rs_matrix2x2*) buf3762, (const rs_matrix2x2*) buf3763); + rsMatrixLoad((rs_matrix4x4*) buf3764, (const rs_matrix3x3*) buf3765); + rsMatrixLoad((rs_matrix4x4*) buf3766, (const rs_matrix2x2*) buf3767); + rsMatrixLoadFrustum((rs_matrix4x4*) buf3768, *(float*)buf3769, *(float*)buf3770, *(float*)buf3771, *(float*)buf3772, *(float*)buf3773, *(float*)buf3774); + rsMatrixLoadIdentity((rs_matrix4x4*) buf3775); + rsMatrixLoadIdentity((rs_matrix3x3*) buf3776); + rsMatrixLoadIdentity((rs_matrix2x2*) buf3777); + rsMatrixLoadMultiply((rs_matrix4x4*) buf3778, (const rs_matrix4x4*) buf3779, (const rs_matrix4x4*) buf3780); + rsMatrixLoadMultiply((rs_matrix3x3*) buf3781, (const rs_matrix3x3*) buf3782, (const rs_matrix3x3*) buf3783); + rsMatrixLoadMultiply((rs_matrix2x2*) buf3784, (const rs_matrix2x2*) buf3785, (const rs_matrix2x2*) buf3786); + rsMatrixLoadOrtho((rs_matrix4x4*) buf3787, *(float*)buf3788, *(float*)buf3789, *(float*)buf3790, *(float*)buf3791, *(float*)buf3792, *(float*)buf3793); + rsMatrixLoadPerspective((rs_matrix4x4*) buf3794, *(float*)buf3795, *(float*)buf3796, *(float*)buf3797, *(float*)buf3798); + rsMatrixLoadRotate((rs_matrix4x4*) buf3799, *(float*)buf3800, *(float*)buf3801, *(float*)buf3802, *(float*)buf3803); + rsMatrixLoadScale((rs_matrix4x4*) buf3804, *(float*)buf3805, *(float*)buf3806, *(float*)buf3807); + rsMatrixLoadTranslate((rs_matrix4x4*) buf3808, *(float*)buf3809, *(float*)buf3810, *(float*)buf3811); + rsMatrixMultiply((rs_matrix4x4*) buf3812, (const rs_matrix4x4*) buf3813); + rsMatrixMultiply((rs_matrix3x3*) buf3814, (const rs_matrix3x3*) buf3815); + rsMatrixMultiply((rs_matrix2x2*) buf3816, (const rs_matrix2x2*) buf3817); + *(float4*)buf3818 = rsMatrixMultiply((const rs_matrix4x4*) buf3819, *(float4*)buf3820); + *(float4*)buf3821 = rsMatrixMultiply((const rs_matrix4x4*) buf3822, *(float3*)buf3823); + *(float4*)buf3824 = rsMatrixMultiply((const rs_matrix4x4*) buf3825, *(float2*)buf3826); + *(float3*)buf3827 = rsMatrixMultiply((const rs_matrix3x3*) buf3828, *(float3*)buf3829); + *(float3*)buf3830 = rsMatrixMultiply((const rs_matrix3x3*) buf3831, *(float2*)buf3832); + *(float2*)buf3833 = rsMatrixMultiply((const rs_matrix2x2*) buf3834, *(float2*)buf3835); + rsMatrixRotate((rs_matrix4x4*) buf3836, *(float*)buf3837, *(float*)buf3838, *(float*)buf3839, *(float*)buf3840); + rsMatrixScale((rs_matrix4x4*) buf3841, *(float*)buf3842, *(float*)buf3843, *(float*)buf3844); + rsMatrixSet((rs_matrix4x4*) buf3845, *(uint32_t*)buf3846, *(uint32_t*)buf3847, *(float*)buf3848); + rsMatrixSet((rs_matrix3x3*) buf3849, *(uint32_t*)buf3850, *(uint32_t*)buf3851, *(float*)buf3852); + rsMatrixSet((rs_matrix2x2*) buf3853, *(uint32_t*)buf3854, *(uint32_t*)buf3855, *(float*)buf3856); + rsMatrixTranslate((rs_matrix4x4*) buf3857, *(float*)buf3858, *(float*)buf3859, *(float*)buf3860); + rsMatrixTranspose((rs_matrix4x4*) buf3861); + rsMatrixTranspose((rs_matrix3x3*) buf3862); + rsMatrixTranspose((rs_matrix2x2*) buf3863); + *(uchar4*)buf3864 = rsPackColorTo8888(*(float*)buf3865, *(float*)buf3866, *(float*)buf3867); + *(uchar4*)buf3868 = rsPackColorTo8888(*(float*)buf3869, *(float*)buf3870, *(float*)buf3871, *(float*)buf3872); + *(uchar4*)buf3873 = rsPackColorTo8888(*(float3*)buf3874); + *(uchar4*)buf3875 = rsPackColorTo8888(*(float4*)buf3876); + rsQuaternionAdd((rs_quaternion*) buf3877, (const rs_quaternion*) buf3878); + rsQuaternionConjugate((rs_quaternion*) buf3879); + *(float*)buf3880 = rsQuaternionDot((const rs_quaternion*) buf3881, (const rs_quaternion*) buf3882); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf3883, (const rs_quaternion*) buf3884); + rsQuaternionLoadRotate((rs_quaternion*) buf3885, *(float*)buf3886, *(float*)buf3887, *(float*)buf3888, *(float*)buf3889); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf3890, *(float*)buf3891, *(float*)buf3892, *(float*)buf3893, *(float*)buf3894); + rsQuaternionMultiply((rs_quaternion*) buf3895, *(float*)buf3896); + rsQuaternionMultiply((rs_quaternion*) buf3897, (const rs_quaternion*) buf3898); + rsQuaternionNormalize((rs_quaternion*) buf3899); + rsQuaternionSet((rs_quaternion*) buf3900, *(float*)buf3901, *(float*)buf3902, *(float*)buf3903, *(float*)buf3904); + rsQuaternionSet((rs_quaternion*) buf3905, (const rs_quaternion*) buf3906); + rsQuaternionSlerp((rs_quaternion*) buf3907, (const rs_quaternion*) buf3908, (const rs_quaternion*) buf3909, *(float*)buf3910); + *(int*)buf3911 = rsRand(*(int*)buf3912); + *(int*)buf3913 = rsRand(*(int*)buf3914, *(int*)buf3915); + *(float*)buf3916 = rsRand(*(float*)buf3917); + *(float*)buf3918 = rsRand(*(float*)buf3919, *(float*)buf3920); + *(float4*)buf3921 = rsSample(*(rs_allocation*)buf3922, *(rs_sampler*)buf3923, *(float*)buf3924); + *(float4*)buf3925 = rsSample(*(rs_allocation*)buf3926, *(rs_sampler*)buf3927, *(float*)buf3928, *(float*)buf3929); + *(float4*)buf3930 = rsSample(*(rs_allocation*)buf3931, *(rs_sampler*)buf3932, *(float2*)buf3933); + *(float4*)buf3934 = rsSample(*(rs_allocation*)buf3935, *(rs_sampler*)buf3936, *(float2*)buf3937, *(float*)buf3938); + *(float*)buf3939 = rsSamplerGetAnisotropy(*(rs_sampler*)buf3940); + *(rs_sampler_value*)buf3941 = rsSamplerGetMagnification(*(rs_sampler*)buf3942); + *(rs_sampler_value*)buf3943 = rsSamplerGetMinification(*(rs_sampler*)buf3944); + *(rs_sampler_value*)buf3945 = rsSamplerGetWrapS(*(rs_sampler*)buf3946); + *(rs_sampler_value*)buf3947 = rsSamplerGetWrapT(*(rs_sampler*)buf3948); + *(bool*)buf3949 = rsSendToClient(*(int*)buf3950); + *(bool*)buf3951 = rsSendToClient(*(int*)buf3952, (const void*) buf3953, *(uint*)buf3954); + rsSendToClientBlocking(*(int*)buf3955); + rsSendToClientBlocking(*(int*)buf3956, (const void*) buf3957, *(uint*)buf3958); + rsSetElementAt(*(rs_allocation*)buf3959, (void*) buf3960, *(uint32_t*)buf3961); + rsSetElementAt(*(rs_allocation*)buf3962, (void*) buf3963, *(uint32_t*)buf3964, *(uint32_t*)buf3965); + rsSetElementAt_float(*(rs_allocation*)buf3966, *(float*)buf3967, *(uint32_t*)buf3968); + rsSetElementAt_float2(*(rs_allocation*)buf3969, *(float2*)buf3970, *(uint32_t*)buf3971); + rsSetElementAt_float3(*(rs_allocation*)buf3972, *(float3*)buf3973, *(uint32_t*)buf3974); + rsSetElementAt_float4(*(rs_allocation*)buf3975, *(float4*)buf3976, *(uint32_t*)buf3977); + rsSetElementAt_double(*(rs_allocation*)buf3978, *(double*)buf3979, *(uint32_t*)buf3980); + rsSetElementAt_double2(*(rs_allocation*)buf3981, *(double2*)buf3982, *(uint32_t*)buf3983); + rsSetElementAt_double3(*(rs_allocation*)buf3984, *(double3*)buf3985, *(uint32_t*)buf3986); + rsSetElementAt_double4(*(rs_allocation*)buf3987, *(double4*)buf3988, *(uint32_t*)buf3989); + rsSetElementAt_char(*(rs_allocation*)buf3990, *(char*)buf3991, *(uint32_t*)buf3992); + rsSetElementAt_char2(*(rs_allocation*)buf3993, *(char2*)buf3994, *(uint32_t*)buf3995); + rsSetElementAt_char3(*(rs_allocation*)buf3996, *(char3*)buf3997, *(uint32_t*)buf3998); + rsSetElementAt_char4(*(rs_allocation*)buf3999, *(char4*)buf4000, *(uint32_t*)buf4001); + rsSetElementAt_uchar(*(rs_allocation*)buf4002, *(uchar*)buf4003, *(uint32_t*)buf4004); + rsSetElementAt_uchar2(*(rs_allocation*)buf4005, *(uchar2*)buf4006, *(uint32_t*)buf4007); + rsSetElementAt_uchar3(*(rs_allocation*)buf4008, *(uchar3*)buf4009, *(uint32_t*)buf4010); + rsSetElementAt_uchar4(*(rs_allocation*)buf4011, *(uchar4*)buf4012, *(uint32_t*)buf4013); + rsSetElementAt_short(*(rs_allocation*)buf4014, *(short*)buf4015, *(uint32_t*)buf4016); + rsSetElementAt_short2(*(rs_allocation*)buf4017, *(short2*)buf4018, *(uint32_t*)buf4019); + rsSetElementAt_short3(*(rs_allocation*)buf4020, *(short3*)buf4021, *(uint32_t*)buf4022); + rsSetElementAt_short4(*(rs_allocation*)buf4023, *(short4*)buf4024, *(uint32_t*)buf4025); + rsSetElementAt_ushort(*(rs_allocation*)buf4026, *(ushort*)buf4027, *(uint32_t*)buf4028); + rsSetElementAt_ushort2(*(rs_allocation*)buf4029, *(ushort2*)buf4030, *(uint32_t*)buf4031); + rsSetElementAt_ushort3(*(rs_allocation*)buf4032, *(ushort3*)buf4033, *(uint32_t*)buf4034); + rsSetElementAt_ushort4(*(rs_allocation*)buf4035, *(ushort4*)buf4036, *(uint32_t*)buf4037); + rsSetElementAt_int(*(rs_allocation*)buf4038, *(int*)buf4039, *(uint32_t*)buf4040); + rsSetElementAt_int2(*(rs_allocation*)buf4041, *(int2*)buf4042, *(uint32_t*)buf4043); + rsSetElementAt_int3(*(rs_allocation*)buf4044, *(int3*)buf4045, *(uint32_t*)buf4046); + rsSetElementAt_int4(*(rs_allocation*)buf4047, *(int4*)buf4048, *(uint32_t*)buf4049); + rsSetElementAt_uint(*(rs_allocation*)buf4050, *(uint*)buf4051, *(uint32_t*)buf4052); + rsSetElementAt_uint2(*(rs_allocation*)buf4053, *(uint2*)buf4054, *(uint32_t*)buf4055); + rsSetElementAt_uint3(*(rs_allocation*)buf4056, *(uint3*)buf4057, *(uint32_t*)buf4058); + rsSetElementAt_uint4(*(rs_allocation*)buf4059, *(uint4*)buf4060, *(uint32_t*)buf4061); + rsSetElementAt_long(*(rs_allocation*)buf4062, *(long*)buf4063, *(uint32_t*)buf4064); + rsSetElementAt_long2(*(rs_allocation*)buf4065, *(long2*)buf4066, *(uint32_t*)buf4067); + rsSetElementAt_long3(*(rs_allocation*)buf4068, *(long3*)buf4069, *(uint32_t*)buf4070); + rsSetElementAt_long4(*(rs_allocation*)buf4071, *(long4*)buf4072, *(uint32_t*)buf4073); + rsSetElementAt_ulong(*(rs_allocation*)buf4074, *(ulong*)buf4075, *(uint32_t*)buf4076); + rsSetElementAt_ulong2(*(rs_allocation*)buf4077, *(ulong2*)buf4078, *(uint32_t*)buf4079); + rsSetElementAt_ulong3(*(rs_allocation*)buf4080, *(ulong3*)buf4081, *(uint32_t*)buf4082); + rsSetElementAt_ulong4(*(rs_allocation*)buf4083, *(ulong4*)buf4084, *(uint32_t*)buf4085); + rsSetElementAt_float(*(rs_allocation*)buf4086, *(float*)buf4087, *(uint32_t*)buf4088, *(uint32_t*)buf4089); + rsSetElementAt_float2(*(rs_allocation*)buf4090, *(float2*)buf4091, *(uint32_t*)buf4092, *(uint32_t*)buf4093); + rsSetElementAt_float3(*(rs_allocation*)buf4094, *(float3*)buf4095, *(uint32_t*)buf4096, *(uint32_t*)buf4097); + rsSetElementAt_float4(*(rs_allocation*)buf4098, *(float4*)buf4099, *(uint32_t*)buf4100, *(uint32_t*)buf4101); + rsSetElementAt_double(*(rs_allocation*)buf4102, *(double*)buf4103, *(uint32_t*)buf4104, *(uint32_t*)buf4105); + rsSetElementAt_double2(*(rs_allocation*)buf4106, *(double2*)buf4107, *(uint32_t*)buf4108, *(uint32_t*)buf4109); + rsSetElementAt_double3(*(rs_allocation*)buf4110, *(double3*)buf4111, *(uint32_t*)buf4112, *(uint32_t*)buf4113); + rsSetElementAt_double4(*(rs_allocation*)buf4114, *(double4*)buf4115, *(uint32_t*)buf4116, *(uint32_t*)buf4117); + rsSetElementAt_char(*(rs_allocation*)buf4118, *(char*)buf4119, *(uint32_t*)buf4120, *(uint32_t*)buf4121); + rsSetElementAt_char2(*(rs_allocation*)buf4122, *(char2*)buf4123, *(uint32_t*)buf4124, *(uint32_t*)buf4125); + rsSetElementAt_char3(*(rs_allocation*)buf4126, *(char3*)buf4127, *(uint32_t*)buf4128, *(uint32_t*)buf4129); + rsSetElementAt_char4(*(rs_allocation*)buf4130, *(char4*)buf4131, *(uint32_t*)buf4132, *(uint32_t*)buf4133); + rsSetElementAt_uchar(*(rs_allocation*)buf4134, *(uchar*)buf4135, *(uint32_t*)buf4136, *(uint32_t*)buf4137); + rsSetElementAt_uchar2(*(rs_allocation*)buf4138, *(uchar2*)buf4139, *(uint32_t*)buf4140, *(uint32_t*)buf4141); + rsSetElementAt_uchar3(*(rs_allocation*)buf4142, *(uchar3*)buf4143, *(uint32_t*)buf4144, *(uint32_t*)buf4145); + rsSetElementAt_uchar4(*(rs_allocation*)buf4146, *(uchar4*)buf4147, *(uint32_t*)buf4148, *(uint32_t*)buf4149); + rsSetElementAt_short(*(rs_allocation*)buf4150, *(short*)buf4151, *(uint32_t*)buf4152, *(uint32_t*)buf4153); + rsSetElementAt_short2(*(rs_allocation*)buf4154, *(short2*)buf4155, *(uint32_t*)buf4156, *(uint32_t*)buf4157); + rsSetElementAt_short3(*(rs_allocation*)buf4158, *(short3*)buf4159, *(uint32_t*)buf4160, *(uint32_t*)buf4161); + rsSetElementAt_short4(*(rs_allocation*)buf4162, *(short4*)buf4163, *(uint32_t*)buf4164, *(uint32_t*)buf4165); + rsSetElementAt_ushort(*(rs_allocation*)buf4166, *(ushort*)buf4167, *(uint32_t*)buf4168, *(uint32_t*)buf4169); + rsSetElementAt_ushort2(*(rs_allocation*)buf4170, *(ushort2*)buf4171, *(uint32_t*)buf4172, *(uint32_t*)buf4173); + rsSetElementAt_ushort3(*(rs_allocation*)buf4174, *(ushort3*)buf4175, *(uint32_t*)buf4176, *(uint32_t*)buf4177); + rsSetElementAt_ushort4(*(rs_allocation*)buf4178, *(ushort4*)buf4179, *(uint32_t*)buf4180, *(uint32_t*)buf4181); + rsSetElementAt_int(*(rs_allocation*)buf4182, *(int*)buf4183, *(uint32_t*)buf4184, *(uint32_t*)buf4185); + rsSetElementAt_int2(*(rs_allocation*)buf4186, *(int2*)buf4187, *(uint32_t*)buf4188, *(uint32_t*)buf4189); + rsSetElementAt_int3(*(rs_allocation*)buf4190, *(int3*)buf4191, *(uint32_t*)buf4192, *(uint32_t*)buf4193); + rsSetElementAt_int4(*(rs_allocation*)buf4194, *(int4*)buf4195, *(uint32_t*)buf4196, *(uint32_t*)buf4197); + rsSetElementAt_uint(*(rs_allocation*)buf4198, *(uint*)buf4199, *(uint32_t*)buf4200, *(uint32_t*)buf4201); + rsSetElementAt_uint2(*(rs_allocation*)buf4202, *(uint2*)buf4203, *(uint32_t*)buf4204, *(uint32_t*)buf4205); + rsSetElementAt_uint3(*(rs_allocation*)buf4206, *(uint3*)buf4207, *(uint32_t*)buf4208, *(uint32_t*)buf4209); + rsSetElementAt_uint4(*(rs_allocation*)buf4210, *(uint4*)buf4211, *(uint32_t*)buf4212, *(uint32_t*)buf4213); + rsSetElementAt_long(*(rs_allocation*)buf4214, *(long*)buf4215, *(uint32_t*)buf4216, *(uint32_t*)buf4217); + rsSetElementAt_long2(*(rs_allocation*)buf4218, *(long2*)buf4219, *(uint32_t*)buf4220, *(uint32_t*)buf4221); + rsSetElementAt_long3(*(rs_allocation*)buf4222, *(long3*)buf4223, *(uint32_t*)buf4224, *(uint32_t*)buf4225); + rsSetElementAt_long4(*(rs_allocation*)buf4226, *(long4*)buf4227, *(uint32_t*)buf4228, *(uint32_t*)buf4229); + rsSetElementAt_ulong(*(rs_allocation*)buf4230, *(ulong*)buf4231, *(uint32_t*)buf4232, *(uint32_t*)buf4233); + rsSetElementAt_ulong2(*(rs_allocation*)buf4234, *(ulong2*)buf4235, *(uint32_t*)buf4236, *(uint32_t*)buf4237); + rsSetElementAt_ulong3(*(rs_allocation*)buf4238, *(ulong3*)buf4239, *(uint32_t*)buf4240, *(uint32_t*)buf4241); + rsSetElementAt_ulong4(*(rs_allocation*)buf4242, *(ulong4*)buf4243, *(uint32_t*)buf4244, *(uint32_t*)buf4245); + rsSetElementAt_float(*(rs_allocation*)buf4246, *(float*)buf4247, *(uint32_t*)buf4248, *(uint32_t*)buf4249, *(uint32_t*)buf4250); + rsSetElementAt_float2(*(rs_allocation*)buf4251, *(float2*)buf4252, *(uint32_t*)buf4253, *(uint32_t*)buf4254, *(uint32_t*)buf4255); + rsSetElementAt_float3(*(rs_allocation*)buf4256, *(float3*)buf4257, *(uint32_t*)buf4258, *(uint32_t*)buf4259, *(uint32_t*)buf4260); + rsSetElementAt_float4(*(rs_allocation*)buf4261, *(float4*)buf4262, *(uint32_t*)buf4263, *(uint32_t*)buf4264, *(uint32_t*)buf4265); + rsSetElementAt_double(*(rs_allocation*)buf4266, *(double*)buf4267, *(uint32_t*)buf4268, *(uint32_t*)buf4269, *(uint32_t*)buf4270); + rsSetElementAt_double2(*(rs_allocation*)buf4271, *(double2*)buf4272, *(uint32_t*)buf4273, *(uint32_t*)buf4274, *(uint32_t*)buf4275); + rsSetElementAt_double3(*(rs_allocation*)buf4276, *(double3*)buf4277, *(uint32_t*)buf4278, *(uint32_t*)buf4279, *(uint32_t*)buf4280); + rsSetElementAt_double4(*(rs_allocation*)buf4281, *(double4*)buf4282, *(uint32_t*)buf4283, *(uint32_t*)buf4284, *(uint32_t*)buf4285); + rsSetElementAt_char(*(rs_allocation*)buf4286, *(char*)buf4287, *(uint32_t*)buf4288, *(uint32_t*)buf4289, *(uint32_t*)buf4290); + rsSetElementAt_char2(*(rs_allocation*)buf4291, *(char2*)buf4292, *(uint32_t*)buf4293, *(uint32_t*)buf4294, *(uint32_t*)buf4295); + rsSetElementAt_char3(*(rs_allocation*)buf4296, *(char3*)buf4297, *(uint32_t*)buf4298, *(uint32_t*)buf4299, *(uint32_t*)buf4300); + rsSetElementAt_char4(*(rs_allocation*)buf4301, *(char4*)buf4302, *(uint32_t*)buf4303, *(uint32_t*)buf4304, *(uint32_t*)buf4305); + rsSetElementAt_uchar(*(rs_allocation*)buf4306, *(uchar*)buf4307, *(uint32_t*)buf4308, *(uint32_t*)buf4309, *(uint32_t*)buf4310); + rsSetElementAt_uchar2(*(rs_allocation*)buf4311, *(uchar2*)buf4312, *(uint32_t*)buf4313, *(uint32_t*)buf4314, *(uint32_t*)buf4315); + rsSetElementAt_uchar3(*(rs_allocation*)buf4316, *(uchar3*)buf4317, *(uint32_t*)buf4318, *(uint32_t*)buf4319, *(uint32_t*)buf4320); + rsSetElementAt_uchar4(*(rs_allocation*)buf4321, *(uchar4*)buf4322, *(uint32_t*)buf4323, *(uint32_t*)buf4324, *(uint32_t*)buf4325); + rsSetElementAt_short(*(rs_allocation*)buf4326, *(short*)buf4327, *(uint32_t*)buf4328, *(uint32_t*)buf4329, *(uint32_t*)buf4330); + rsSetElementAt_short2(*(rs_allocation*)buf4331, *(short2*)buf4332, *(uint32_t*)buf4333, *(uint32_t*)buf4334, *(uint32_t*)buf4335); + rsSetElementAt_short3(*(rs_allocation*)buf4336, *(short3*)buf4337, *(uint32_t*)buf4338, *(uint32_t*)buf4339, *(uint32_t*)buf4340); + rsSetElementAt_short4(*(rs_allocation*)buf4341, *(short4*)buf4342, *(uint32_t*)buf4343, *(uint32_t*)buf4344, *(uint32_t*)buf4345); + rsSetElementAt_ushort(*(rs_allocation*)buf4346, *(ushort*)buf4347, *(uint32_t*)buf4348, *(uint32_t*)buf4349, *(uint32_t*)buf4350); + rsSetElementAt_ushort2(*(rs_allocation*)buf4351, *(ushort2*)buf4352, *(uint32_t*)buf4353, *(uint32_t*)buf4354, *(uint32_t*)buf4355); + rsSetElementAt_ushort3(*(rs_allocation*)buf4356, *(ushort3*)buf4357, *(uint32_t*)buf4358, *(uint32_t*)buf4359, *(uint32_t*)buf4360); + rsSetElementAt_ushort4(*(rs_allocation*)buf4361, *(ushort4*)buf4362, *(uint32_t*)buf4363, *(uint32_t*)buf4364, *(uint32_t*)buf4365); + rsSetElementAt_int(*(rs_allocation*)buf4366, *(int*)buf4367, *(uint32_t*)buf4368, *(uint32_t*)buf4369, *(uint32_t*)buf4370); + rsSetElementAt_int2(*(rs_allocation*)buf4371, *(int2*)buf4372, *(uint32_t*)buf4373, *(uint32_t*)buf4374, *(uint32_t*)buf4375); + rsSetElementAt_int3(*(rs_allocation*)buf4376, *(int3*)buf4377, *(uint32_t*)buf4378, *(uint32_t*)buf4379, *(uint32_t*)buf4380); + rsSetElementAt_int4(*(rs_allocation*)buf4381, *(int4*)buf4382, *(uint32_t*)buf4383, *(uint32_t*)buf4384, *(uint32_t*)buf4385); + rsSetElementAt_uint(*(rs_allocation*)buf4386, *(uint*)buf4387, *(uint32_t*)buf4388, *(uint32_t*)buf4389, *(uint32_t*)buf4390); + rsSetElementAt_uint2(*(rs_allocation*)buf4391, *(uint2*)buf4392, *(uint32_t*)buf4393, *(uint32_t*)buf4394, *(uint32_t*)buf4395); + rsSetElementAt_uint3(*(rs_allocation*)buf4396, *(uint3*)buf4397, *(uint32_t*)buf4398, *(uint32_t*)buf4399, *(uint32_t*)buf4400); + rsSetElementAt_uint4(*(rs_allocation*)buf4401, *(uint4*)buf4402, *(uint32_t*)buf4403, *(uint32_t*)buf4404, *(uint32_t*)buf4405); + rsSetElementAt_long(*(rs_allocation*)buf4406, *(long*)buf4407, *(uint32_t*)buf4408, *(uint32_t*)buf4409, *(uint32_t*)buf4410); + rsSetElementAt_long2(*(rs_allocation*)buf4411, *(long2*)buf4412, *(uint32_t*)buf4413, *(uint32_t*)buf4414, *(uint32_t*)buf4415); + rsSetElementAt_long3(*(rs_allocation*)buf4416, *(long3*)buf4417, *(uint32_t*)buf4418, *(uint32_t*)buf4419, *(uint32_t*)buf4420); + rsSetElementAt_long4(*(rs_allocation*)buf4421, *(long4*)buf4422, *(uint32_t*)buf4423, *(uint32_t*)buf4424, *(uint32_t*)buf4425); + rsSetElementAt_ulong(*(rs_allocation*)buf4426, *(ulong*)buf4427, *(uint32_t*)buf4428, *(uint32_t*)buf4429, *(uint32_t*)buf4430); + rsSetElementAt_ulong2(*(rs_allocation*)buf4431, *(ulong2*)buf4432, *(uint32_t*)buf4433, *(uint32_t*)buf4434, *(uint32_t*)buf4435); + rsSetElementAt_ulong3(*(rs_allocation*)buf4436, *(ulong3*)buf4437, *(uint32_t*)buf4438, *(uint32_t*)buf4439, *(uint32_t*)buf4440); + rsSetElementAt_ulong4(*(rs_allocation*)buf4441, *(ulong4*)buf4442, *(uint32_t*)buf4443, *(uint32_t*)buf4444, *(uint32_t*)buf4445); + rsSetObject((rs_element*) buf4446, *(rs_element*)buf4447); + rsSetObject((rs_type*) buf4448, *(rs_type*)buf4449); + rsSetObject((rs_allocation*) buf4450, *(rs_allocation*)buf4451); + rsSetObject((rs_sampler*) buf4452, *(rs_sampler*)buf4453); + rsSetObject((rs_script*) buf4454, *(rs_script*)buf4455); +#ifndef __LP64__ + rsSetObject((rs_mesh*) buf4456, *(rs_mesh*)buf4457); + rsSetObject((rs_program_fragment*) buf4458, *(rs_program_fragment*)buf4459); + rsSetObject((rs_program_vertex*) buf4460, *(rs_program_vertex*)buf4461); + rsSetObject((rs_program_raster*) buf4462, *(rs_program_raster*)buf4463); + rsSetObject((rs_program_store*) buf4464, *(rs_program_store*)buf4465); + rsSetObject((rs_font*) buf4466, *(rs_font*)buf4467); +#endif + *(rs_time_t*)buf4468 = rsTime((rs_time_t*) buf4469); + *(float4*)buf4470 = rsUnpackColor8888(*(uchar4*)buf4471); + *(int64_t*)buf4472 = rsUptimeMillis(); + *(int64_t*)buf4473 = rsUptimeNanos(); + *(float4*)buf4474 = rsYuvToRGBA_float4(*(uchar*)buf4475, *(uchar*)buf4476, *(uchar*)buf4477); + *(uchar4*)buf4478 = rsYuvToRGBA_uchar4(*(uchar*)buf4479, *(uchar*)buf4480, *(uchar*)buf4481); +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf4482); +#endif +#ifndef __LP64__ + rsgAllocationSyncAll(*(rs_allocation*)buf4483, *(rs_allocation_usage_type*)buf4484); +#endif +#ifndef __LP64__ + rsgBindColorTarget(*(rs_allocation*)buf4485, *(uint*)buf4486); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_fragment*)buf4487, *(uint*)buf4488, *(rs_allocation*)buf4489); +#endif +#ifndef __LP64__ + rsgBindConstant(*(rs_program_vertex*)buf4490, *(uint*)buf4491, *(rs_allocation*)buf4492); +#endif +#ifndef __LP64__ + rsgBindDepthTarget(*(rs_allocation*)buf4493); +#endif +#ifndef __LP64__ + rsgBindFont(*(rs_font*)buf4494); +#endif +#ifndef __LP64__ + rsgBindProgramFragment(*(rs_program_fragment*)buf4495); +#endif +#ifndef __LP64__ + rsgBindProgramRaster(*(rs_program_raster*)buf4496); +#endif +#ifndef __LP64__ + rsgBindProgramStore(*(rs_program_store*)buf4497); +#endif +#ifndef __LP64__ + rsgBindProgramVertex(*(rs_program_vertex*)buf4498); +#endif +#ifndef __LP64__ + rsgBindSampler(*(rs_program_fragment*)buf4499, *(uint*)buf4500, *(rs_sampler*)buf4501); +#endif +#ifndef __LP64__ + rsgBindTexture(*(rs_program_fragment*)buf4502, *(uint*)buf4503, *(rs_allocation*)buf4504); +#endif +#ifndef __LP64__ + rsgClearAllRenderTargets(); +#endif +#ifndef __LP64__ + rsgClearColor(*(float*)buf4505, *(float*)buf4506, *(float*)buf4507, *(float*)buf4508); +#endif +#ifndef __LP64__ + rsgClearColorTarget(*(uint*)buf4509); +#endif +#ifndef __LP64__ + rsgClearDepth(*(float*)buf4510); +#endif +#ifndef __LP64__ + rsgClearDepthTarget(); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf4511); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf4512, *(uint*)buf4513); +#endif +#ifndef __LP64__ + rsgDrawMesh(*(rs_mesh*)buf4514, *(uint*)buf4515, *(uint*)buf4516, *(uint*)buf4517); +#endif +#ifndef __LP64__ + rsgDrawQuad(*(float*)buf4518, *(float*)buf4519, *(float*)buf4520, *(float*)buf4521, *(float*)buf4522, *(float*)buf4523, *(float*)buf4524, *(float*)buf4525, *(float*)buf4526, *(float*)buf4527, *(float*)buf4528, *(float*)buf4529); +#endif +#ifndef __LP64__ + rsgDrawQuadTexCoords(*(float*)buf4530, *(float*)buf4531, *(float*)buf4532, *(float*)buf4533, *(float*)buf4534, *(float*)buf4535, *(float*)buf4536, *(float*)buf4537, *(float*)buf4538, *(float*)buf4539, *(float*)buf4540, *(float*)buf4541, *(float*)buf4542, *(float*)buf4543, *(float*)buf4544, *(float*)buf4545, *(float*)buf4546, *(float*)buf4547, *(float*)buf4548, *(float*)buf4549); +#endif +#ifndef __LP64__ + rsgDrawRect(*(float*)buf4550, *(float*)buf4551, *(float*)buf4552, *(float*)buf4553, *(float*)buf4554); +#endif +#ifndef __LP64__ + rsgDrawSpriteScreenspace(*(float*)buf4555, *(float*)buf4556, *(float*)buf4557, *(float*)buf4558, *(float*)buf4559); +#endif +#ifndef __LP64__ + rsgDrawText((const char*) buf4560, *(int*)buf4561, *(int*)buf4562); +#endif +#ifndef __LP64__ + rsgDrawText(*(rs_allocation*)buf4563, *(int*)buf4564, *(int*)buf4565); +#endif +#ifndef __LP64__ + *(uint*)buf4566 = rsgFinish(); +#endif +#ifndef __LP64__ + rsgFontColor(*(float*)buf4567, *(float*)buf4568, *(float*)buf4569, *(float*)buf4570); +#endif +#ifndef __LP64__ + *(uint*)buf4571 = rsgGetHeight(); +#endif +#ifndef __LP64__ + *(uint*)buf4572 = rsgGetWidth(); +#endif +#ifndef __LP64__ + rsgMeasureText((const char*) buf4573, (int*) buf4574, (int*) buf4575, (int*) buf4576, (int*) buf4577); +#endif +#ifndef __LP64__ + rsgMeasureText(*(rs_allocation*)buf4578, (int*) buf4579, (int*) buf4580, (int*) buf4581, (int*) buf4582); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf4583, (float*) buf4584, (float*) buf4585, (float*) buf4586, (float*) buf4587, (float*) buf4588, (float*) buf4589); +#endif +#ifndef __LP64__ + rsgMeshComputeBoundingBox(*(rs_mesh*)buf4590, (float3*) buf4591, (float3*) buf4592); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf4593 = rsgMeshGetIndexAllocation(*(rs_mesh*)buf4594, *(uint32_t*)buf4595); +#endif +#ifndef __LP64__ + *(rs_primitive*)buf4596 = rsgMeshGetPrimitive(*(rs_mesh*)buf4597, *(uint32_t*)buf4598); +#endif +#ifndef __LP64__ + *(uint32_t*)buf4599 = rsgMeshGetPrimitiveCount(*(rs_mesh*)buf4600); +#endif +#ifndef __LP64__ + *(rs_allocation*)buf4601 = rsgMeshGetVertexAllocation(*(rs_mesh*)buf4602, *(uint32_t*)buf4603); +#endif +#ifndef __LP64__ + *(uint32_t*)buf4604 = rsgMeshGetVertexAllocationCount(*(rs_mesh*)buf4605); +#endif +#ifndef __LP64__ + rsgProgramFragmentConstantColor(*(rs_program_fragment*)buf4606, *(float*)buf4607, *(float*)buf4608, *(float*)buf4609, *(float*)buf4610); +#endif +#ifndef __LP64__ + *(rs_cull_mode*)buf4611 = rsgProgramRasterGetCullMode(*(rs_program_raster*)buf4612); +#endif +#ifndef __LP64__ + *(bool*)buf4613 = rsgProgramRasterIsPointSpriteEnabled(*(rs_program_raster*)buf4614); +#endif +#ifndef __LP64__ + *(rs_blend_dst_func*)buf4615 = rsgProgramStoreGetBlendDstFunc(*(rs_program_store*)buf4616); +#endif +#ifndef __LP64__ + *(rs_blend_src_func*)buf4617 = rsgProgramStoreGetBlendSrcFunc(*(rs_program_store*)buf4618); +#endif +#ifndef __LP64__ + *(rs_depth_func*)buf4619 = rsgProgramStoreGetDepthFunc(*(rs_program_store*)buf4620); +#endif +#ifndef __LP64__ + *(bool*)buf4621 = rsgProgramStoreIsColorMaskAlphaEnabled(*(rs_program_store*)buf4622); +#endif +#ifndef __LP64__ + *(bool*)buf4623 = rsgProgramStoreIsColorMaskBlueEnabled(*(rs_program_store*)buf4624); +#endif +#ifndef __LP64__ + *(bool*)buf4625 = rsgProgramStoreIsColorMaskGreenEnabled(*(rs_program_store*)buf4626); +#endif +#ifndef __LP64__ + *(bool*)buf4627 = rsgProgramStoreIsColorMaskRedEnabled(*(rs_program_store*)buf4628); +#endif +#ifndef __LP64__ + *(bool*)buf4629 = rsgProgramStoreIsDepthMaskEnabled(*(rs_program_store*)buf4630); +#endif +#ifndef __LP64__ + *(bool*)buf4631 = rsgProgramStoreIsDitherEnabled(*(rs_program_store*)buf4632); +#endif +#ifndef __LP64__ + rsgProgramVertexGetProjectionMatrix((rs_matrix4x4*) buf4633); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadModelMatrix((const rs_matrix4x4*) buf4634); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadProjectionMatrix((const rs_matrix4x4*) buf4635); +#endif +#ifndef __LP64__ + rsgProgramVertexLoadTextureMatrix((const rs_matrix4x4*) buf4636); +#endif + *(float*)buf4637 = rsqrt(*(float*)buf4638); + *(float2*)buf4639 = rsqrt(*(float2*)buf4640); + *(float3*)buf4641 = rsqrt(*(float3*)buf4642); + *(float4*)buf4643 = rsqrt(*(float4*)buf4644); + *(float*)buf4645 = sign(*(float*)buf4646); + *(float2*)buf4647 = sign(*(float2*)buf4648); + *(float3*)buf4649 = sign(*(float3*)buf4650); + *(float4*)buf4651 = sign(*(float4*)buf4652); + *(float*)buf4653 = sin(*(float*)buf4654); + *(float2*)buf4655 = sin(*(float2*)buf4656); + *(float3*)buf4657 = sin(*(float3*)buf4658); + *(float4*)buf4659 = sin(*(float4*)buf4660); + *(float*)buf4661 = sincos(*(float*)buf4662, (float*) buf4663); + *(float2*)buf4664 = sincos(*(float2*)buf4665, (float2*) buf4666); + *(float3*)buf4667 = sincos(*(float3*)buf4668, (float3*) buf4669); + *(float4*)buf4670 = sincos(*(float4*)buf4671, (float4*) buf4672); + *(float*)buf4673 = sinh(*(float*)buf4674); + *(float2*)buf4675 = sinh(*(float2*)buf4676); + *(float3*)buf4677 = sinh(*(float3*)buf4678); + *(float4*)buf4679 = sinh(*(float4*)buf4680); + *(float*)buf4681 = sinpi(*(float*)buf4682); + *(float2*)buf4683 = sinpi(*(float2*)buf4684); + *(float3*)buf4685 = sinpi(*(float3*)buf4686); + *(float4*)buf4687 = sinpi(*(float4*)buf4688); + *(float*)buf4689 = sqrt(*(float*)buf4690); + *(float2*)buf4691 = sqrt(*(float2*)buf4692); + *(float3*)buf4693 = sqrt(*(float3*)buf4694); + *(float4*)buf4695 = sqrt(*(float4*)buf4696); + *(float*)buf4697 = step(*(float*)buf4698, *(float*)buf4699); + *(float2*)buf4700 = step(*(float2*)buf4701, *(float2*)buf4702); + *(float3*)buf4703 = step(*(float3*)buf4704, *(float3*)buf4705); + *(float4*)buf4706 = step(*(float4*)buf4707, *(float4*)buf4708); + *(float2*)buf4709 = step(*(float2*)buf4710, *(float*)buf4711); + *(float3*)buf4712 = step(*(float3*)buf4713, *(float*)buf4714); + *(float4*)buf4715 = step(*(float4*)buf4716, *(float*)buf4717); + *(float2*)buf4718 = step(*(float*)buf4719, *(float2*)buf4720); + *(float3*)buf4721 = step(*(float*)buf4722, *(float3*)buf4723); + *(float4*)buf4724 = step(*(float*)buf4725, *(float4*)buf4726); + *(float*)buf4727 = tan(*(float*)buf4728); + *(float2*)buf4729 = tan(*(float2*)buf4730); + *(float3*)buf4731 = tan(*(float3*)buf4732); + *(float4*)buf4733 = tan(*(float4*)buf4734); + *(float*)buf4735 = tanh(*(float*)buf4736); + *(float2*)buf4737 = tanh(*(float2*)buf4738); + *(float3*)buf4739 = tanh(*(float3*)buf4740); + *(float4*)buf4741 = tanh(*(float4*)buf4742); + *(float*)buf4743 = tanpi(*(float*)buf4744); + *(float2*)buf4745 = tanpi(*(float2*)buf4746); + *(float3*)buf4747 = tanpi(*(float3*)buf4748); + *(float4*)buf4749 = tanpi(*(float4*)buf4750); + *(float*)buf4751 = tgamma(*(float*)buf4752); + *(float2*)buf4753 = tgamma(*(float2*)buf4754); + *(float3*)buf4755 = tgamma(*(float3*)buf4756); + *(float4*)buf4757 = tgamma(*(float4*)buf4758); + *(float*)buf4759 = trunc(*(float*)buf4760); + *(float2*)buf4761 = trunc(*(float2*)buf4762); + *(float3*)buf4763 = trunc(*(float3*)buf4764); + *(float4*)buf4765 = trunc(*(float4*)buf4766); +}
diff --git a/slang/tests/P_all_api_22/stderr.txt.expect b/slang/tests/P_all_api_22/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_22/stderr.txt.expect
diff --git a/slang/tests/P_all_api_22/stdout.txt.expect b/slang/tests/P_all_api_22/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_22/stdout.txt.expect
diff --git a/slang/tests/P_all_api_23/all23.rs b/slang/tests/P_all_api_23/all23.rs new file mode 100644 index 0000000..cabfa44 --- /dev/null +++ b/slang/tests/P_all_api_23/all23.rs
@@ -0,0 +1,6368 @@ +// -target-api 23 -Wno-deprecated-declarations +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. + +#pragma version(1) +#pragma rs java_package_name(com.example.renderscript.testallapi) + +char buf0[200]; +char buf1[200]; +char buf2[200]; +char buf3[200]; +char buf4[200]; +char buf5[200]; +char buf6[200]; +char buf7[200]; +char buf8[200]; +char buf9[200]; +char buf10[200]; +char buf11[200]; +char buf12[200]; +char buf13[200]; +char buf14[200]; +char buf15[200]; +char buf16[200]; +char buf17[200]; +char buf18[200]; +char buf19[200]; +char buf20[200]; +char buf21[200]; +char buf22[200]; +char buf23[200]; +char buf24[200]; +char buf25[200]; +char buf26[200]; +char buf27[200]; +char buf28[200]; +char buf29[200]; +char buf30[200]; +char buf31[200]; +char buf32[200]; +char buf33[200]; +char buf34[200]; +char buf35[200]; +char buf36[200]; +char buf37[200]; +char buf38[200]; +char buf39[200]; +char buf40[200]; +char buf41[200]; +char buf42[200]; +char buf43[200]; +char buf44[200]; +char buf45[200]; +char buf46[200]; +char buf47[200]; +char buf48[200]; +char buf49[200]; +char buf50[200]; +char buf51[200]; +char buf52[200]; +char buf53[200]; +char buf54[200]; +char buf55[200]; +char buf56[200]; +char buf57[200]; +char buf58[200]; +char buf59[200]; +char buf60[200]; +char buf61[200]; +char buf62[200]; +char buf63[200]; +char buf64[200]; +char buf65[200]; +char buf66[200]; +char buf67[200]; +char buf68[200]; +char buf69[200]; +char buf70[200]; +char buf71[200]; +char buf72[200]; +char buf73[200]; +char buf74[200]; +char buf75[200]; +char buf76[200]; +char buf77[200]; +char buf78[200]; +char buf79[200]; +char buf80[200]; +char buf81[200]; +char buf82[200]; +char buf83[200]; +char buf84[200]; +char buf85[200]; +char buf86[200]; +char buf87[200]; +char buf88[200]; +char buf89[200]; +char buf90[200]; +char buf91[200]; +char buf92[200]; +char buf93[200]; +char buf94[200]; +char buf95[200]; +char buf96[200]; +char buf97[200]; +char buf98[200]; +char buf99[200]; +char buf100[200]; +char buf101[200]; +char buf102[200]; +char buf103[200]; +char buf104[200]; +char buf105[200]; +char buf106[200]; +char buf107[200]; +char buf108[200]; +char buf109[200]; +char buf110[200]; +char buf111[200]; +char buf112[200]; +char buf113[200]; +char buf114[200]; +char buf115[200]; +char buf116[200]; +char buf117[200]; +char buf118[200]; +char buf119[200]; +char buf120[200]; +char buf121[200]; +char buf122[200]; +char buf123[200]; +char buf124[200]; +char buf125[200]; +char buf126[200]; +char buf127[200]; +char buf128[200]; +char buf129[200]; +char buf130[200]; +char buf131[200]; +char buf132[200]; +char buf133[200]; +char buf134[200]; +char buf135[200]; +char buf136[200]; +char buf137[200]; +char buf138[200]; +char buf139[200]; +char buf140[200]; +char buf141[200]; +char buf142[200]; +char buf143[200]; +char buf144[200]; +char buf145[200]; +char buf146[200]; +char buf147[200]; +char buf148[200]; +char buf149[200]; +char buf150[200]; +char buf151[200]; +char buf152[200]; +char buf153[200]; +char buf154[200]; +char buf155[200]; +char buf156[200]; +char buf157[200]; +char buf158[200]; +char buf159[200]; +char buf160[200]; +char buf161[200]; +char buf162[200]; +char buf163[200]; +char buf164[200]; +char buf165[200]; +char buf166[200]; +char buf167[200]; +char buf168[200]; +char buf169[200]; +char buf170[200]; +char buf171[200]; +char buf172[200]; +char buf173[200]; +char buf174[200]; +char buf175[200]; +char buf176[200]; +char buf177[200]; +char buf178[200]; +char buf179[200]; +char buf180[200]; +char buf181[200]; +char buf182[200]; +char buf183[200]; +char buf184[200]; +char buf185[200]; +char buf186[200]; +char buf187[200]; +char buf188[200]; +char buf189[200]; +char buf190[200]; +char buf191[200]; +char buf192[200]; +char buf193[200]; +char buf194[200]; +char buf195[200]; +char buf196[200]; +char buf197[200]; +char buf198[200]; +char buf199[200]; +char buf200[200]; +char buf201[200]; +char buf202[200]; +char buf203[200]; +char buf204[200]; +char buf205[200]; +char buf206[200]; +char buf207[200]; +char buf208[200]; +char buf209[200]; +char buf210[200]; +char buf211[200]; +char buf212[200]; +char buf213[200]; +char buf214[200]; +char buf215[200]; +char buf216[200]; +char buf217[200]; +char buf218[200]; +char buf219[200]; +char buf220[200]; +char buf221[200]; +char buf222[200]; +char buf223[200]; +char buf224[200]; +char buf225[200]; +char buf226[200]; +char buf227[200]; +char buf228[200]; +char buf229[200]; +char buf230[200]; +char buf231[200]; +char buf232[200]; +char buf233[200]; +char buf234[200]; +char buf235[200]; +char buf236[200]; +char buf237[200]; +char buf238[200]; +char buf239[200]; +char buf240[200]; +char buf241[200]; +char buf242[200]; +char buf243[200]; +char buf244[200]; +char buf245[200]; +char buf246[200]; +char buf247[200]; +char buf248[200]; +char buf249[200]; +char buf250[200]; +char buf251[200]; +char buf252[200]; +char buf253[200]; +char buf254[200]; +char buf255[200]; +char buf256[200]; +char buf257[200]; +char buf258[200]; +char buf259[200]; +char buf260[200]; +char buf261[200]; +char buf262[200]; +char buf263[200]; +char buf264[200]; +char buf265[200]; +char buf266[200]; +char buf267[200]; +char buf268[200]; +char buf269[200]; +char buf270[200]; +char buf271[200]; +char buf272[200]; +char buf273[200]; +char buf274[200]; +char buf275[200]; +char buf276[200]; +char buf277[200]; +char buf278[200]; +char buf279[200]; +char buf280[200]; +char buf281[200]; +char buf282[200]; +char buf283[200]; +char buf284[200]; +char buf285[200]; +char buf286[200]; +char buf287[200]; +char buf288[200]; +char buf289[200]; +char buf290[200]; +char buf291[200]; +char buf292[200]; +char buf293[200]; +char buf294[200]; +char buf295[200]; +char buf296[200]; +char buf297[200]; +char buf298[200]; +char buf299[200]; +char buf300[200]; +char buf301[200]; +char buf302[200]; +char buf303[200]; +char buf304[200]; +char buf305[200]; +char buf306[200]; +char buf307[200]; +char buf308[200]; +char buf309[200]; +char buf310[200]; +char buf311[200]; +char buf312[200]; +char buf313[200]; +char buf314[200]; +char buf315[200]; +char buf316[200]; +char buf317[200]; +char buf318[200]; +char buf319[200]; +char buf320[200]; +char buf321[200]; +char buf322[200]; +char buf323[200]; +char buf324[200]; +char buf325[200]; +char buf326[200]; +char buf327[200]; +char buf328[200]; +char buf329[200]; +char buf330[200]; +char buf331[200]; +char buf332[200]; +char buf333[200]; +char buf334[200]; +char buf335[200]; +char buf336[200]; +char buf337[200]; +char buf338[200]; +char buf339[200]; +char buf340[200]; +char buf341[200]; +char buf342[200]; +char buf343[200]; +char buf344[200]; +char buf345[200]; +char buf346[200]; +char buf347[200]; +char buf348[200]; +char buf349[200]; +char buf350[200]; +char buf351[200]; +char buf352[200]; +char buf353[200]; +char buf354[200]; +char buf355[200]; +char buf356[200]; +char buf357[200]; +char buf358[200]; +char buf359[200]; +char buf360[200]; +char buf361[200]; +char buf362[200]; +char buf363[200]; +char buf364[200]; +char buf365[200]; +char buf366[200]; +char buf367[200]; +char buf368[200]; +char buf369[200]; +char buf370[200]; +char buf371[200]; +char buf372[200]; +char buf373[200]; +char buf374[200]; +char buf375[200]; +char buf376[200]; +char buf377[200]; +char buf378[200]; +char buf379[200]; +char buf380[200]; +char buf381[200]; +char buf382[200]; +char buf383[200]; +char buf384[200]; +char buf385[200]; +char buf386[200]; +char buf387[200]; +char buf388[200]; +char buf389[200]; +char buf390[200]; +char buf391[200]; +char buf392[200]; +char buf393[200]; +char buf394[200]; +char buf395[200]; +char buf396[200]; +char buf397[200]; +char buf398[200]; +char buf399[200]; +char buf400[200]; +char buf401[200]; +char buf402[200]; +char buf403[200]; +char buf404[200]; +char buf405[200]; +char buf406[200]; +char buf407[200]; +char buf408[200]; +char buf409[200]; +char buf410[200]; +char buf411[200]; +char buf412[200]; +char buf413[200]; +char buf414[200]; +char buf415[200]; +char buf416[200]; +char buf417[200]; +char buf418[200]; +char buf419[200]; +char buf420[200]; +char buf421[200]; +char buf422[200]; +char buf423[200]; +char buf424[200]; +char buf425[200]; +char buf426[200]; +char buf427[200]; +char buf428[200]; +char buf429[200]; +char buf430[200]; +char buf431[200]; +char buf432[200]; +char buf433[200]; +char buf434[200]; +char buf435[200]; +char buf436[200]; +char buf437[200]; +char buf438[200]; +char buf439[200]; +char buf440[200]; +char buf441[200]; +char buf442[200]; +char buf443[200]; +char buf444[200]; +char buf445[200]; +char buf446[200]; +char buf447[200]; +char buf448[200]; +char buf449[200]; +char buf450[200]; +char buf451[200]; +char buf452[200]; +char buf453[200]; +char buf454[200]; +char buf455[200]; +char buf456[200]; +char buf457[200]; +char buf458[200]; +char buf459[200]; +char buf460[200]; +char buf461[200]; +char buf462[200]; +char buf463[200]; +char buf464[200]; +char buf465[200]; +char buf466[200]; +char buf467[200]; +char buf468[200]; +char buf469[200]; +char buf470[200]; +char buf471[200]; +char buf472[200]; +char buf473[200]; +char buf474[200]; +char buf475[200]; +char buf476[200]; +char buf477[200]; +char buf478[200]; +char buf479[200]; +char buf480[200]; +char buf481[200]; +char buf482[200]; +char buf483[200]; +char buf484[200]; +char buf485[200]; +char buf486[200]; +char buf487[200]; +char buf488[200]; +char buf489[200]; +char buf490[200]; +char buf491[200]; +char buf492[200]; +char buf493[200]; +char buf494[200]; +char buf495[200]; +char buf496[200]; +char buf497[200]; +char buf498[200]; +char buf499[200]; +char buf500[200]; +char buf501[200]; +char buf502[200]; +char buf503[200]; +char buf504[200]; +char buf505[200]; +char buf506[200]; +char buf507[200]; +char buf508[200]; +char buf509[200]; +char buf510[200]; +char buf511[200]; +char buf512[200]; +char buf513[200]; +char buf514[200]; +char buf515[200]; +char buf516[200]; +char buf517[200]; +char buf518[200]; +char buf519[200]; +char buf520[200]; +char buf521[200]; +char buf522[200]; +char buf523[200]; +char buf524[200]; +char buf525[200]; +char buf526[200]; +char buf527[200]; +char buf528[200]; +char buf529[200]; +char buf530[200]; +char buf531[200]; +char buf532[200]; +char buf533[200]; +char buf534[200]; +char buf535[200]; +char buf536[200]; +char buf537[200]; +char buf538[200]; +char buf539[200]; +char buf540[200]; +char buf541[200]; +char buf542[200]; +char buf543[200]; +char buf544[200]; +char buf545[200]; +char buf546[200]; +char buf547[200]; +char buf548[200]; +char buf549[200]; +char buf550[200]; +char buf551[200]; +char buf552[200]; +char buf553[200]; +char buf554[200]; +char buf555[200]; +char buf556[200]; +char buf557[200]; +char buf558[200]; +char buf559[200]; +char buf560[200]; +char buf561[200]; +char buf562[200]; +char buf563[200]; +char buf564[200]; +char buf565[200]; +char buf566[200]; +char buf567[200]; +char buf568[200]; +char buf569[200]; +char buf570[200]; +char buf571[200]; +char buf572[200]; +char buf573[200]; +char buf574[200]; +char buf575[200]; +char buf576[200]; +char buf577[200]; +char buf578[200]; +char buf579[200]; +char buf580[200]; +char buf581[200]; +char buf582[200]; +char buf583[200]; +char buf584[200]; +char buf585[200]; +char buf586[200]; +char buf587[200]; +char buf588[200]; +char buf589[200]; +char buf590[200]; +char buf591[200]; +char buf592[200]; +char buf593[200]; +char buf594[200]; +char buf595[200]; +char buf596[200]; +char buf597[200]; +char buf598[200]; +char buf599[200]; +char buf600[200]; +char buf601[200]; +char buf602[200]; +char buf603[200]; +char buf604[200]; +char buf605[200]; +char buf606[200]; +char buf607[200]; +char buf608[200]; +char buf609[200]; +char buf610[200]; +char buf611[200]; +char buf612[200]; +char buf613[200]; +char buf614[200]; +char buf615[200]; +char buf616[200]; +char buf617[200]; +char buf618[200]; +char buf619[200]; +char buf620[200]; +char buf621[200]; +char buf622[200]; +char buf623[200]; +char buf624[200]; +char buf625[200]; +char buf626[200]; +char buf627[200]; +char buf628[200]; +char buf629[200]; +char buf630[200]; +char buf631[200]; +char buf632[200]; +char buf633[200]; +char buf634[200]; +char buf635[200]; +char buf636[200]; +char buf637[200]; +char buf638[200]; +char buf639[200]; +char buf640[200]; +char buf641[200]; +char buf642[200]; +char buf643[200]; +char buf644[200]; +char buf645[200]; +char buf646[200]; +char buf647[200]; +char buf648[200]; +char buf649[200]; +char buf650[200]; +char buf651[200]; +char buf652[200]; +char buf653[200]; +char buf654[200]; +char buf655[200]; +char buf656[200]; +char buf657[200]; +char buf658[200]; +char buf659[200]; +char buf660[200]; +char buf661[200]; +char buf662[200]; +char buf663[200]; +char buf664[200]; +char buf665[200]; +char buf666[200]; +char buf667[200]; +char buf668[200]; +char buf669[200]; +char buf670[200]; +char buf671[200]; +char buf672[200]; +char buf673[200]; +char buf674[200]; +char buf675[200]; +char buf676[200]; +char buf677[200]; +char buf678[200]; +char buf679[200]; +char buf680[200]; +char buf681[200]; +char buf682[200]; +char buf683[200]; +char buf684[200]; +char buf685[200]; +char buf686[200]; +char buf687[200]; +char buf688[200]; +char buf689[200]; +char buf690[200]; +char buf691[200]; +char buf692[200]; +char buf693[200]; +char buf694[200]; +char buf695[200]; +char buf696[200]; +char buf697[200]; +char buf698[200]; +char buf699[200]; +char buf700[200]; +char buf701[200]; +char buf702[200]; +char buf703[200]; +char buf704[200]; +char buf705[200]; +char buf706[200]; +char buf707[200]; +char buf708[200]; +char buf709[200]; +char buf710[200]; +char buf711[200]; +char buf712[200]; +char buf713[200]; +char buf714[200]; +char buf715[200]; +char buf716[200]; +char buf717[200]; +char buf718[200]; +char buf719[200]; +char buf720[200]; +char buf721[200]; +char buf722[200]; +char buf723[200]; +char buf724[200]; +char buf725[200]; +char buf726[200]; +char buf727[200]; +char buf728[200]; +char buf729[200]; +char buf730[200]; +char buf731[200]; +char buf732[200]; +char buf733[200]; +char buf734[200]; +char buf735[200]; +char buf736[200]; +char buf737[200]; +char buf738[200]; +char buf739[200]; +char buf740[200]; +char buf741[200]; +char buf742[200]; +char buf743[200]; +char buf744[200]; +char buf745[200]; +char buf746[200]; +char buf747[200]; +char buf748[200]; +char buf749[200]; +char buf750[200]; +char buf751[200]; +char buf752[200]; +char buf753[200]; +char buf754[200]; +char buf755[200]; +char buf756[200]; +char buf757[200]; +char buf758[200]; +char buf759[200]; +char buf760[200]; +char buf761[200]; +char buf762[200]; +char buf763[200]; +char buf764[200]; +char buf765[200]; +char buf766[200]; +char buf767[200]; +char buf768[200]; +char buf769[200]; +char buf770[200]; +char buf771[200]; +char buf772[200]; +char buf773[200]; +char buf774[200]; +char buf775[200]; +char buf776[200]; +char buf777[200]; +char buf778[200]; +char buf779[200]; +char buf780[200]; +char buf781[200]; +char buf782[200]; +char buf783[200]; +char buf784[200]; +char buf785[200]; +char buf786[200]; +char buf787[200]; +char buf788[200]; +char buf789[200]; +char buf790[200]; +char buf791[200]; +char buf792[200]; +char buf793[200]; +char buf794[200]; +char buf795[200]; +char buf796[200]; +char buf797[200]; +char buf798[200]; +char buf799[200]; +char buf800[200]; +char buf801[200]; +char buf802[200]; +char buf803[200]; +char buf804[200]; +char buf805[200]; +char buf806[200]; +char buf807[200]; +char buf808[200]; +char buf809[200]; +char buf810[200]; +char buf811[200]; +char buf812[200]; +char buf813[200]; +char buf814[200]; +char buf815[200]; +char buf816[200]; +char buf817[200]; +char buf818[200]; +char buf819[200]; +char buf820[200]; +char buf821[200]; +char buf822[200]; +char buf823[200]; +char buf824[200]; +char buf825[200]; +char buf826[200]; +char buf827[200]; +char buf828[200]; +char buf829[200]; +char buf830[200]; +char buf831[200]; +char buf832[200]; +char buf833[200]; +char buf834[200]; +char buf835[200]; +char buf836[200]; +char buf837[200]; +char buf838[200]; +char buf839[200]; +char buf840[200]; +char buf841[200]; +char buf842[200]; +char buf843[200]; +char buf844[200]; +char buf845[200]; +char buf846[200]; +char buf847[200]; +char buf848[200]; +char buf849[200]; +char buf850[200]; +char buf851[200]; +char buf852[200]; +char buf853[200]; +char buf854[200]; +char buf855[200]; +char buf856[200]; +char buf857[200]; +char buf858[200]; +char buf859[200]; +char buf860[200]; +char buf861[200]; +char buf862[200]; +char buf863[200]; +char buf864[200]; +char buf865[200]; +char buf866[200]; +char buf867[200]; +char buf868[200]; +char buf869[200]; +char buf870[200]; +char buf871[200]; +char buf872[200]; +char buf873[200]; +char buf874[200]; +char buf875[200]; +char buf876[200]; +char buf877[200]; +char buf878[200]; +char buf879[200]; +char buf880[200]; +char buf881[200]; +char buf882[200]; +char buf883[200]; +char buf884[200]; +char buf885[200]; +char buf886[200]; +char buf887[200]; +char buf888[200]; +char buf889[200]; +char buf890[200]; +char buf891[200]; +char buf892[200]; +char buf893[200]; +char buf894[200]; +char buf895[200]; +char buf896[200]; +char buf897[200]; +char buf898[200]; +char buf899[200]; +char buf900[200]; +char buf901[200]; +char buf902[200]; +char buf903[200]; +char buf904[200]; +char buf905[200]; +char buf906[200]; +char buf907[200]; +char buf908[200]; +char buf909[200]; +char buf910[200]; +char buf911[200]; +char buf912[200]; +char buf913[200]; +char buf914[200]; +char buf915[200]; +char buf916[200]; +char buf917[200]; +char buf918[200]; +char buf919[200]; +char buf920[200]; +char buf921[200]; +char buf922[200]; +char buf923[200]; +char buf924[200]; +char buf925[200]; +char buf926[200]; +char buf927[200]; +char buf928[200]; +char buf929[200]; +char buf930[200]; +char buf931[200]; +char buf932[200]; +char buf933[200]; +char buf934[200]; +char buf935[200]; +char buf936[200]; +char buf937[200]; +char buf938[200]; +char buf939[200]; +char buf940[200]; +char buf941[200]; +char buf942[200]; +char buf943[200]; +char buf944[200]; +char buf945[200]; +char buf946[200]; +char buf947[200]; +char buf948[200]; +char buf949[200]; +char buf950[200]; +char buf951[200]; +char buf952[200]; +char buf953[200]; +char buf954[200]; +char buf955[200]; +char buf956[200]; +char buf957[200]; +char buf958[200]; +char buf959[200]; +char buf960[200]; +char buf961[200]; +char buf962[200]; +char buf963[200]; +char buf964[200]; +char buf965[200]; +char buf966[200]; +char buf967[200]; +char buf968[200]; +char buf969[200]; +char buf970[200]; +char buf971[200]; +char buf972[200]; +char buf973[200]; +char buf974[200]; +char buf975[200]; +char buf976[200]; +char buf977[200]; +char buf978[200]; +char buf979[200]; +char buf980[200]; +char buf981[200]; +char buf982[200]; +char buf983[200]; +char buf984[200]; +char buf985[200]; +char buf986[200]; +char buf987[200]; +char buf988[200]; +char buf989[200]; +char buf990[200]; +char buf991[200]; +char buf992[200]; +char buf993[200]; +char buf994[200]; +char buf995[200]; +char buf996[200]; +char buf997[200]; +char buf998[200]; +char buf999[200]; +char buf1000[200]; +char buf1001[200]; +char buf1002[200]; +char buf1003[200]; +char buf1004[200]; +char buf1005[200]; +char buf1006[200]; +char buf1007[200]; +char buf1008[200]; +char buf1009[200]; +char buf1010[200]; +char buf1011[200]; +char buf1012[200]; +char buf1013[200]; +char buf1014[200]; +char buf1015[200]; +char buf1016[200]; +char buf1017[200]; +char buf1018[200]; +char buf1019[200]; +char buf1020[200]; +char buf1021[200]; +char buf1022[200]; +char buf1023[200]; +char buf1024[200]; +char buf1025[200]; +char buf1026[200]; +char buf1027[200]; +char buf1028[200]; +char buf1029[200]; +char buf1030[200]; +char buf1031[200]; +char buf1032[200]; +char buf1033[200]; +char buf1034[200]; +char buf1035[200]; +char buf1036[200]; +char buf1037[200]; +char buf1038[200]; +char buf1039[200]; +char buf1040[200]; +char buf1041[200]; +char buf1042[200]; +char buf1043[200]; +char buf1044[200]; +char buf1045[200]; +char buf1046[200]; +char buf1047[200]; +char buf1048[200]; +char buf1049[200]; +char buf1050[200]; +char buf1051[200]; +char buf1052[200]; +char buf1053[200]; +char buf1054[200]; +char buf1055[200]; +char buf1056[200]; +char buf1057[200]; +char buf1058[200]; +char buf1059[200]; +char buf1060[200]; +char buf1061[200]; +char buf1062[200]; +char buf1063[200]; +char buf1064[200]; +char buf1065[200]; +char buf1066[200]; +char buf1067[200]; +char buf1068[200]; +char buf1069[200]; +char buf1070[200]; +char buf1071[200]; +char buf1072[200]; +char buf1073[200]; +char buf1074[200]; +char buf1075[200]; +char buf1076[200]; +char buf1077[200]; +char buf1078[200]; +char buf1079[200]; +char buf1080[200]; +char buf1081[200]; +char buf1082[200]; +char buf1083[200]; +char buf1084[200]; +char buf1085[200]; +char buf1086[200]; +char buf1087[200]; +char buf1088[200]; +char buf1089[200]; +char buf1090[200]; +char buf1091[200]; +char buf1092[200]; +char buf1093[200]; +char buf1094[200]; +char buf1095[200]; +char buf1096[200]; +char buf1097[200]; +char buf1098[200]; +char buf1099[200]; +char buf1100[200]; +char buf1101[200]; +char buf1102[200]; +char buf1103[200]; +char buf1104[200]; +char buf1105[200]; +char buf1106[200]; +char buf1107[200]; +char buf1108[200]; +char buf1109[200]; +char buf1110[200]; +char buf1111[200]; +char buf1112[200]; +char buf1113[200]; +char buf1114[200]; +char buf1115[200]; +char buf1116[200]; +char buf1117[200]; +char buf1118[200]; +char buf1119[200]; +char buf1120[200]; +char buf1121[200]; +char buf1122[200]; +char buf1123[200]; +char buf1124[200]; +char buf1125[200]; +char buf1126[200]; +char buf1127[200]; +char buf1128[200]; +char buf1129[200]; +char buf1130[200]; +char buf1131[200]; +char buf1132[200]; +char buf1133[200]; +char buf1134[200]; +char buf1135[200]; +char buf1136[200]; +char buf1137[200]; +char buf1138[200]; +char buf1139[200]; +char buf1140[200]; +char buf1141[200]; +char buf1142[200]; +char buf1143[200]; +char buf1144[200]; +char buf1145[200]; +char buf1146[200]; +char buf1147[200]; +char buf1148[200]; +char buf1149[200]; +char buf1150[200]; +char buf1151[200]; +char buf1152[200]; +char buf1153[200]; +char buf1154[200]; +char buf1155[200]; +char buf1156[200]; +char buf1157[200]; +char buf1158[200]; +char buf1159[200]; +char buf1160[200]; +char buf1161[200]; +char buf1162[200]; +char buf1163[200]; +char buf1164[200]; +char buf1165[200]; +char buf1166[200]; +char buf1167[200]; +char buf1168[200]; +char buf1169[200]; +char buf1170[200]; +char buf1171[200]; +char buf1172[200]; +char buf1173[200]; +char buf1174[200]; +char buf1175[200]; +char buf1176[200]; +char buf1177[200]; +char buf1178[200]; +char buf1179[200]; +char buf1180[200]; +char buf1181[200]; +char buf1182[200]; +char buf1183[200]; +char buf1184[200]; +char buf1185[200]; +char buf1186[200]; +char buf1187[200]; +char buf1188[200]; +char buf1189[200]; +char buf1190[200]; +char buf1191[200]; +char buf1192[200]; +char buf1193[200]; +char buf1194[200]; +char buf1195[200]; +char buf1196[200]; +char buf1197[200]; +char buf1198[200]; +char buf1199[200]; +char buf1200[200]; +char buf1201[200]; +char buf1202[200]; +char buf1203[200]; +char buf1204[200]; +char buf1205[200]; +char buf1206[200]; +char buf1207[200]; +char buf1208[200]; +char buf1209[200]; +char buf1210[200]; +char buf1211[200]; +char buf1212[200]; +char buf1213[200]; +char buf1214[200]; +char buf1215[200]; +char buf1216[200]; +char buf1217[200]; +char buf1218[200]; +char buf1219[200]; +char buf1220[200]; +char buf1221[200]; +char buf1222[200]; +char buf1223[200]; +char buf1224[200]; +char buf1225[200]; +char buf1226[200]; +char buf1227[200]; +char buf1228[200]; +char buf1229[200]; +char buf1230[200]; +char buf1231[200]; +char buf1232[200]; +char buf1233[200]; +char buf1234[200]; +char buf1235[200]; +char buf1236[200]; +char buf1237[200]; +char buf1238[200]; +char buf1239[200]; +char buf1240[200]; +char buf1241[200]; +char buf1242[200]; +char buf1243[200]; +char buf1244[200]; +char buf1245[200]; +char buf1246[200]; +char buf1247[200]; +char buf1248[200]; +char buf1249[200]; +char buf1250[200]; +char buf1251[200]; +char buf1252[200]; +char buf1253[200]; +char buf1254[200]; +char buf1255[200]; +char buf1256[200]; +char buf1257[200]; +char buf1258[200]; +char buf1259[200]; +char buf1260[200]; +char buf1261[200]; +char buf1262[200]; +char buf1263[200]; +char buf1264[200]; +char buf1265[200]; +char buf1266[200]; +char buf1267[200]; +char buf1268[200]; +char buf1269[200]; +char buf1270[200]; +char buf1271[200]; +char buf1272[200]; +char buf1273[200]; +char buf1274[200]; +char buf1275[200]; +char buf1276[200]; +char buf1277[200]; +char buf1278[200]; +char buf1279[200]; +char buf1280[200]; +char buf1281[200]; +char buf1282[200]; +char buf1283[200]; +char buf1284[200]; +char buf1285[200]; +char buf1286[200]; +char buf1287[200]; +char buf1288[200]; +char buf1289[200]; +char buf1290[200]; +char buf1291[200]; +char buf1292[200]; +char buf1293[200]; +char buf1294[200]; +char buf1295[200]; +char buf1296[200]; +char buf1297[200]; +char buf1298[200]; +char buf1299[200]; +char buf1300[200]; +char buf1301[200]; +char buf1302[200]; +char buf1303[200]; +char buf1304[200]; +char buf1305[200]; +char buf1306[200]; +char buf1307[200]; +char buf1308[200]; +char buf1309[200]; +char buf1310[200]; +char buf1311[200]; +char buf1312[200]; +char buf1313[200]; +char buf1314[200]; +char buf1315[200]; +char buf1316[200]; +char buf1317[200]; +char buf1318[200]; +char buf1319[200]; +char buf1320[200]; +char buf1321[200]; +char buf1322[200]; +char buf1323[200]; +char buf1324[200]; +char buf1325[200]; +char buf1326[200]; +char buf1327[200]; +char buf1328[200]; +char buf1329[200]; +char buf1330[200]; +char buf1331[200]; +char buf1332[200]; +char buf1333[200]; +char buf1334[200]; +char buf1335[200]; +char buf1336[200]; +char buf1337[200]; +char buf1338[200]; +char buf1339[200]; +char buf1340[200]; +char buf1341[200]; +char buf1342[200]; +char buf1343[200]; +char buf1344[200]; +char buf1345[200]; +char buf1346[200]; +char buf1347[200]; +char buf1348[200]; +char buf1349[200]; +char buf1350[200]; +char buf1351[200]; +char buf1352[200]; +char buf1353[200]; +char buf1354[200]; +char buf1355[200]; +char buf1356[200]; +char buf1357[200]; +char buf1358[200]; +char buf1359[200]; +char buf1360[200]; +char buf1361[200]; +char buf1362[200]; +char buf1363[200]; +char buf1364[200]; +char buf1365[200]; +char buf1366[200]; +char buf1367[200]; +char buf1368[200]; +char buf1369[200]; +char buf1370[200]; +char buf1371[200]; +char buf1372[200]; +char buf1373[200]; +char buf1374[200]; +char buf1375[200]; +char buf1376[200]; +char buf1377[200]; +char buf1378[200]; +char buf1379[200]; +char buf1380[200]; +char buf1381[200]; +char buf1382[200]; +char buf1383[200]; +char buf1384[200]; +char buf1385[200]; +char buf1386[200]; +char buf1387[200]; +char buf1388[200]; +char buf1389[200]; +char buf1390[200]; +char buf1391[200]; +char buf1392[200]; +char buf1393[200]; +char buf1394[200]; +char buf1395[200]; +char buf1396[200]; +char buf1397[200]; +char buf1398[200]; +char buf1399[200]; +char buf1400[200]; +char buf1401[200]; +char buf1402[200]; +char buf1403[200]; +char buf1404[200]; +char buf1405[200]; +char buf1406[200]; +char buf1407[200]; +char buf1408[200]; +char buf1409[200]; +char buf1410[200]; +char buf1411[200]; +char buf1412[200]; +char buf1413[200]; +char buf1414[200]; +char buf1415[200]; +char buf1416[200]; +char buf1417[200]; +char buf1418[200]; +char buf1419[200]; +char buf1420[200]; +char buf1421[200]; +char buf1422[200]; +char buf1423[200]; +char buf1424[200]; +char buf1425[200]; +char buf1426[200]; +char buf1427[200]; +char buf1428[200]; +char buf1429[200]; +char buf1430[200]; +char buf1431[200]; +char buf1432[200]; +char buf1433[200]; +char buf1434[200]; +char buf1435[200]; +char buf1436[200]; +char buf1437[200]; +char buf1438[200]; +char buf1439[200]; +char buf1440[200]; +char buf1441[200]; +char buf1442[200]; +char buf1443[200]; +char buf1444[200]; +char buf1445[200]; +char buf1446[200]; +char buf1447[200]; +char buf1448[200]; +char buf1449[200]; +char buf1450[200]; +char buf1451[200]; +char buf1452[200]; +char buf1453[200]; +char buf1454[200]; +char buf1455[200]; +char buf1456[200]; +char buf1457[200]; +char buf1458[200]; +char buf1459[200]; +char buf1460[200]; +char buf1461[200]; +char buf1462[200]; +char buf1463[200]; +char buf1464[200]; +char buf1465[200]; +char buf1466[200]; +char buf1467[200]; +char buf1468[200]; +char buf1469[200]; +char buf1470[200]; +char buf1471[200]; +char buf1472[200]; +char buf1473[200]; +char buf1474[200]; +char buf1475[200]; +char buf1476[200]; +char buf1477[200]; +char buf1478[200]; +char buf1479[200]; +char buf1480[200]; +char buf1481[200]; +char buf1482[200]; +char buf1483[200]; +char buf1484[200]; +char buf1485[200]; +char buf1486[200]; +char buf1487[200]; +char buf1488[200]; +char buf1489[200]; +char buf1490[200]; +char buf1491[200]; +char buf1492[200]; +char buf1493[200]; +char buf1494[200]; +char buf1495[200]; +char buf1496[200]; +char buf1497[200]; +char buf1498[200]; +char buf1499[200]; +char buf1500[200]; +char buf1501[200]; +char buf1502[200]; +char buf1503[200]; +char buf1504[200]; +char buf1505[200]; +char buf1506[200]; +char buf1507[200]; +char buf1508[200]; +char buf1509[200]; +char buf1510[200]; +char buf1511[200]; +char buf1512[200]; +char buf1513[200]; +char buf1514[200]; +char buf1515[200]; +char buf1516[200]; +char buf1517[200]; +char buf1518[200]; +char buf1519[200]; +char buf1520[200]; +char buf1521[200]; +char buf1522[200]; +char buf1523[200]; +char buf1524[200]; +char buf1525[200]; +char buf1526[200]; +char buf1527[200]; +char buf1528[200]; +char buf1529[200]; +char buf1530[200]; +char buf1531[200]; +char buf1532[200]; +char buf1533[200]; +char buf1534[200]; +char buf1535[200]; +char buf1536[200]; +char buf1537[200]; +char buf1538[200]; +char buf1539[200]; +char buf1540[200]; +char buf1541[200]; +char buf1542[200]; +char buf1543[200]; +char buf1544[200]; +char buf1545[200]; +char buf1546[200]; +char buf1547[200]; +char buf1548[200]; +char buf1549[200]; +char buf1550[200]; +char buf1551[200]; +char buf1552[200]; +char buf1553[200]; +char buf1554[200]; +char buf1555[200]; +char buf1556[200]; +char buf1557[200]; +char buf1558[200]; +char buf1559[200]; +char buf1560[200]; +char buf1561[200]; +char buf1562[200]; +char buf1563[200]; +char buf1564[200]; +char buf1565[200]; +char buf1566[200]; +char buf1567[200]; +char buf1568[200]; +char buf1569[200]; +char buf1570[200]; +char buf1571[200]; +char buf1572[200]; +char buf1573[200]; +char buf1574[200]; +char buf1575[200]; +char buf1576[200]; +char buf1577[200]; +char buf1578[200]; +char buf1579[200]; +char buf1580[200]; +char buf1581[200]; +char buf1582[200]; +char buf1583[200]; +char buf1584[200]; +char buf1585[200]; +char buf1586[200]; +char buf1587[200]; +char buf1588[200]; +char buf1589[200]; +char buf1590[200]; +char buf1591[200]; +char buf1592[200]; +char buf1593[200]; +char buf1594[200]; +char buf1595[200]; +char buf1596[200]; +char buf1597[200]; +char buf1598[200]; +char buf1599[200]; +char buf1600[200]; +char buf1601[200]; +char buf1602[200]; +char buf1603[200]; +char buf1604[200]; +char buf1605[200]; +char buf1606[200]; +char buf1607[200]; +char buf1608[200]; +char buf1609[200]; +char buf1610[200]; +char buf1611[200]; +char buf1612[200]; +char buf1613[200]; +char buf1614[200]; +char buf1615[200]; +char buf1616[200]; +char buf1617[200]; +char buf1618[200]; +char buf1619[200]; +char buf1620[200]; +char buf1621[200]; +char buf1622[200]; +char buf1623[200]; +char buf1624[200]; +char buf1625[200]; +char buf1626[200]; +char buf1627[200]; +char buf1628[200]; +char buf1629[200]; +char buf1630[200]; +char buf1631[200]; +char buf1632[200]; +char buf1633[200]; +char buf1634[200]; +char buf1635[200]; +char buf1636[200]; +char buf1637[200]; +char buf1638[200]; +char buf1639[200]; +char buf1640[200]; +char buf1641[200]; +char buf1642[200]; +char buf1643[200]; +char buf1644[200]; +char buf1645[200]; +char buf1646[200]; +char buf1647[200]; +char buf1648[200]; +char buf1649[200]; +char buf1650[200]; +char buf1651[200]; +char buf1652[200]; +char buf1653[200]; +char buf1654[200]; +char buf1655[200]; +char buf1656[200]; +char buf1657[200]; +char buf1658[200]; +char buf1659[200]; +char buf1660[200]; +char buf1661[200]; +char buf1662[200]; +char buf1663[200]; +char buf1664[200]; +char buf1665[200]; +char buf1666[200]; +char buf1667[200]; +char buf1668[200]; +char buf1669[200]; +char buf1670[200]; +char buf1671[200]; +char buf1672[200]; +char buf1673[200]; +char buf1674[200]; +char buf1675[200]; +char buf1676[200]; +char buf1677[200]; +char buf1678[200]; +char buf1679[200]; +char buf1680[200]; +char buf1681[200]; +char buf1682[200]; +char buf1683[200]; +char buf1684[200]; +char buf1685[200]; +char buf1686[200]; +char buf1687[200]; +char buf1688[200]; +char buf1689[200]; +char buf1690[200]; +char buf1691[200]; +char buf1692[200]; +char buf1693[200]; +char buf1694[200]; +char buf1695[200]; +char buf1696[200]; +char buf1697[200]; +char buf1698[200]; +char buf1699[200]; +char buf1700[200]; +char buf1701[200]; +char buf1702[200]; +char buf1703[200]; +char buf1704[200]; +char buf1705[200]; +char buf1706[200]; +char buf1707[200]; +char buf1708[200]; +char buf1709[200]; +char buf1710[200]; +char buf1711[200]; +char buf1712[200]; +char buf1713[200]; +char buf1714[200]; +char buf1715[200]; +char buf1716[200]; +char buf1717[200]; +char buf1718[200]; +char buf1719[200]; +char buf1720[200]; +char buf1721[200]; +char buf1722[200]; +char buf1723[200]; +char buf1724[200]; +char buf1725[200]; +char buf1726[200]; +char buf1727[200]; +char buf1728[200]; +char buf1729[200]; +char buf1730[200]; +char buf1731[200]; +char buf1732[200]; +char buf1733[200]; +char buf1734[200]; +char buf1735[200]; +char buf1736[200]; +char buf1737[200]; +char buf1738[200]; +char buf1739[200]; +char buf1740[200]; +char buf1741[200]; +char buf1742[200]; +char buf1743[200]; +char buf1744[200]; +char buf1745[200]; +char buf1746[200]; +char buf1747[200]; +char buf1748[200]; +char buf1749[200]; +char buf1750[200]; +char buf1751[200]; +char buf1752[200]; +char buf1753[200]; +char buf1754[200]; +char buf1755[200]; +char buf1756[200]; +char buf1757[200]; +char buf1758[200]; +char buf1759[200]; +char buf1760[200]; +char buf1761[200]; +char buf1762[200]; +char buf1763[200]; +char buf1764[200]; +char buf1765[200]; +char buf1766[200]; +char buf1767[200]; +char buf1768[200]; +char buf1769[200]; +char buf1770[200]; +char buf1771[200]; +char buf1772[200]; +char buf1773[200]; +char buf1774[200]; +char buf1775[200]; +char buf1776[200]; +char buf1777[200]; +char buf1778[200]; +char buf1779[200]; +char buf1780[200]; +char buf1781[200]; +char buf1782[200]; +char buf1783[200]; +char buf1784[200]; +char buf1785[200]; +char buf1786[200]; +char buf1787[200]; +char buf1788[200]; +char buf1789[200]; +char buf1790[200]; +char buf1791[200]; +char buf1792[200]; +char buf1793[200]; +char buf1794[200]; +char buf1795[200]; +char buf1796[200]; +char buf1797[200]; +char buf1798[200]; +char buf1799[200]; +char buf1800[200]; +char buf1801[200]; +char buf1802[200]; +char buf1803[200]; +char buf1804[200]; +char buf1805[200]; +char buf1806[200]; +char buf1807[200]; +char buf1808[200]; +char buf1809[200]; +char buf1810[200]; +char buf1811[200]; +char buf1812[200]; +char buf1813[200]; +char buf1814[200]; +char buf1815[200]; +char buf1816[200]; +char buf1817[200]; +char buf1818[200]; +char buf1819[200]; +char buf1820[200]; +char buf1821[200]; +char buf1822[200]; +char buf1823[200]; +char buf1824[200]; +char buf1825[200]; +char buf1826[200]; +char buf1827[200]; +char buf1828[200]; +char buf1829[200]; +char buf1830[200]; +char buf1831[200]; +char buf1832[200]; +char buf1833[200]; +char buf1834[200]; +char buf1835[200]; +char buf1836[200]; +char buf1837[200]; +char buf1838[200]; +char buf1839[200]; +char buf1840[200]; +char buf1841[200]; +char buf1842[200]; +char buf1843[200]; +char buf1844[200]; +char buf1845[200]; +char buf1846[200]; +char buf1847[200]; +char buf1848[200]; +char buf1849[200]; +char buf1850[200]; +char buf1851[200]; +char buf1852[200]; +char buf1853[200]; +char buf1854[200]; +char buf1855[200]; +char buf1856[200]; +char buf1857[200]; +char buf1858[200]; +char buf1859[200]; +char buf1860[200]; +char buf1861[200]; +char buf1862[200]; +char buf1863[200]; +char buf1864[200]; +char buf1865[200]; +char buf1866[200]; +char buf1867[200]; +char buf1868[200]; +char buf1869[200]; +char buf1870[200]; +char buf1871[200]; +char buf1872[200]; +char buf1873[200]; +char buf1874[200]; +char buf1875[200]; +char buf1876[200]; +char buf1877[200]; +char buf1878[200]; +char buf1879[200]; +char buf1880[200]; +char buf1881[200]; +char buf1882[200]; +char buf1883[200]; +char buf1884[200]; +char buf1885[200]; +char buf1886[200]; +char buf1887[200]; +char buf1888[200]; +char buf1889[200]; +char buf1890[200]; +char buf1891[200]; +char buf1892[200]; +char buf1893[200]; +char buf1894[200]; +char buf1895[200]; +char buf1896[200]; +char buf1897[200]; +char buf1898[200]; +char buf1899[200]; +char buf1900[200]; +char buf1901[200]; +char buf1902[200]; +char buf1903[200]; +char buf1904[200]; +char buf1905[200]; +char buf1906[200]; +char buf1907[200]; +char buf1908[200]; +char buf1909[200]; +char buf1910[200]; +char buf1911[200]; +char buf1912[200]; +char buf1913[200]; +char buf1914[200]; +char buf1915[200]; +char buf1916[200]; +char buf1917[200]; +char buf1918[200]; +char buf1919[200]; +char buf1920[200]; +char buf1921[200]; +char buf1922[200]; +char buf1923[200]; +char buf1924[200]; +char buf1925[200]; +char buf1926[200]; +char buf1927[200]; +char buf1928[200]; +char buf1929[200]; +char buf1930[200]; +char buf1931[200]; +char buf1932[200]; +char buf1933[200]; +char buf1934[200]; +char buf1935[200]; +char buf1936[200]; +char buf1937[200]; +char buf1938[200]; +char buf1939[200]; +char buf1940[200]; +char buf1941[200]; +char buf1942[200]; +char buf1943[200]; +char buf1944[200]; +char buf1945[200]; +char buf1946[200]; +char buf1947[200]; +char buf1948[200]; +char buf1949[200]; +char buf1950[200]; +char buf1951[200]; +char buf1952[200]; +char buf1953[200]; +char buf1954[200]; +char buf1955[200]; +char buf1956[200]; +char buf1957[200]; +char buf1958[200]; +char buf1959[200]; +char buf1960[200]; +char buf1961[200]; +char buf1962[200]; +char buf1963[200]; +char buf1964[200]; +char buf1965[200]; +char buf1966[200]; +char buf1967[200]; +char buf1968[200]; +char buf1969[200]; +char buf1970[200]; +char buf1971[200]; +char buf1972[200]; +char buf1973[200]; +char buf1974[200]; +char buf1975[200]; +char buf1976[200]; +char buf1977[200]; +char buf1978[200]; +char buf1979[200]; +char buf1980[200]; +char buf1981[200]; +char buf1982[200]; +char buf1983[200]; +char buf1984[200]; +char buf1985[200]; +char buf1986[200]; +char buf1987[200]; +char buf1988[200]; +char buf1989[200]; +char buf1990[200]; +char buf1991[200]; +char buf1992[200]; +char buf1993[200]; +char buf1994[200]; +char buf1995[200]; +char buf1996[200]; +char buf1997[200]; +char buf1998[200]; +char buf1999[200]; +char buf2000[200]; +char buf2001[200]; +char buf2002[200]; +char buf2003[200]; +char buf2004[200]; +char buf2005[200]; +char buf2006[200]; +char buf2007[200]; +char buf2008[200]; +char buf2009[200]; +char buf2010[200]; +char buf2011[200]; +char buf2012[200]; +char buf2013[200]; +char buf2014[200]; +char buf2015[200]; +char buf2016[200]; +char buf2017[200]; +char buf2018[200]; +char buf2019[200]; +char buf2020[200]; +char buf2021[200]; +char buf2022[200]; +char buf2023[200]; +char buf2024[200]; +char buf2025[200]; +char buf2026[200]; +char buf2027[200]; +char buf2028[200]; +char buf2029[200]; +char buf2030[200]; +char buf2031[200]; +char buf2032[200]; +char buf2033[200]; +char buf2034[200]; +char buf2035[200]; +char buf2036[200]; +char buf2037[200]; +char buf2038[200]; +char buf2039[200]; +char buf2040[200]; +char buf2041[200]; +char buf2042[200]; +char buf2043[200]; +char buf2044[200]; +char buf2045[200]; +char buf2046[200]; +char buf2047[200]; +char buf2048[200]; +char buf2049[200]; +char buf2050[200]; +char buf2051[200]; +char buf2052[200]; +char buf2053[200]; +char buf2054[200]; +char buf2055[200]; +char buf2056[200]; +char buf2057[200]; +char buf2058[200]; +char buf2059[200]; +char buf2060[200]; +char buf2061[200]; +char buf2062[200]; +char buf2063[200]; +char buf2064[200]; +char buf2065[200]; +char buf2066[200]; +char buf2067[200]; +char buf2068[200]; +char buf2069[200]; +char buf2070[200]; +char buf2071[200]; +char buf2072[200]; +char buf2073[200]; +char buf2074[200]; +char buf2075[200]; +char buf2076[200]; +char buf2077[200]; +char buf2078[200]; +char buf2079[200]; +char buf2080[200]; +char buf2081[200]; +char buf2082[200]; +char buf2083[200]; +char buf2084[200]; +char buf2085[200]; +char buf2086[200]; +char buf2087[200]; +char buf2088[200]; +char buf2089[200]; +char buf2090[200]; +char buf2091[200]; +char buf2092[200]; +char buf2093[200]; +char buf2094[200]; +char buf2095[200]; +char buf2096[200]; +char buf2097[200]; +char buf2098[200]; +char buf2099[200]; +char buf2100[200]; +char buf2101[200]; +char buf2102[200]; +char buf2103[200]; +char buf2104[200]; +char buf2105[200]; +char buf2106[200]; +char buf2107[200]; +char buf2108[200]; +char buf2109[200]; +char buf2110[200]; +char buf2111[200]; +char buf2112[200]; +char buf2113[200]; +char buf2114[200]; +char buf2115[200]; +char buf2116[200]; +char buf2117[200]; +char buf2118[200]; +char buf2119[200]; +char buf2120[200]; +char buf2121[200]; +char buf2122[200]; +char buf2123[200]; +char buf2124[200]; +char buf2125[200]; +char buf2126[200]; +char buf2127[200]; +char buf2128[200]; +char buf2129[200]; +char buf2130[200]; +char buf2131[200]; +char buf2132[200]; +char buf2133[200]; +char buf2134[200]; +char buf2135[200]; +char buf2136[200]; +char buf2137[200]; +char buf2138[200]; +char buf2139[200]; +char buf2140[200]; +char buf2141[200]; +char buf2142[200]; +char buf2143[200]; +char buf2144[200]; +char buf2145[200]; +char buf2146[200]; +char buf2147[200]; +char buf2148[200]; +char buf2149[200]; +char buf2150[200]; +char buf2151[200]; +char buf2152[200]; +char buf2153[200]; +char buf2154[200]; +char buf2155[200]; +char buf2156[200]; +char buf2157[200]; +char buf2158[200]; +char buf2159[200]; +char buf2160[200]; +char buf2161[200]; +char buf2162[200]; +char buf2163[200]; +char buf2164[200]; +char buf2165[200]; +char buf2166[200]; +char buf2167[200]; +char buf2168[200]; +char buf2169[200]; +char buf2170[200]; +char buf2171[200]; +char buf2172[200]; +char buf2173[200]; +char buf2174[200]; +char buf2175[200]; +char buf2176[200]; +char buf2177[200]; +char buf2178[200]; +char buf2179[200]; +char buf2180[200]; +char buf2181[200]; +char buf2182[200]; +char buf2183[200]; +char buf2184[200]; +char buf2185[200]; +char buf2186[200]; +char buf2187[200]; +char buf2188[200]; +char buf2189[200]; +char buf2190[200]; +char buf2191[200]; +char buf2192[200]; +char buf2193[200]; +char buf2194[200]; +char buf2195[200]; +char buf2196[200]; +char buf2197[200]; +char buf2198[200]; +char buf2199[200]; +char buf2200[200]; +char buf2201[200]; +char buf2202[200]; +char buf2203[200]; +char buf2204[200]; +char buf2205[200]; +char buf2206[200]; +char buf2207[200]; +char buf2208[200]; +char buf2209[200]; +char buf2210[200]; +char buf2211[200]; +char buf2212[200]; +char buf2213[200]; +char buf2214[200]; +char buf2215[200]; +char buf2216[200]; +char buf2217[200]; +char buf2218[200]; +char buf2219[200]; +char buf2220[200]; +char buf2221[200]; +char buf2222[200]; +char buf2223[200]; +char buf2224[200]; +char buf2225[200]; +char buf2226[200]; +char buf2227[200]; +char buf2228[200]; +char buf2229[200]; +char buf2230[200]; +char buf2231[200]; +char buf2232[200]; +char buf2233[200]; +char buf2234[200]; +char buf2235[200]; +char buf2236[200]; +char buf2237[200]; +char buf2238[200]; +char buf2239[200]; +char buf2240[200]; +char buf2241[200]; +char buf2242[200]; +char buf2243[200]; +char buf2244[200]; +char buf2245[200]; +char buf2246[200]; +char buf2247[200]; +char buf2248[200]; +char buf2249[200]; +char buf2250[200]; +char buf2251[200]; +char buf2252[200]; +char buf2253[200]; +char buf2254[200]; +char buf2255[200]; +char buf2256[200]; +char buf2257[200]; +char buf2258[200]; +char buf2259[200]; +char buf2260[200]; +char buf2261[200]; +char buf2262[200]; +char buf2263[200]; +char buf2264[200]; +char buf2265[200]; +char buf2266[200]; +char buf2267[200]; +char buf2268[200]; +char buf2269[200]; +char buf2270[200]; +char buf2271[200]; +char buf2272[200]; +char buf2273[200]; +char buf2274[200]; +char buf2275[200]; +char buf2276[200]; +char buf2277[200]; +char buf2278[200]; +char buf2279[200]; +char buf2280[200]; +char buf2281[200]; +char buf2282[200]; +char buf2283[200]; +char buf2284[200]; +char buf2285[200]; +char buf2286[200]; +char buf2287[200]; +char buf2288[200]; +char buf2289[200]; +char buf2290[200]; +char buf2291[200]; +char buf2292[200]; +char buf2293[200]; +char buf2294[200]; +char buf2295[200]; +char buf2296[200]; +char buf2297[200]; +char buf2298[200]; +char buf2299[200]; +char buf2300[200]; +char buf2301[200]; +char buf2302[200]; +char buf2303[200]; +char buf2304[200]; +char buf2305[200]; +char buf2306[200]; +char buf2307[200]; +char buf2308[200]; +char buf2309[200]; +char buf2310[200]; +char buf2311[200]; +char buf2312[200]; +char buf2313[200]; +char buf2314[200]; +char buf2315[200]; +char buf2316[200]; +char buf2317[200]; +char buf2318[200]; +char buf2319[200]; +char buf2320[200]; +char buf2321[200]; +char buf2322[200]; +char buf2323[200]; +char buf2324[200]; +char buf2325[200]; +char buf2326[200]; +char buf2327[200]; +char buf2328[200]; +char buf2329[200]; +char buf2330[200]; +char buf2331[200]; +char buf2332[200]; +char buf2333[200]; +char buf2334[200]; +char buf2335[200]; +char buf2336[200]; +char buf2337[200]; +char buf2338[200]; +char buf2339[200]; +char buf2340[200]; +char buf2341[200]; +char buf2342[200]; +char buf2343[200]; +char buf2344[200]; +char buf2345[200]; +char buf2346[200]; +char buf2347[200]; +char buf2348[200]; +char buf2349[200]; +char buf2350[200]; +char buf2351[200]; +char buf2352[200]; +char buf2353[200]; +char buf2354[200]; +char buf2355[200]; +char buf2356[200]; +char buf2357[200]; +char buf2358[200]; +char buf2359[200]; +char buf2360[200]; +char buf2361[200]; +char buf2362[200]; +char buf2363[200]; +char buf2364[200]; +char buf2365[200]; +char buf2366[200]; +char buf2367[200]; +char buf2368[200]; +char buf2369[200]; +char buf2370[200]; +char buf2371[200]; +char buf2372[200]; +char buf2373[200]; +char buf2374[200]; +char buf2375[200]; +char buf2376[200]; +char buf2377[200]; +char buf2378[200]; +char buf2379[200]; +char buf2380[200]; +char buf2381[200]; +char buf2382[200]; +char buf2383[200]; +char buf2384[200]; +char buf2385[200]; +char buf2386[200]; +char buf2387[200]; +char buf2388[200]; +char buf2389[200]; +char buf2390[200]; +char buf2391[200]; +char buf2392[200]; +char buf2393[200]; +char buf2394[200]; +char buf2395[200]; +char buf2396[200]; +char buf2397[200]; +char buf2398[200]; +char buf2399[200]; +char buf2400[200]; +char buf2401[200]; +char buf2402[200]; +char buf2403[200]; +char buf2404[200]; +char buf2405[200]; +char buf2406[200]; +char buf2407[200]; +char buf2408[200]; +char buf2409[200]; +char buf2410[200]; +char buf2411[200]; +char buf2412[200]; +char buf2413[200]; +char buf2414[200]; +char buf2415[200]; +char buf2416[200]; +char buf2417[200]; +char buf2418[200]; +char buf2419[200]; +char buf2420[200]; +char buf2421[200]; +char buf2422[200]; +char buf2423[200]; +char buf2424[200]; +char buf2425[200]; +char buf2426[200]; +char buf2427[200]; +char buf2428[200]; +char buf2429[200]; +char buf2430[200]; +char buf2431[200]; +char buf2432[200]; +char buf2433[200]; +char buf2434[200]; +char buf2435[200]; +char buf2436[200]; +char buf2437[200]; +char buf2438[200]; +char buf2439[200]; +char buf2440[200]; +char buf2441[200]; +char buf2442[200]; +char buf2443[200]; +char buf2444[200]; +char buf2445[200]; +char buf2446[200]; +char buf2447[200]; +char buf2448[200]; +char buf2449[200]; +char buf2450[200]; +char buf2451[200]; +char buf2452[200]; +char buf2453[200]; +char buf2454[200]; +char buf2455[200]; +char buf2456[200]; +char buf2457[200]; +char buf2458[200]; +char buf2459[200]; +char buf2460[200]; +char buf2461[200]; +char buf2462[200]; +char buf2463[200]; +char buf2464[200]; +char buf2465[200]; +char buf2466[200]; +char buf2467[200]; +char buf2468[200]; +char buf2469[200]; +char buf2470[200]; +char buf2471[200]; +char buf2472[200]; +char buf2473[200]; +char buf2474[200]; +char buf2475[200]; +char buf2476[200]; +char buf2477[200]; +char buf2478[200]; +char buf2479[200]; +char buf2480[200]; +char buf2481[200]; +char buf2482[200]; +char buf2483[200]; +char buf2484[200]; +char buf2485[200]; +char buf2486[200]; +char buf2487[200]; +char buf2488[200]; +char buf2489[200]; +char buf2490[200]; +char buf2491[200]; +char buf2492[200]; +char buf2493[200]; +char buf2494[200]; +char buf2495[200]; +char buf2496[200]; +char buf2497[200]; +char buf2498[200]; +char buf2499[200]; +char buf2500[200]; +char buf2501[200]; +char buf2502[200]; +char buf2503[200]; +char buf2504[200]; +char buf2505[200]; +char buf2506[200]; +char buf2507[200]; +char buf2508[200]; +char buf2509[200]; +char buf2510[200]; +char buf2511[200]; +char buf2512[200]; +char buf2513[200]; +char buf2514[200]; +char buf2515[200]; +char buf2516[200]; +char buf2517[200]; +char buf2518[200]; +char buf2519[200]; +char buf2520[200]; +char buf2521[200]; +char buf2522[200]; +char buf2523[200]; +char buf2524[200]; +char buf2525[200]; +char buf2526[200]; +char buf2527[200]; +char buf2528[200]; +char buf2529[200]; +char buf2530[200]; +char buf2531[200]; +char buf2532[200]; +char buf2533[200]; +char buf2534[200]; +char buf2535[200]; +char buf2536[200]; +char buf2537[200]; +char buf2538[200]; +char buf2539[200]; +char buf2540[200]; +char buf2541[200]; +char buf2542[200]; +char buf2543[200]; +char buf2544[200]; +char buf2545[200]; +char buf2546[200]; +char buf2547[200]; +char buf2548[200]; +char buf2549[200]; +char buf2550[200]; +char buf2551[200]; +char buf2552[200]; +char buf2553[200]; +char buf2554[200]; +char buf2555[200]; +char buf2556[200]; +char buf2557[200]; +char buf2558[200]; +char buf2559[200]; +char buf2560[200]; +char buf2561[200]; +char buf2562[200]; +char buf2563[200]; +char buf2564[200]; +char buf2565[200]; +char buf2566[200]; +char buf2567[200]; +char buf2568[200]; +char buf2569[200]; +char buf2570[200]; +char buf2571[200]; +char buf2572[200]; +char buf2573[200]; +char buf2574[200]; +char buf2575[200]; +char buf2576[200]; +char buf2577[200]; +char buf2578[200]; +char buf2579[200]; +char buf2580[200]; +char buf2581[200]; +char buf2582[200]; +char buf2583[200]; +char buf2584[200]; +char buf2585[200]; +char buf2586[200]; +char buf2587[200]; +char buf2588[200]; +char buf2589[200]; +char buf2590[200]; +char buf2591[200]; +char buf2592[200]; +char buf2593[200]; +char buf2594[200]; +char buf2595[200]; +char buf2596[200]; +char buf2597[200]; +char buf2598[200]; +char buf2599[200]; +char buf2600[200]; +char buf2601[200]; +char buf2602[200]; +char buf2603[200]; +char buf2604[200]; +char buf2605[200]; +char buf2606[200]; +char buf2607[200]; +char buf2608[200]; +char buf2609[200]; +char buf2610[200]; +char buf2611[200]; +char buf2612[200]; +char buf2613[200]; +char buf2614[200]; +char buf2615[200]; +char buf2616[200]; +char buf2617[200]; +char buf2618[200]; +char buf2619[200]; +char buf2620[200]; +char buf2621[200]; +char buf2622[200]; +char buf2623[200]; +char buf2624[200]; +char buf2625[200]; +char buf2626[200]; +char buf2627[200]; +char buf2628[200]; +char buf2629[200]; +char buf2630[200]; +char buf2631[200]; +char buf2632[200]; +char buf2633[200]; +char buf2634[200]; +char buf2635[200]; +char buf2636[200]; +char buf2637[200]; +char buf2638[200]; +char buf2639[200]; +char buf2640[200]; +char buf2641[200]; +char buf2642[200]; +char buf2643[200]; +char buf2644[200]; +char buf2645[200]; +char buf2646[200]; +char buf2647[200]; +char buf2648[200]; +char buf2649[200]; +char buf2650[200]; +char buf2651[200]; +char buf2652[200]; +char buf2653[200]; +char buf2654[200]; +char buf2655[200]; +char buf2656[200]; +char buf2657[200]; +char buf2658[200]; +char buf2659[200]; +char buf2660[200]; +char buf2661[200]; +char buf2662[200]; +char buf2663[200]; +char buf2664[200]; +char buf2665[200]; +char buf2666[200]; +char buf2667[200]; +char buf2668[200]; +char buf2669[200]; +char buf2670[200]; +char buf2671[200]; +char buf2672[200]; +char buf2673[200]; +char buf2674[200]; +char buf2675[200]; +char buf2676[200]; +char buf2677[200]; +char buf2678[200]; +char buf2679[200]; +char buf2680[200]; +char buf2681[200]; +char buf2682[200]; +char buf2683[200]; +char buf2684[200]; +char buf2685[200]; +char buf2686[200]; +char buf2687[200]; +char buf2688[200]; +char buf2689[200]; +char buf2690[200]; +char buf2691[200]; +char buf2692[200]; +char buf2693[200]; +char buf2694[200]; +char buf2695[200]; +char buf2696[200]; +char buf2697[200]; +char buf2698[200]; +char buf2699[200]; +char buf2700[200]; +char buf2701[200]; +char buf2702[200]; +char buf2703[200]; +char buf2704[200]; +char buf2705[200]; +char buf2706[200]; +char buf2707[200]; +char buf2708[200]; +char buf2709[200]; +char buf2710[200]; +char buf2711[200]; +char buf2712[200]; +char buf2713[200]; +char buf2714[200]; +char buf2715[200]; +char buf2716[200]; +char buf2717[200]; +char buf2718[200]; +char buf2719[200]; +char buf2720[200]; +char buf2721[200]; +char buf2722[200]; +char buf2723[200]; +char buf2724[200]; +char buf2725[200]; +char buf2726[200]; +char buf2727[200]; +char buf2728[200]; +char buf2729[200]; +char buf2730[200]; +char buf2731[200]; +char buf2732[200]; +char buf2733[200]; +char buf2734[200]; +char buf2735[200]; +char buf2736[200]; +char buf2737[200]; +char buf2738[200]; +char buf2739[200]; +char buf2740[200]; +char buf2741[200]; +char buf2742[200]; +char buf2743[200]; +char buf2744[200]; +char buf2745[200]; +char buf2746[200]; +char buf2747[200]; +char buf2748[200]; +char buf2749[200]; +char buf2750[200]; +char buf2751[200]; +char buf2752[200]; +char buf2753[200]; +char buf2754[200]; +char buf2755[200]; +char buf2756[200]; +char buf2757[200]; +char buf2758[200]; +char buf2759[200]; +char buf2760[200]; +char buf2761[200]; +char buf2762[200]; +char buf2763[200]; +char buf2764[200]; +char buf2765[200]; +char buf2766[200]; +char buf2767[200]; +char buf2768[200]; +char buf2769[200]; +char buf2770[200]; +char buf2771[200]; +char buf2772[200]; +char buf2773[200]; +char buf2774[200]; +char buf2775[200]; +char buf2776[200]; +char buf2777[200]; +char buf2778[200]; +char buf2779[200]; +char buf2780[200]; +char buf2781[200]; +char buf2782[200]; +char buf2783[200]; +char buf2784[200]; +char buf2785[200]; +char buf2786[200]; +char buf2787[200]; +char buf2788[200]; +char buf2789[200]; +char buf2790[200]; +char buf2791[200]; +char buf2792[200]; +char buf2793[200]; +char buf2794[200]; +char buf2795[200]; +char buf2796[200]; +char buf2797[200]; +char buf2798[200]; +char buf2799[200]; +char buf2800[200]; +char buf2801[200]; +char buf2802[200]; +char buf2803[200]; +char buf2804[200]; +char buf2805[200]; +char buf2806[200]; +char buf2807[200]; +char buf2808[200]; +char buf2809[200]; +char buf2810[200]; +char buf2811[200]; +char buf2812[200]; +char buf2813[200]; +char buf2814[200]; +char buf2815[200]; +char buf2816[200]; +char buf2817[200]; +char buf2818[200]; +char buf2819[200]; +char buf2820[200]; +char buf2821[200]; +char buf2822[200]; +char buf2823[200]; +char buf2824[200]; +char buf2825[200]; +char buf2826[200]; +char buf2827[200]; +char buf2828[200]; +char buf2829[200]; +char buf2830[200]; +char buf2831[200]; +char buf2832[200]; +char buf2833[200]; +char buf2834[200]; +char buf2835[200]; +char buf2836[200]; +char buf2837[200]; +char buf2838[200]; +char buf2839[200]; +char buf2840[200]; +char buf2841[200]; +char buf2842[200]; +char buf2843[200]; +char buf2844[200]; +char buf2845[200]; +char buf2846[200]; +char buf2847[200]; +char buf2848[200]; +char buf2849[200]; +char buf2850[200]; +char buf2851[200]; +char buf2852[200]; +char buf2853[200]; +char buf2854[200]; +char buf2855[200]; +char buf2856[200]; +char buf2857[200]; +char buf2858[200]; +char buf2859[200]; +char buf2860[200]; +char buf2861[200]; +char buf2862[200]; +char buf2863[200]; +char buf2864[200]; +char buf2865[200]; +char buf2866[200]; +char buf2867[200]; +char buf2868[200]; +char buf2869[200]; +char buf2870[200]; +char buf2871[200]; +char buf2872[200]; +char buf2873[200]; +char buf2874[200]; +char buf2875[200]; +char buf2876[200]; +char buf2877[200]; +char buf2878[200]; +char buf2879[200]; +char buf2880[200]; +char buf2881[200]; +char buf2882[200]; +char buf2883[200]; +char buf2884[200]; +char buf2885[200]; +char buf2886[200]; +char buf2887[200]; +char buf2888[200]; +char buf2889[200]; +char buf2890[200]; +char buf2891[200]; +char buf2892[200]; +char buf2893[200]; +char buf2894[200]; +char buf2895[200]; +char buf2896[200]; +char buf2897[200]; +char buf2898[200]; +char buf2899[200]; +char buf2900[200]; +char buf2901[200]; +char buf2902[200]; +char buf2903[200]; +char buf2904[200]; +char buf2905[200]; +char buf2906[200]; +char buf2907[200]; +char buf2908[200]; +char buf2909[200]; +char buf2910[200]; +char buf2911[200]; +char buf2912[200]; +char buf2913[200]; +char buf2914[200]; +char buf2915[200]; +char buf2916[200]; +char buf2917[200]; +char buf2918[200]; +char buf2919[200]; +char buf2920[200]; +char buf2921[200]; +char buf2922[200]; +char buf2923[200]; +char buf2924[200]; +char buf2925[200]; +char buf2926[200]; +char buf2927[200]; +char buf2928[200]; +char buf2929[200]; +char buf2930[200]; +char buf2931[200]; +char buf2932[200]; +char buf2933[200]; +char buf2934[200]; +char buf2935[200]; +char buf2936[200]; +char buf2937[200]; +char buf2938[200]; +char buf2939[200]; +char buf2940[200]; +char buf2941[200]; +char buf2942[200]; +char buf2943[200]; +char buf2944[200]; +char buf2945[200]; +char buf2946[200]; +char buf2947[200]; +char buf2948[200]; +char buf2949[200]; +char buf2950[200]; +char buf2951[200]; +char buf2952[200]; +char buf2953[200]; +char buf2954[200]; +char buf2955[200]; +char buf2956[200]; +char buf2957[200]; +char buf2958[200]; +char buf2959[200]; +char buf2960[200]; +char buf2961[200]; +char buf2962[200]; +char buf2963[200]; +char buf2964[200]; +char buf2965[200]; +char buf2966[200]; +char buf2967[200]; +char buf2968[200]; +char buf2969[200]; +char buf2970[200]; +char buf2971[200]; +char buf2972[200]; +char buf2973[200]; +char buf2974[200]; +char buf2975[200]; +char buf2976[200]; +char buf2977[200]; +char buf2978[200]; +char buf2979[200]; +char buf2980[200]; +char buf2981[200]; +char buf2982[200]; +char buf2983[200]; +char buf2984[200]; +char buf2985[200]; +char buf2986[200]; +char buf2987[200]; +char buf2988[200]; +char buf2989[200]; +char buf2990[200]; +char buf2991[200]; +char buf2992[200]; +char buf2993[200]; +char buf2994[200]; +char buf2995[200]; +char buf2996[200]; +char buf2997[200]; +char buf2998[200]; +char buf2999[200]; +char buf3000[200]; +char buf3001[200]; +char buf3002[200]; +char buf3003[200]; +char buf3004[200]; +char buf3005[200]; +char buf3006[200]; +char buf3007[200]; +char buf3008[200]; +char buf3009[200]; +char buf3010[200]; +char buf3011[200]; +char buf3012[200]; +char buf3013[200]; +char buf3014[200]; +char buf3015[200]; +char buf3016[200]; +char buf3017[200]; +char buf3018[200]; +char buf3019[200]; +char buf3020[200]; +char buf3021[200]; +char buf3022[200]; +char buf3023[200]; +char buf3024[200]; +char buf3025[200]; +char buf3026[200]; +char buf3027[200]; +char buf3028[200]; +char buf3029[200]; +char buf3030[200]; +char buf3031[200]; +char buf3032[200]; +char buf3033[200]; +char buf3034[200]; +char buf3035[200]; +char buf3036[200]; +char buf3037[200]; +char buf3038[200]; +char buf3039[200]; +char buf3040[200]; +char buf3041[200]; +char buf3042[200]; +char buf3043[200]; +char buf3044[200]; +char buf3045[200]; +char buf3046[200]; +char buf3047[200]; +char buf3048[200]; +char buf3049[200]; +char buf3050[200]; +char buf3051[200]; +char buf3052[200]; +char buf3053[200]; +char buf3054[200]; +char buf3055[200]; +char buf3056[200]; +char buf3057[200]; +char buf3058[200]; +char buf3059[200]; +char buf3060[200]; +char buf3061[200]; +char buf3062[200]; +char buf3063[200]; +char buf3064[200]; +char buf3065[200]; +char buf3066[200]; +char buf3067[200]; +char buf3068[200]; +char buf3069[200]; +char buf3070[200]; +char buf3071[200]; +char buf3072[200]; +char buf3073[200]; +char buf3074[200]; +char buf3075[200]; +char buf3076[200]; +char buf3077[200]; +char buf3078[200]; +char buf3079[200]; +char buf3080[200]; +char buf3081[200]; +char buf3082[200]; +char buf3083[200]; +char buf3084[200]; +char buf3085[200]; +char buf3086[200]; +char buf3087[200]; +char buf3088[200]; +char buf3089[200]; +char buf3090[200]; +char buf3091[200]; +char buf3092[200]; +char buf3093[200]; +char buf3094[200]; +char buf3095[200]; +char buf3096[200]; +char buf3097[200]; +char buf3098[200]; +char buf3099[200]; +char buf3100[200]; +char buf3101[200]; +char buf3102[200]; +char buf3103[200]; +char buf3104[200]; +char buf3105[200]; +char buf3106[200]; +char buf3107[200]; +char buf3108[200]; +char buf3109[200]; +char buf3110[200]; +char buf3111[200]; +char buf3112[200]; +char buf3113[200]; +char buf3114[200]; +char buf3115[200]; +char buf3116[200]; +char buf3117[200]; +char buf3118[200]; +char buf3119[200]; +char buf3120[200]; +char buf3121[200]; +char buf3122[200]; +char buf3123[200]; +char buf3124[200]; +char buf3125[200]; +char buf3126[200]; +char buf3127[200]; +char buf3128[200]; +char buf3129[200]; +char buf3130[200]; +char buf3131[200]; +char buf3132[200]; +char buf3133[200]; +char buf3134[200]; +char buf3135[200]; +char buf3136[200]; +char buf3137[200]; +char buf3138[200]; +char buf3139[200]; +char buf3140[200]; +char buf3141[200]; +char buf3142[200]; +char buf3143[200]; +char buf3144[200]; +char buf3145[200]; +char buf3146[200]; +char buf3147[200]; +char buf3148[200]; +char buf3149[200]; +char buf3150[200]; +char buf3151[200]; +char buf3152[200]; +char buf3153[200]; +char buf3154[200]; +char buf3155[200]; +char buf3156[200]; +char buf3157[200]; +char buf3158[200]; +char buf3159[200]; +char buf3160[200]; +char buf3161[200]; +char buf3162[200]; +char buf3163[200]; +char buf3164[200]; +char buf3165[200]; +char buf3166[200]; +char buf3167[200]; +char buf3168[200]; +char buf3169[200]; +char buf3170[200]; +char buf3171[200]; +char buf3172[200]; +char buf3173[200]; +char buf3174[200]; +char buf3175[200]; +char buf3176[200]; +char buf3177[200]; +char buf3178[200]; +char buf3179[200]; +char buf3180[200]; +char buf3181[200]; +char buf3182[200]; +char buf3183[200]; +char buf3184[200]; +char buf3185[200]; +char buf3186[200]; +char buf3187[200]; +char buf3188[200]; +char buf3189[200]; +char buf3190[200]; +char buf3191[200]; +char buf3192[200]; +char buf3193[200]; +char buf3194[200]; +char buf3195[200]; +char buf3196[200]; +char buf3197[200]; +char buf3198[200]; +char buf3199[200]; +char buf3200[200]; +char buf3201[200]; +char buf3202[200]; +char buf3203[200]; +char buf3204[200]; +char buf3205[200]; +char buf3206[200]; +char buf3207[200]; +char buf3208[200]; +char buf3209[200]; +char buf3210[200]; +char buf3211[200]; +char buf3212[200]; +char buf3213[200]; +char buf3214[200]; +char buf3215[200]; +char buf3216[200]; +char buf3217[200]; +char buf3218[200]; +char buf3219[200]; +char buf3220[200]; +char buf3221[200]; +char buf3222[200]; +char buf3223[200]; +char buf3224[200]; +char buf3225[200]; +char buf3226[200]; +char buf3227[200]; +char buf3228[200]; +char buf3229[200]; +char buf3230[200]; +char buf3231[200]; +char buf3232[200]; +char buf3233[200]; +char buf3234[200]; +char buf3235[200]; +char buf3236[200]; +char buf3237[200]; +char buf3238[200]; +char buf3239[200]; +char buf3240[200]; +char buf3241[200]; +char buf3242[200]; +char buf3243[200]; +char buf3244[200]; +char buf3245[200]; +char buf3246[200]; +char buf3247[200]; +char buf3248[200]; +char buf3249[200]; +char buf3250[200]; +char buf3251[200]; +char buf3252[200]; +char buf3253[200]; +char buf3254[200]; +char buf3255[200]; +char buf3256[200]; +char buf3257[200]; +char buf3258[200]; +char buf3259[200]; +char buf3260[200]; +char buf3261[200]; +char buf3262[200]; +char buf3263[200]; +char buf3264[200]; +char buf3265[200]; +char buf3266[200]; +char buf3267[200]; +char buf3268[200]; +char buf3269[200]; +char buf3270[200]; +char buf3271[200]; +char buf3272[200]; +char buf3273[200]; +char buf3274[200]; +char buf3275[200]; +char buf3276[200]; +char buf3277[200]; +char buf3278[200]; +char buf3279[200]; +char buf3280[200]; +char buf3281[200]; +char buf3282[200]; +char buf3283[200]; +char buf3284[200]; +char buf3285[200]; +char buf3286[200]; +char buf3287[200]; +char buf3288[200]; +char buf3289[200]; +char buf3290[200]; +char buf3291[200]; +char buf3292[200]; +char buf3293[200]; +char buf3294[200]; +char buf3295[200]; +char buf3296[200]; +char buf3297[200]; +char buf3298[200]; +char buf3299[200]; +char buf3300[200]; +char buf3301[200]; +char buf3302[200]; +char buf3303[200]; +char buf3304[200]; +char buf3305[200]; +char buf3306[200]; +char buf3307[200]; +char buf3308[200]; +char buf3309[200]; +char buf3310[200]; +char buf3311[200]; +char buf3312[200]; +char buf3313[200]; +char buf3314[200]; +char buf3315[200]; +char buf3316[200]; +char buf3317[200]; +char buf3318[200]; +char buf3319[200]; +char buf3320[200]; +char buf3321[200]; +char buf3322[200]; +char buf3323[200]; +char buf3324[200]; +char buf3325[200]; +char buf3326[200]; +char buf3327[200]; +char buf3328[200]; +char buf3329[200]; +char buf3330[200]; +char buf3331[200]; +char buf3332[200]; +char buf3333[200]; +char buf3334[200]; +char buf3335[200]; +char buf3336[200]; +char buf3337[200]; +char buf3338[200]; +char buf3339[200]; +char buf3340[200]; +char buf3341[200]; +char buf3342[200]; +char buf3343[200]; +char buf3344[200]; +char buf3345[200]; +char buf3346[200]; +char buf3347[200]; +char buf3348[200]; +char buf3349[200]; +char buf3350[200]; +char buf3351[200]; +char buf3352[200]; +char buf3353[200]; +char buf3354[200]; +char buf3355[200]; +char buf3356[200]; +char buf3357[200]; +char buf3358[200]; +char buf3359[200]; +char buf3360[200]; +char buf3361[200]; +char buf3362[200]; +char buf3363[200]; +char buf3364[200]; +char buf3365[200]; +char buf3366[200]; +char buf3367[200]; +char buf3368[200]; +char buf3369[200]; +char buf3370[200]; +char buf3371[200]; +char buf3372[200]; +char buf3373[200]; +char buf3374[200]; +char buf3375[200]; +char buf3376[200]; +char buf3377[200]; +char buf3378[200]; +char buf3379[200]; +char buf3380[200]; +char buf3381[200]; +char buf3382[200]; +char buf3383[200]; +char buf3384[200]; +char buf3385[200]; +char buf3386[200]; +char buf3387[200]; +char buf3388[200]; +char buf3389[200]; +char buf3390[200]; +char buf3391[200]; +char buf3392[200]; +char buf3393[200]; +char buf3394[200]; +char buf3395[200]; +char buf3396[200]; +char buf3397[200]; +char buf3398[200]; +char buf3399[200]; +char buf3400[200]; +char buf3401[200]; +char buf3402[200]; +char buf3403[200]; +char buf3404[200]; +char buf3405[200]; +char buf3406[200]; +char buf3407[200]; +char buf3408[200]; +char buf3409[200]; +char buf3410[200]; +char buf3411[200]; +char buf3412[200]; +char buf3413[200]; +char buf3414[200]; +char buf3415[200]; +char buf3416[200]; +char buf3417[200]; +char buf3418[200]; +char buf3419[200]; +char buf3420[200]; +char buf3421[200]; +char buf3422[200]; +char buf3423[200]; +char buf3424[200]; +char buf3425[200]; +char buf3426[200]; +char buf3427[200]; +char buf3428[200]; +char buf3429[200]; +char buf3430[200]; +char buf3431[200]; +char buf3432[200]; +char buf3433[200]; +char buf3434[200]; +char buf3435[200]; +char buf3436[200]; +char buf3437[200]; +char buf3438[200]; +char buf3439[200]; +char buf3440[200]; +char buf3441[200]; +char buf3442[200]; +char buf3443[200]; +char buf3444[200]; +char buf3445[200]; +char buf3446[200]; +char buf3447[200]; +char buf3448[200]; +char buf3449[200]; +char buf3450[200]; +char buf3451[200]; +char buf3452[200]; +char buf3453[200]; +char buf3454[200]; +char buf3455[200]; +char buf3456[200]; +char buf3457[200]; +char buf3458[200]; +char buf3459[200]; +char buf3460[200]; +char buf3461[200]; +char buf3462[200]; +char buf3463[200]; +char buf3464[200]; +char buf3465[200]; +char buf3466[200]; +char buf3467[200]; +char buf3468[200]; +char buf3469[200]; +char buf3470[200]; +char buf3471[200]; +char buf3472[200]; +char buf3473[200]; +char buf3474[200]; +char buf3475[200]; +char buf3476[200]; +char buf3477[200]; +char buf3478[200]; +char buf3479[200]; +char buf3480[200]; +char buf3481[200]; +char buf3482[200]; +char buf3483[200]; +char buf3484[200]; +char buf3485[200]; +char buf3486[200]; +char buf3487[200]; +char buf3488[200]; +char buf3489[200]; +char buf3490[200]; +char buf3491[200]; +char buf3492[200]; +char buf3493[200]; +char buf3494[200]; +char buf3495[200]; +char buf3496[200]; +char buf3497[200]; +char buf3498[200]; +char buf3499[200]; +char buf3500[200]; +char buf3501[200]; +char buf3502[200]; +char buf3503[200]; +char buf3504[200]; +char buf3505[200]; +char buf3506[200]; +char buf3507[200]; +char buf3508[200]; +char buf3509[200]; +char buf3510[200]; +char buf3511[200]; +char buf3512[200]; +char buf3513[200]; +char buf3514[200]; +char buf3515[200]; +char buf3516[200]; +char buf3517[200]; +char buf3518[200]; +char buf3519[200]; +char buf3520[200]; +char buf3521[200]; +char buf3522[200]; +char buf3523[200]; +char buf3524[200]; +char buf3525[200]; +char buf3526[200]; +char buf3527[200]; +char buf3528[200]; +char buf3529[200]; +char buf3530[200]; +char buf3531[200]; +char buf3532[200]; +char buf3533[200]; +char buf3534[200]; +char buf3535[200]; +char buf3536[200]; +char buf3537[200]; +char buf3538[200]; +char buf3539[200]; +char buf3540[200]; +char buf3541[200]; +char buf3542[200]; +char buf3543[200]; +char buf3544[200]; +char buf3545[200]; +char buf3546[200]; +char buf3547[200]; +char buf3548[200]; +char buf3549[200]; +char buf3550[200]; +char buf3551[200]; +char buf3552[200]; +char buf3553[200]; +char buf3554[200]; +char buf3555[200]; +char buf3556[200]; +char buf3557[200]; +char buf3558[200]; +char buf3559[200]; +char buf3560[200]; +char buf3561[200]; +char buf3562[200]; +char buf3563[200]; +char buf3564[200]; +char buf3565[200]; +char buf3566[200]; +char buf3567[200]; +char buf3568[200]; +char buf3569[200]; +char buf3570[200]; +char buf3571[200]; +char buf3572[200]; +char buf3573[200]; +char buf3574[200]; +char buf3575[200]; +char buf3576[200]; +char buf3577[200]; +char buf3578[200]; +char buf3579[200]; +char buf3580[200]; +char buf3581[200]; +char buf3582[200]; +char buf3583[200]; +char buf3584[200]; +char buf3585[200]; +char buf3586[200]; +char buf3587[200]; +char buf3588[200]; +char buf3589[200]; +char buf3590[200]; +char buf3591[200]; +char buf3592[200]; +char buf3593[200]; +char buf3594[200]; +char buf3595[200]; +char buf3596[200]; +char buf3597[200]; +char buf3598[200]; +char buf3599[200]; +char buf3600[200]; +char buf3601[200]; +char buf3602[200]; +char buf3603[200]; +char buf3604[200]; +char buf3605[200]; +char buf3606[200]; +char buf3607[200]; +char buf3608[200]; +char buf3609[200]; +char buf3610[200]; +char buf3611[200]; +char buf3612[200]; +char buf3613[200]; +char buf3614[200]; +char buf3615[200]; +char buf3616[200]; +char buf3617[200]; +char buf3618[200]; +char buf3619[200]; +char buf3620[200]; +char buf3621[200]; +char buf3622[200]; +char buf3623[200]; +char buf3624[200]; +char buf3625[200]; +char buf3626[200]; +char buf3627[200]; +char buf3628[200]; +char buf3629[200]; +char buf3630[200]; +char buf3631[200]; +char buf3632[200]; +char buf3633[200]; +char buf3634[200]; +char buf3635[200]; +char buf3636[200]; +char buf3637[200]; +char buf3638[200]; +char buf3639[200]; +char buf3640[200]; +char buf3641[200]; +char buf3642[200]; +char buf3643[200]; +char buf3644[200]; +char buf3645[200]; +char buf3646[200]; +char buf3647[200]; +char buf3648[200]; +char buf3649[200]; +char buf3650[200]; +char buf3651[200]; +char buf3652[200]; +char buf3653[200]; +char buf3654[200]; +char buf3655[200]; +char buf3656[200]; +char buf3657[200]; +char buf3658[200]; +char buf3659[200]; +char buf3660[200]; +char buf3661[200]; +char buf3662[200]; +char buf3663[200]; +char buf3664[200]; +char buf3665[200]; +char buf3666[200]; +char buf3667[200]; +char buf3668[200]; +char buf3669[200]; +char buf3670[200]; +char buf3671[200]; +char buf3672[200]; +char buf3673[200]; +char buf3674[200]; +char buf3675[200]; +char buf3676[200]; +char buf3677[200]; +char buf3678[200]; +char buf3679[200]; +char buf3680[200]; +char buf3681[200]; +char buf3682[200]; +char buf3683[200]; +char buf3684[200]; +char buf3685[200]; +char buf3686[200]; +char buf3687[200]; +char buf3688[200]; +char buf3689[200]; +char buf3690[200]; +char buf3691[200]; +char buf3692[200]; +char buf3693[200]; +char buf3694[200]; +char buf3695[200]; +char buf3696[200]; +char buf3697[200]; +char buf3698[200]; +char buf3699[200]; +char buf3700[200]; +char buf3701[200]; +char buf3702[200]; +char buf3703[200]; +char buf3704[200]; +char buf3705[200]; +char buf3706[200]; +char buf3707[200]; +char buf3708[200]; +char buf3709[200]; +char buf3710[200]; +char buf3711[200]; +char buf3712[200]; +char buf3713[200]; +char buf3714[200]; +char buf3715[200]; +char buf3716[200]; +char buf3717[200]; +char buf3718[200]; +char buf3719[200]; +char buf3720[200]; +char buf3721[200]; +char buf3722[200]; +char buf3723[200]; +char buf3724[200]; +char buf3725[200]; +char buf3726[200]; +char buf3727[200]; +char buf3728[200]; +char buf3729[200]; +char buf3730[200]; +char buf3731[200]; +char buf3732[200]; +char buf3733[200]; +char buf3734[200]; +char buf3735[200]; +char buf3736[200]; +char buf3737[200]; +char buf3738[200]; +char buf3739[200]; +char buf3740[200]; +char buf3741[200]; +char buf3742[200]; +char buf3743[200]; +char buf3744[200]; +char buf3745[200]; +char buf3746[200]; +char buf3747[200]; +char buf3748[200]; +char buf3749[200]; +char buf3750[200]; +char buf3751[200]; +char buf3752[200]; +char buf3753[200]; +char buf3754[200]; +char buf3755[200]; +char buf3756[200]; +char buf3757[200]; +char buf3758[200]; +char buf3759[200]; +char buf3760[200]; +char buf3761[200]; +char buf3762[200]; +char buf3763[200]; +char buf3764[200]; +char buf3765[200]; +char buf3766[200]; +char buf3767[200]; +char buf3768[200]; +char buf3769[200]; +char buf3770[200]; +char buf3771[200]; +char buf3772[200]; +char buf3773[200]; +char buf3774[200]; +char buf3775[200]; +char buf3776[200]; +char buf3777[200]; +char buf3778[200]; +char buf3779[200]; +char buf3780[200]; +char buf3781[200]; +char buf3782[200]; +char buf3783[200]; +char buf3784[200]; +char buf3785[200]; +char buf3786[200]; +char buf3787[200]; +char buf3788[200]; +char buf3789[200]; +char buf3790[200]; +char buf3791[200]; +char buf3792[200]; +char buf3793[200]; +char buf3794[200]; +char buf3795[200]; +char buf3796[200]; +char buf3797[200]; +char buf3798[200]; +char buf3799[200]; +char buf3800[200]; +char buf3801[200]; +char buf3802[200]; +char buf3803[200]; +char buf3804[200]; +char buf3805[200]; +char buf3806[200]; +char buf3807[200]; +char buf3808[200]; +char buf3809[200]; +char buf3810[200]; +char buf3811[200]; +char buf3812[200]; +char buf3813[200]; +char buf3814[200]; +char buf3815[200]; +char buf3816[200]; +char buf3817[200]; +char buf3818[200]; +char buf3819[200]; +char buf3820[200]; +char buf3821[200]; +char buf3822[200]; +char buf3823[200]; +char buf3824[200]; +char buf3825[200]; +char buf3826[200]; +char buf3827[200]; +char buf3828[200]; +char buf3829[200]; +char buf3830[200]; +char buf3831[200]; +char buf3832[200]; +char buf3833[200]; +char buf3834[200]; +char buf3835[200]; +char buf3836[200]; +char buf3837[200]; +char buf3838[200]; +char buf3839[200]; +char buf3840[200]; +char buf3841[200]; +char buf3842[200]; +char buf3843[200]; +char buf3844[200]; +char buf3845[200]; +char buf3846[200]; +char buf3847[200]; +char buf3848[200]; +char buf3849[200]; +char buf3850[200]; +char buf3851[200]; +char buf3852[200]; +char buf3853[200]; +char buf3854[200]; +char buf3855[200]; +char buf3856[200]; +char buf3857[200]; +char buf3858[200]; +char buf3859[200]; +char buf3860[200]; +char buf3861[200]; +char buf3862[200]; +char buf3863[200]; +char buf3864[200]; +char buf3865[200]; +char buf3866[200]; +char buf3867[200]; +char buf3868[200]; +char buf3869[200]; +char buf3870[200]; +char buf3871[200]; +char buf3872[200]; +char buf3873[200]; +char buf3874[200]; +char buf3875[200]; +char buf3876[200]; +char buf3877[200]; +char buf3878[200]; +char buf3879[200]; +char buf3880[200]; +char buf3881[200]; +char buf3882[200]; +char buf3883[200]; +char buf3884[200]; +char buf3885[200]; +char buf3886[200]; +char buf3887[200]; +char buf3888[200]; +char buf3889[200]; +char buf3890[200]; +char buf3891[200]; +char buf3892[200]; +char buf3893[200]; +char buf3894[200]; +char buf3895[200]; +char buf3896[200]; +char buf3897[200]; +char buf3898[200]; +char buf3899[200]; +char buf3900[200]; +char buf3901[200]; +char buf3902[200]; +char buf3903[200]; +char buf3904[200]; +char buf3905[200]; +char buf3906[200]; +char buf3907[200]; +char buf3908[200]; +char buf3909[200]; +char buf3910[200]; +char buf3911[200]; +char buf3912[200]; +char buf3913[200]; +char buf3914[200]; +char buf3915[200]; +char buf3916[200]; +char buf3917[200]; +char buf3918[200]; +char buf3919[200]; +char buf3920[200]; +char buf3921[200]; +char buf3922[200]; +char buf3923[200]; +char buf3924[200]; +char buf3925[200]; +char buf3926[200]; +char buf3927[200]; +char buf3928[200]; +char buf3929[200]; +char buf3930[200]; +char buf3931[200]; +char buf3932[200]; +char buf3933[200]; +char buf3934[200]; +char buf3935[200]; +char buf3936[200]; +char buf3937[200]; +char buf3938[200]; +char buf3939[200]; +char buf3940[200]; +char buf3941[200]; +char buf3942[200]; +char buf3943[200]; +char buf3944[200]; +char buf3945[200]; +char buf3946[200]; +char buf3947[200]; +char buf3948[200]; +char buf3949[200]; +char buf3950[200]; +char buf3951[200]; +char buf3952[200]; +char buf3953[200]; +char buf3954[200]; +char buf3955[200]; +char buf3956[200]; +char buf3957[200]; +char buf3958[200]; +char buf3959[200]; +char buf3960[200]; +char buf3961[200]; +char buf3962[200]; +char buf3963[200]; +char buf3964[200]; +char buf3965[200]; +char buf3966[200]; +char buf3967[200]; +char buf3968[200]; +char buf3969[200]; +char buf3970[200]; +char buf3971[200]; +char buf3972[200]; +char buf3973[200]; +char buf3974[200]; +char buf3975[200]; +char buf3976[200]; +char buf3977[200]; +char buf3978[200]; +char buf3979[200]; +char buf3980[200]; +char buf3981[200]; +char buf3982[200]; +char buf3983[200]; +char buf3984[200]; +char buf3985[200]; +char buf3986[200]; +char buf3987[200]; +char buf3988[200]; +char buf3989[200]; +char buf3990[200]; +char buf3991[200]; +char buf3992[200]; +char buf3993[200]; +char buf3994[200]; +char buf3995[200]; +char buf3996[200]; +char buf3997[200]; +char buf3998[200]; +char buf3999[200]; +char buf4000[200]; +char buf4001[200]; +char buf4002[200]; +char buf4003[200]; +char buf4004[200]; +char buf4005[200]; +char buf4006[200]; +char buf4007[200]; +char buf4008[200]; +char buf4009[200]; +char buf4010[200]; +char buf4011[200]; +char buf4012[200]; +char buf4013[200]; +char buf4014[200]; +char buf4015[200]; +char buf4016[200]; +char buf4017[200]; +char buf4018[200]; +char buf4019[200]; +char buf4020[200]; +char buf4021[200]; +char buf4022[200]; +char buf4023[200]; +char buf4024[200]; +char buf4025[200]; +char buf4026[200]; +char buf4027[200]; +char buf4028[200]; +char buf4029[200]; +char buf4030[200]; +char buf4031[200]; +char buf4032[200]; +char buf4033[200]; +char buf4034[200]; +char buf4035[200]; +char buf4036[200]; +char buf4037[200]; +char buf4038[200]; +char buf4039[200]; +char buf4040[200]; +char buf4041[200]; +char buf4042[200]; +char buf4043[200]; +char buf4044[200]; +char buf4045[200]; +char buf4046[200]; +char buf4047[200]; +char buf4048[200]; +char buf4049[200]; +char buf4050[200]; +char buf4051[200]; +char buf4052[200]; +char buf4053[200]; +char buf4054[200]; +char buf4055[200]; +char buf4056[200]; +char buf4057[200]; +char buf4058[200]; +char buf4059[200]; +char buf4060[200]; +char buf4061[200]; +char buf4062[200]; +char buf4063[200]; +char buf4064[200]; +char buf4065[200]; +char buf4066[200]; +char buf4067[200]; +char buf4068[200]; +char buf4069[200]; +char buf4070[200]; +char buf4071[200]; +char buf4072[200]; +char buf4073[200]; +char buf4074[200]; +char buf4075[200]; +char buf4076[200]; +char buf4077[200]; +char buf4078[200]; +char buf4079[200]; +char buf4080[200]; +char buf4081[200]; +char buf4082[200]; +char buf4083[200]; +char buf4084[200]; +char buf4085[200]; +char buf4086[200]; +char buf4087[200]; +char buf4088[200]; +char buf4089[200]; +char buf4090[200]; +char buf4091[200]; +char buf4092[200]; +char buf4093[200]; +char buf4094[200]; +char buf4095[200]; +char buf4096[200]; +char buf4097[200]; +char buf4098[200]; +char buf4099[200]; +char buf4100[200]; +char buf4101[200]; +char buf4102[200]; +char buf4103[200]; +char buf4104[200]; +char buf4105[200]; +char buf4106[200]; +char buf4107[200]; +char buf4108[200]; +char buf4109[200]; +char buf4110[200]; +char buf4111[200]; +char buf4112[200]; +char buf4113[200]; +char buf4114[200]; +char buf4115[200]; +char buf4116[200]; +char buf4117[200]; +char buf4118[200]; +char buf4119[200]; +char buf4120[200]; +char buf4121[200]; +char buf4122[200]; +char buf4123[200]; +char buf4124[200]; +char buf4125[200]; +char buf4126[200]; +char buf4127[200]; +char buf4128[200]; +char buf4129[200]; +char buf4130[200]; +char buf4131[200]; +char buf4132[200]; +char buf4133[200]; +char buf4134[200]; +char buf4135[200]; +char buf4136[200]; +char buf4137[200]; +char buf4138[200]; +char buf4139[200]; +char buf4140[200]; +char buf4141[200]; +char buf4142[200]; +char buf4143[200]; +char buf4144[200]; +char buf4145[200]; +char buf4146[200]; +char buf4147[200]; +char buf4148[200]; +char buf4149[200]; +char buf4150[200]; +char buf4151[200]; +char buf4152[200]; +char buf4153[200]; +char buf4154[200]; +char buf4155[200]; +char buf4156[200]; +char buf4157[200]; +char buf4158[200]; +char buf4159[200]; +char buf4160[200]; +char buf4161[200]; +char buf4162[200]; +char buf4163[200]; +char buf4164[200]; +char buf4165[200]; +char buf4166[200]; +char buf4167[200]; +char buf4168[200]; +char buf4169[200]; +char buf4170[200]; +char buf4171[200]; +char buf4172[200]; +char buf4173[200]; +char buf4174[200]; +char buf4175[200]; +char buf4176[200]; +char buf4177[200]; +char buf4178[200]; +char buf4179[200]; +char buf4180[200]; +char buf4181[200]; +char buf4182[200]; +char buf4183[200]; +char buf4184[200]; +char buf4185[200]; +char buf4186[200]; +char buf4187[200]; +char buf4188[200]; +char buf4189[200]; +char buf4190[200]; +char buf4191[200]; +char buf4192[200]; +char buf4193[200]; +char buf4194[200]; +char buf4195[200]; +char buf4196[200]; +char buf4197[200]; +char buf4198[200]; +char buf4199[200]; +char buf4200[200]; +char buf4201[200]; +char buf4202[200]; +char buf4203[200]; +char buf4204[200]; +char buf4205[200]; +char buf4206[200]; +char buf4207[200]; +char buf4208[200]; +char buf4209[200]; +char buf4210[200]; +char buf4211[200]; +char buf4212[200]; +char buf4213[200]; +char buf4214[200]; +char buf4215[200]; +char buf4216[200]; +char buf4217[200]; +char buf4218[200]; +char buf4219[200]; +char buf4220[200]; +char buf4221[200]; +char buf4222[200]; +char buf4223[200]; +char buf4224[200]; +char buf4225[200]; +char buf4226[200]; +char buf4227[200]; +char buf4228[200]; +char buf4229[200]; +char buf4230[200]; +char buf4231[200]; +char buf4232[200]; +char buf4233[200]; +char buf4234[200]; +char buf4235[200]; +char buf4236[200]; +char buf4237[200]; +char buf4238[200]; +char buf4239[200]; +char buf4240[200]; +char buf4241[200]; +char buf4242[200]; +char buf4243[200]; +char buf4244[200]; +char buf4245[200]; +char buf4246[200]; +char buf4247[200]; +char buf4248[200]; +char buf4249[200]; +char buf4250[200]; +char buf4251[200]; +char buf4252[200]; +char buf4253[200]; +char buf4254[200]; +char buf4255[200]; +char buf4256[200]; +char buf4257[200]; +char buf4258[200]; +char buf4259[200]; +char buf4260[200]; +char buf4261[200]; +char buf4262[200]; +char buf4263[200]; +char buf4264[200]; +char buf4265[200]; +char buf4266[200]; +char buf4267[200]; +char buf4268[200]; +char buf4269[200]; +char buf4270[200]; +char buf4271[200]; +char buf4272[200]; +char buf4273[200]; +char buf4274[200]; +char buf4275[200]; +char buf4276[200]; +char buf4277[200]; +char buf4278[200]; +char buf4279[200]; +char buf4280[200]; +char buf4281[200]; +char buf4282[200]; +char buf4283[200]; +char buf4284[200]; +char buf4285[200]; +char buf4286[200]; +char buf4287[200]; +char buf4288[200]; +char buf4289[200]; +char buf4290[200]; +char buf4291[200]; +char buf4292[200]; +char buf4293[200]; +char buf4294[200]; +char buf4295[200]; +char buf4296[200]; +char buf4297[200]; +char buf4298[200]; +char buf4299[200]; +char buf4300[200]; +char buf4301[200]; +char buf4302[200]; +char buf4303[200]; +char buf4304[200]; +char buf4305[200]; +char buf4306[200]; +char buf4307[200]; +char buf4308[200]; +char buf4309[200]; +char buf4310[200]; +char buf4311[200]; +char buf4312[200]; +char buf4313[200]; +char buf4314[200]; +char buf4315[200]; +char buf4316[200]; +char buf4317[200]; +char buf4318[200]; +char buf4319[200]; +char buf4320[200]; +char buf4321[200]; +char buf4322[200]; +char buf4323[200]; +char buf4324[200]; +char buf4325[200]; +char buf4326[200]; +char buf4327[200]; +char buf4328[200]; +char buf4329[200]; +char buf4330[200]; +char buf4331[200]; +char buf4332[200]; +char buf4333[200]; +char buf4334[200]; +char buf4335[200]; +char buf4336[200]; +char buf4337[200]; +char buf4338[200]; +char buf4339[200]; +char buf4340[200]; +char buf4341[200]; +char buf4342[200]; +char buf4343[200]; +char buf4344[200]; +char buf4345[200]; +char buf4346[200]; +char buf4347[200]; +char buf4348[200]; +char buf4349[200]; +char buf4350[200]; +char buf4351[200]; +char buf4352[200]; +char buf4353[200]; +char buf4354[200]; +char buf4355[200]; +char buf4356[200]; +char buf4357[200]; +char buf4358[200]; +char buf4359[200]; +char buf4360[200]; +char buf4361[200]; +char buf4362[200]; +char buf4363[200]; +char buf4364[200]; +char buf4365[200]; +char buf4366[200]; +char buf4367[200]; +char buf4368[200]; +char buf4369[200]; +char buf4370[200]; +char buf4371[200]; +char buf4372[200]; +char buf4373[200]; +char buf4374[200]; +char buf4375[200]; +char buf4376[200]; +char buf4377[200]; +char buf4378[200]; +char buf4379[200]; +char buf4380[200]; +char buf4381[200]; +char buf4382[200]; +char buf4383[200]; +char buf4384[200]; +char buf4385[200]; +char buf4386[200]; +char buf4387[200]; +char buf4388[200]; +char buf4389[200]; +char buf4390[200]; +char buf4391[200]; +char buf4392[200]; +char buf4393[200]; +char buf4394[200]; +char buf4395[200]; +char buf4396[200]; +char buf4397[200]; +char buf4398[200]; +char buf4399[200]; +char buf4400[200]; +char buf4401[200]; +char buf4402[200]; +char buf4403[200]; +char buf4404[200]; +char buf4405[200]; +char buf4406[200]; +char buf4407[200]; +char buf4408[200]; +char buf4409[200]; +char buf4410[200]; +char buf4411[200]; +char buf4412[200]; +char buf4413[200]; +char buf4414[200]; +char buf4415[200]; +char buf4416[200]; +char buf4417[200]; +char buf4418[200]; +char buf4419[200]; +char buf4420[200]; +char buf4421[200]; +char buf4422[200]; +char buf4423[200]; +char buf4424[200]; +char buf4425[200]; +char buf4426[200]; +char buf4427[200]; +char buf4428[200]; +char buf4429[200]; +char buf4430[200]; +char buf4431[200]; +char buf4432[200]; +char buf4433[200]; +char buf4434[200]; +char buf4435[200]; +char buf4436[200]; +char buf4437[200]; +char buf4438[200]; +char buf4439[200]; +char buf4440[200]; +char buf4441[200]; +char buf4442[200]; +char buf4443[200]; +char buf4444[200]; +char buf4445[200]; +char buf4446[200]; +char buf4447[200]; +char buf4448[200]; +char buf4449[200]; +char buf4450[200]; +char buf4451[200]; +char buf4452[200]; +char buf4453[200]; +char buf4454[200]; +char buf4455[200]; +char buf4456[200]; +char buf4457[200]; +char buf4458[200]; +char buf4459[200]; +char buf4460[200]; +char buf4461[200]; +char buf4462[200]; +char buf4463[200]; +char buf4464[200]; +char buf4465[200]; +char buf4466[200]; +char buf4467[200]; +char buf4468[200]; +char buf4469[200]; +char buf4470[200]; +char buf4471[200]; +char buf4472[200]; +char buf4473[200]; +char buf4474[200]; +char buf4475[200]; +char buf4476[200]; +char buf4477[200]; +char buf4478[200]; +char buf4479[200]; +char buf4480[200]; +char buf4481[200]; +char buf4482[200]; +char buf4483[200]; +char buf4484[200]; +char buf4485[200]; +char buf4486[200]; +char buf4487[200]; +char buf4488[200]; +char buf4489[200]; +char buf4490[200]; +char buf4491[200]; +char buf4492[200]; +char buf4493[200]; +char buf4494[200]; +char buf4495[200]; +char buf4496[200]; +char buf4497[200]; +char buf4498[200]; +char buf4499[200]; +char buf4500[200]; +char buf4501[200]; +char buf4502[200]; +char buf4503[200]; +char buf4504[200]; +char buf4505[200]; +char buf4506[200]; +char buf4507[200]; +char buf4508[200]; +char buf4509[200]; +char buf4510[200]; +char buf4511[200]; +char buf4512[200]; +char buf4513[200]; +char buf4514[200]; +char buf4515[200]; +char buf4516[200]; +char buf4517[200]; +char buf4518[200]; +char buf4519[200]; +char buf4520[200]; +char buf4521[200]; +char buf4522[200]; +char buf4523[200]; +char buf4524[200]; +char buf4525[200]; +char buf4526[200]; +char buf4527[200]; +char buf4528[200]; +char buf4529[200]; +char buf4530[200]; +char buf4531[200]; +char buf4532[200]; +char buf4533[200]; +char buf4534[200]; +char buf4535[200]; +char buf4536[200]; +char buf4537[200]; +char buf4538[200]; +char buf4539[200]; +char buf4540[200]; +char buf4541[200]; +char buf4542[200]; +char buf4543[200]; +char buf4544[200]; +char buf4545[200]; +char buf4546[200]; +char buf4547[200]; +char buf4548[200]; +char buf4549[200]; +char buf4550[200]; +char buf4551[200]; +char buf4552[200]; +char buf4553[200]; +char buf4554[200]; +char buf4555[200]; +char buf4556[200]; +char buf4557[200]; +char buf4558[200]; +char buf4559[200]; +char buf4560[200]; +char buf4561[200]; +char buf4562[200]; +char buf4563[200]; +char buf4564[200]; +char buf4565[200]; +char buf4566[200]; +char buf4567[200]; +char buf4568[200]; +char buf4569[200]; +char buf4570[200]; +char buf4571[200]; +char buf4572[200]; +char buf4573[200]; +char buf4574[200]; +char buf4575[200]; +char buf4576[200]; +char buf4577[200]; +char buf4578[200]; +char buf4579[200]; +char buf4580[200]; +char buf4581[200]; +char buf4582[200]; +char buf4583[200]; +char buf4584[200]; +char buf4585[200]; +char buf4586[200]; +char buf4587[200]; +char buf4588[200]; +char buf4589[200]; +char buf4590[200]; +char buf4591[200]; +char buf4592[200]; +char buf4593[200]; +char buf4594[200]; +char buf4595[200]; +char buf4596[200]; +char buf4597[200]; +char buf4598[200]; +char buf4599[200]; +char buf4600[200]; +char buf4601[200]; +char buf4602[200]; +char buf4603[200]; +char buf4604[200]; +char buf4605[200]; +char buf4606[200]; +char buf4607[200]; +char buf4608[200]; +char buf4609[200]; +char buf4610[200]; +char buf4611[200]; +char buf4612[200]; +char buf4613[200]; +char buf4614[200]; +char buf4615[200]; +char buf4616[200]; +char buf4617[200]; +char buf4618[200]; +char buf4619[200]; +char buf4620[200]; +char buf4621[200]; +char buf4622[200]; +char buf4623[200]; +char buf4624[200]; +char buf4625[200]; +char buf4626[200]; +char buf4627[200]; +char buf4628[200]; +char buf4629[200]; +char buf4630[200]; +char buf4631[200]; +char buf4632[200]; +char buf4633[200]; +char buf4634[200]; +char buf4635[200]; +char buf4636[200]; +char buf4637[200]; +char buf4638[200]; +char buf4639[200]; +char buf4640[200]; +char buf4641[200]; +char buf4642[200]; +char buf4643[200]; +char buf4644[200]; +char buf4645[200]; +char buf4646[200]; +char buf4647[200]; +char buf4648[200]; +char buf4649[200]; +char buf4650[200]; +char buf4651[200]; +char buf4652[200]; +char buf4653[200]; +char buf4654[200]; +char buf4655[200]; +char buf4656[200]; +char buf4657[200]; +char buf4658[200]; +char buf4659[200]; +char buf4660[200]; +char buf4661[200]; +char buf4662[200]; +char buf4663[200]; +char buf4664[200]; +char buf4665[200]; +char buf4666[200]; +char buf4667[200]; +char buf4668[200]; +char buf4669[200]; +char buf4670[200]; +char buf4671[200]; +char buf4672[200]; +char buf4673[200]; +char buf4674[200]; +char buf4675[200]; +char buf4676[200]; +char buf4677[200]; +char buf4678[200]; +char buf4679[200]; +char buf4680[200]; +char buf4681[200]; +char buf4682[200]; +char buf4683[200]; +char buf4684[200]; +char buf4685[200]; +char buf4686[200]; +char buf4687[200]; +char buf4688[200]; +char buf4689[200]; +char buf4690[200]; +char buf4691[200]; +char buf4692[200]; +char buf4693[200]; +char buf4694[200]; +char buf4695[200]; +char buf4696[200]; +char buf4697[200]; +char buf4698[200]; + +void RS_KERNEL test(int in, rs_kernel_context context) { + *(uchar*)buf0 = abs(*(char*)buf1); + *(uchar2*)buf2 = abs(*(char2*)buf3); + *(uchar3*)buf4 = abs(*(char3*)buf5); + *(uchar4*)buf6 = abs(*(char4*)buf7); + *(ushort*)buf8 = abs(*(short*)buf9); + *(ushort2*)buf10 = abs(*(short2*)buf11); + *(ushort3*)buf12 = abs(*(short3*)buf13); + *(ushort4*)buf14 = abs(*(short4*)buf15); + *(uint*)buf16 = abs(*(int*)buf17); + *(uint2*)buf18 = abs(*(int2*)buf19); + *(uint3*)buf20 = abs(*(int3*)buf21); + *(uint4*)buf22 = abs(*(int4*)buf23); + *(float*)buf24 = acos(*(float*)buf25); + *(float2*)buf26 = acos(*(float2*)buf27); + *(float3*)buf28 = acos(*(float3*)buf29); + *(float4*)buf30 = acos(*(float4*)buf31); + *(float*)buf32 = acosh(*(float*)buf33); + *(float2*)buf34 = acosh(*(float2*)buf35); + *(float3*)buf36 = acosh(*(float3*)buf37); + *(float4*)buf38 = acosh(*(float4*)buf39); + *(float*)buf40 = acospi(*(float*)buf41); + *(float2*)buf42 = acospi(*(float2*)buf43); + *(float3*)buf44 = acospi(*(float3*)buf45); + *(float4*)buf46 = acospi(*(float4*)buf47); + *(float*)buf48 = asin(*(float*)buf49); + *(float2*)buf50 = asin(*(float2*)buf51); + *(float3*)buf52 = asin(*(float3*)buf53); + *(float4*)buf54 = asin(*(float4*)buf55); + *(float*)buf56 = asinh(*(float*)buf57); + *(float2*)buf58 = asinh(*(float2*)buf59); + *(float3*)buf60 = asinh(*(float3*)buf61); + *(float4*)buf62 = asinh(*(float4*)buf63); + *(float*)buf64 = asinpi(*(float*)buf65); + *(float2*)buf66 = asinpi(*(float2*)buf67); + *(float3*)buf68 = asinpi(*(float3*)buf69); + *(float4*)buf70 = asinpi(*(float4*)buf71); + *(float*)buf72 = atan(*(float*)buf73); + *(float2*)buf74 = atan(*(float2*)buf75); + *(float3*)buf76 = atan(*(float3*)buf77); + *(float4*)buf78 = atan(*(float4*)buf79); + *(float*)buf80 = atan2(*(float*)buf81, *(float*)buf82); + *(float2*)buf83 = atan2(*(float2*)buf84, *(float2*)buf85); + *(float3*)buf86 = atan2(*(float3*)buf87, *(float3*)buf88); + *(float4*)buf89 = atan2(*(float4*)buf90, *(float4*)buf91); + *(float*)buf92 = atan2pi(*(float*)buf93, *(float*)buf94); + *(float2*)buf95 = atan2pi(*(float2*)buf96, *(float2*)buf97); + *(float3*)buf98 = atan2pi(*(float3*)buf99, *(float3*)buf100); + *(float4*)buf101 = atan2pi(*(float4*)buf102, *(float4*)buf103); + *(float*)buf104 = atanh(*(float*)buf105); + *(float2*)buf106 = atanh(*(float2*)buf107); + *(float3*)buf108 = atanh(*(float3*)buf109); + *(float4*)buf110 = atanh(*(float4*)buf111); + *(float*)buf112 = atanpi(*(float*)buf113); + *(float2*)buf114 = atanpi(*(float2*)buf115); + *(float3*)buf116 = atanpi(*(float3*)buf117); + *(float4*)buf118 = atanpi(*(float4*)buf119); + *(float*)buf120 = cbrt(*(float*)buf121); + *(float2*)buf122 = cbrt(*(float2*)buf123); + *(float3*)buf124 = cbrt(*(float3*)buf125); + *(float4*)buf126 = cbrt(*(float4*)buf127); + *(float*)buf128 = ceil(*(float*)buf129); + *(float2*)buf130 = ceil(*(float2*)buf131); + *(float3*)buf132 = ceil(*(float3*)buf133); + *(float4*)buf134 = ceil(*(float4*)buf135); + *(float*)buf136 = clamp(*(float*)buf137, *(float*)buf138, *(float*)buf139); + *(float2*)buf140 = clamp(*(float2*)buf141, *(float2*)buf142, *(float2*)buf143); + *(float3*)buf144 = clamp(*(float3*)buf145, *(float3*)buf146, *(float3*)buf147); + *(float4*)buf148 = clamp(*(float4*)buf149, *(float4*)buf150, *(float4*)buf151); + *(float2*)buf152 = clamp(*(float2*)buf153, *(float*)buf154, *(float*)buf155); + *(float3*)buf156 = clamp(*(float3*)buf157, *(float*)buf158, *(float*)buf159); + *(float4*)buf160 = clamp(*(float4*)buf161, *(float*)buf162, *(float*)buf163); + *(char*)buf164 = clamp(*(char*)buf165, *(char*)buf166, *(char*)buf167); + *(char2*)buf168 = clamp(*(char2*)buf169, *(char2*)buf170, *(char2*)buf171); + *(char3*)buf172 = clamp(*(char3*)buf173, *(char3*)buf174, *(char3*)buf175); + *(char4*)buf176 = clamp(*(char4*)buf177, *(char4*)buf178, *(char4*)buf179); + *(uchar*)buf180 = clamp(*(uchar*)buf181, *(uchar*)buf182, *(uchar*)buf183); + *(uchar2*)buf184 = clamp(*(uchar2*)buf185, *(uchar2*)buf186, *(uchar2*)buf187); + *(uchar3*)buf188 = clamp(*(uchar3*)buf189, *(uchar3*)buf190, *(uchar3*)buf191); + *(uchar4*)buf192 = clamp(*(uchar4*)buf193, *(uchar4*)buf194, *(uchar4*)buf195); + *(short*)buf196 = clamp(*(short*)buf197, *(short*)buf198, *(short*)buf199); + *(short2*)buf200 = clamp(*(short2*)buf201, *(short2*)buf202, *(short2*)buf203); + *(short3*)buf204 = clamp(*(short3*)buf205, *(short3*)buf206, *(short3*)buf207); + *(short4*)buf208 = clamp(*(short4*)buf209, *(short4*)buf210, *(short4*)buf211); + *(ushort*)buf212 = clamp(*(ushort*)buf213, *(ushort*)buf214, *(ushort*)buf215); + *(ushort2*)buf216 = clamp(*(ushort2*)buf217, *(ushort2*)buf218, *(ushort2*)buf219); + *(ushort3*)buf220 = clamp(*(ushort3*)buf221, *(ushort3*)buf222, *(ushort3*)buf223); + *(ushort4*)buf224 = clamp(*(ushort4*)buf225, *(ushort4*)buf226, *(ushort4*)buf227); + *(int*)buf228 = clamp(*(int*)buf229, *(int*)buf230, *(int*)buf231); + *(int2*)buf232 = clamp(*(int2*)buf233, *(int2*)buf234, *(int2*)buf235); + *(int3*)buf236 = clamp(*(int3*)buf237, *(int3*)buf238, *(int3*)buf239); + *(int4*)buf240 = clamp(*(int4*)buf241, *(int4*)buf242, *(int4*)buf243); + *(uint*)buf244 = clamp(*(uint*)buf245, *(uint*)buf246, *(uint*)buf247); + *(uint2*)buf248 = clamp(*(uint2*)buf249, *(uint2*)buf250, *(uint2*)buf251); + *(uint3*)buf252 = clamp(*(uint3*)buf253, *(uint3*)buf254, *(uint3*)buf255); + *(uint4*)buf256 = clamp(*(uint4*)buf257, *(uint4*)buf258, *(uint4*)buf259); + *(long*)buf260 = clamp(*(long*)buf261, *(long*)buf262, *(long*)buf263); + *(long2*)buf264 = clamp(*(long2*)buf265, *(long2*)buf266, *(long2*)buf267); + *(long3*)buf268 = clamp(*(long3*)buf269, *(long3*)buf270, *(long3*)buf271); + *(long4*)buf272 = clamp(*(long4*)buf273, *(long4*)buf274, *(long4*)buf275); + *(ulong*)buf276 = clamp(*(ulong*)buf277, *(ulong*)buf278, *(ulong*)buf279); + *(ulong2*)buf280 = clamp(*(ulong2*)buf281, *(ulong2*)buf282, *(ulong2*)buf283); + *(ulong3*)buf284 = clamp(*(ulong3*)buf285, *(ulong3*)buf286, *(ulong3*)buf287); + *(ulong4*)buf288 = clamp(*(ulong4*)buf289, *(ulong4*)buf290, *(ulong4*)buf291); + *(char2*)buf292 = clamp(*(char2*)buf293, *(char*)buf294, *(char*)buf295); + *(char3*)buf296 = clamp(*(char3*)buf297, *(char*)buf298, *(char*)buf299); + *(char4*)buf300 = clamp(*(char4*)buf301, *(char*)buf302, *(char*)buf303); + *(uchar2*)buf304 = clamp(*(uchar2*)buf305, *(uchar*)buf306, *(uchar*)buf307); + *(uchar3*)buf308 = clamp(*(uchar3*)buf309, *(uchar*)buf310, *(uchar*)buf311); + *(uchar4*)buf312 = clamp(*(uchar4*)buf313, *(uchar*)buf314, *(uchar*)buf315); + *(short2*)buf316 = clamp(*(short2*)buf317, *(short*)buf318, *(short*)buf319); + *(short3*)buf320 = clamp(*(short3*)buf321, *(short*)buf322, *(short*)buf323); + *(short4*)buf324 = clamp(*(short4*)buf325, *(short*)buf326, *(short*)buf327); + *(ushort2*)buf328 = clamp(*(ushort2*)buf329, *(ushort*)buf330, *(ushort*)buf331); + *(ushort3*)buf332 = clamp(*(ushort3*)buf333, *(ushort*)buf334, *(ushort*)buf335); + *(ushort4*)buf336 = clamp(*(ushort4*)buf337, *(ushort*)buf338, *(ushort*)buf339); + *(int2*)buf340 = clamp(*(int2*)buf341, *(int*)buf342, *(int*)buf343); + *(int3*)buf344 = clamp(*(int3*)buf345, *(int*)buf346, *(int*)buf347); + *(int4*)buf348 = clamp(*(int4*)buf349, *(int*)buf350, *(int*)buf351); + *(uint2*)buf352 = clamp(*(uint2*)buf353, *(uint*)buf354, *(uint*)buf355); + *(uint3*)buf356 = clamp(*(uint3*)buf357, *(uint*)buf358, *(uint*)buf359); + *(uint4*)buf360 = clamp(*(uint4*)buf361, *(uint*)buf362, *(uint*)buf363); + *(long2*)buf364 = clamp(*(long2*)buf365, *(long*)buf366, *(long*)buf367); + *(long3*)buf368 = clamp(*(long3*)buf369, *(long*)buf370, *(long*)buf371); + *(long4*)buf372 = clamp(*(long4*)buf373, *(long*)buf374, *(long*)buf375); + *(ulong2*)buf376 = clamp(*(ulong2*)buf377, *(ulong*)buf378, *(ulong*)buf379); + *(ulong3*)buf380 = clamp(*(ulong3*)buf381, *(ulong*)buf382, *(ulong*)buf383); + *(ulong4*)buf384 = clamp(*(ulong4*)buf385, *(ulong*)buf386, *(ulong*)buf387); + *(char*)buf388 = clz(*(char*)buf389); + *(char2*)buf390 = clz(*(char2*)buf391); + *(char3*)buf392 = clz(*(char3*)buf393); + *(char4*)buf394 = clz(*(char4*)buf395); + *(uchar*)buf396 = clz(*(uchar*)buf397); + *(uchar2*)buf398 = clz(*(uchar2*)buf399); + *(uchar3*)buf400 = clz(*(uchar3*)buf401); + *(uchar4*)buf402 = clz(*(uchar4*)buf403); + *(short*)buf404 = clz(*(short*)buf405); + *(short2*)buf406 = clz(*(short2*)buf407); + *(short3*)buf408 = clz(*(short3*)buf409); + *(short4*)buf410 = clz(*(short4*)buf411); + *(ushort*)buf412 = clz(*(ushort*)buf413); + *(ushort2*)buf414 = clz(*(ushort2*)buf415); + *(ushort3*)buf416 = clz(*(ushort3*)buf417); + *(ushort4*)buf418 = clz(*(ushort4*)buf419); + *(int*)buf420 = clz(*(int*)buf421); + *(int2*)buf422 = clz(*(int2*)buf423); + *(int3*)buf424 = clz(*(int3*)buf425); + *(int4*)buf426 = clz(*(int4*)buf427); + *(uint*)buf428 = clz(*(uint*)buf429); + *(uint2*)buf430 = clz(*(uint2*)buf431); + *(uint3*)buf432 = clz(*(uint3*)buf433); + *(uint4*)buf434 = clz(*(uint4*)buf435); + *(float2*)buf436 = convert_float2(*(float2*)buf437); + *(float3*)buf438 = convert_float3(*(float3*)buf439); + *(float4*)buf440 = convert_float4(*(float4*)buf441); + *(float2*)buf442 = convert_float2(*(char2*)buf443); + *(float3*)buf444 = convert_float3(*(char3*)buf445); + *(float4*)buf446 = convert_float4(*(char4*)buf447); + *(float2*)buf448 = convert_float2(*(uchar2*)buf449); + *(float3*)buf450 = convert_float3(*(uchar3*)buf451); + *(float4*)buf452 = convert_float4(*(uchar4*)buf453); + *(float2*)buf454 = convert_float2(*(short2*)buf455); + *(float3*)buf456 = convert_float3(*(short3*)buf457); + *(float4*)buf458 = convert_float4(*(short4*)buf459); + *(float2*)buf460 = convert_float2(*(ushort2*)buf461); + *(float3*)buf462 = convert_float3(*(ushort3*)buf463); + *(float4*)buf464 = convert_float4(*(ushort4*)buf465); + *(float2*)buf466 = convert_float2(*(int2*)buf467); + *(float3*)buf468 = convert_float3(*(int3*)buf469); + *(float4*)buf470 = convert_float4(*(int4*)buf471); + *(float2*)buf472 = convert_float2(*(uint2*)buf473); + *(float3*)buf474 = convert_float3(*(uint3*)buf475); + *(float4*)buf476 = convert_float4(*(uint4*)buf477); + *(char2*)buf478 = convert_char2(*(float2*)buf479); + *(char3*)buf480 = convert_char3(*(float3*)buf481); + *(char4*)buf482 = convert_char4(*(float4*)buf483); + *(char2*)buf484 = convert_char2(*(char2*)buf485); + *(char3*)buf486 = convert_char3(*(char3*)buf487); + *(char4*)buf488 = convert_char4(*(char4*)buf489); + *(char2*)buf490 = convert_char2(*(uchar2*)buf491); + *(char3*)buf492 = convert_char3(*(uchar3*)buf493); + *(char4*)buf494 = convert_char4(*(uchar4*)buf495); + *(char2*)buf496 = convert_char2(*(short2*)buf497); + *(char3*)buf498 = convert_char3(*(short3*)buf499); + *(char4*)buf500 = convert_char4(*(short4*)buf501); + *(char2*)buf502 = convert_char2(*(ushort2*)buf503); + *(char3*)buf504 = convert_char3(*(ushort3*)buf505); + *(char4*)buf506 = convert_char4(*(ushort4*)buf507); + *(char2*)buf508 = convert_char2(*(int2*)buf509); + *(char3*)buf510 = convert_char3(*(int3*)buf511); + *(char4*)buf512 = convert_char4(*(int4*)buf513); + *(char2*)buf514 = convert_char2(*(uint2*)buf515); + *(char3*)buf516 = convert_char3(*(uint3*)buf517); + *(char4*)buf518 = convert_char4(*(uint4*)buf519); + *(uchar2*)buf520 = convert_uchar2(*(float2*)buf521); + *(uchar3*)buf522 = convert_uchar3(*(float3*)buf523); + *(uchar4*)buf524 = convert_uchar4(*(float4*)buf525); + *(uchar2*)buf526 = convert_uchar2(*(char2*)buf527); + *(uchar3*)buf528 = convert_uchar3(*(char3*)buf529); + *(uchar4*)buf530 = convert_uchar4(*(char4*)buf531); + *(uchar2*)buf532 = convert_uchar2(*(uchar2*)buf533); + *(uchar3*)buf534 = convert_uchar3(*(uchar3*)buf535); + *(uchar4*)buf536 = convert_uchar4(*(uchar4*)buf537); + *(uchar2*)buf538 = convert_uchar2(*(short2*)buf539); + *(uchar3*)buf540 = convert_uchar3(*(short3*)buf541); + *(uchar4*)buf542 = convert_uchar4(*(short4*)buf543); + *(uchar2*)buf544 = convert_uchar2(*(ushort2*)buf545); + *(uchar3*)buf546 = convert_uchar3(*(ushort3*)buf547); + *(uchar4*)buf548 = convert_uchar4(*(ushort4*)buf549); + *(uchar2*)buf550 = convert_uchar2(*(int2*)buf551); + *(uchar3*)buf552 = convert_uchar3(*(int3*)buf553); + *(uchar4*)buf554 = convert_uchar4(*(int4*)buf555); + *(uchar2*)buf556 = convert_uchar2(*(uint2*)buf557); + *(uchar3*)buf558 = convert_uchar3(*(uint3*)buf559); + *(uchar4*)buf560 = convert_uchar4(*(uint4*)buf561); + *(short2*)buf562 = convert_short2(*(float2*)buf563); + *(short3*)buf564 = convert_short3(*(float3*)buf565); + *(short4*)buf566 = convert_short4(*(float4*)buf567); + *(short2*)buf568 = convert_short2(*(char2*)buf569); + *(short3*)buf570 = convert_short3(*(char3*)buf571); + *(short4*)buf572 = convert_short4(*(char4*)buf573); + *(short2*)buf574 = convert_short2(*(uchar2*)buf575); + *(short3*)buf576 = convert_short3(*(uchar3*)buf577); + *(short4*)buf578 = convert_short4(*(uchar4*)buf579); + *(short2*)buf580 = convert_short2(*(short2*)buf581); + *(short3*)buf582 = convert_short3(*(short3*)buf583); + *(short4*)buf584 = convert_short4(*(short4*)buf585); + *(short2*)buf586 = convert_short2(*(ushort2*)buf587); + *(short3*)buf588 = convert_short3(*(ushort3*)buf589); + *(short4*)buf590 = convert_short4(*(ushort4*)buf591); + *(short2*)buf592 = convert_short2(*(int2*)buf593); + *(short3*)buf594 = convert_short3(*(int3*)buf595); + *(short4*)buf596 = convert_short4(*(int4*)buf597); + *(short2*)buf598 = convert_short2(*(uint2*)buf599); + *(short3*)buf600 = convert_short3(*(uint3*)buf601); + *(short4*)buf602 = convert_short4(*(uint4*)buf603); + *(ushort2*)buf604 = convert_ushort2(*(float2*)buf605); + *(ushort3*)buf606 = convert_ushort3(*(float3*)buf607); + *(ushort4*)buf608 = convert_ushort4(*(float4*)buf609); + *(ushort2*)buf610 = convert_ushort2(*(char2*)buf611); + *(ushort3*)buf612 = convert_ushort3(*(char3*)buf613); + *(ushort4*)buf614 = convert_ushort4(*(char4*)buf615); + *(ushort2*)buf616 = convert_ushort2(*(uchar2*)buf617); + *(ushort3*)buf618 = convert_ushort3(*(uchar3*)buf619); + *(ushort4*)buf620 = convert_ushort4(*(uchar4*)buf621); + *(ushort2*)buf622 = convert_ushort2(*(short2*)buf623); + *(ushort3*)buf624 = convert_ushort3(*(short3*)buf625); + *(ushort4*)buf626 = convert_ushort4(*(short4*)buf627); + *(ushort2*)buf628 = convert_ushort2(*(ushort2*)buf629); + *(ushort3*)buf630 = convert_ushort3(*(ushort3*)buf631); + *(ushort4*)buf632 = convert_ushort4(*(ushort4*)buf633); + *(ushort2*)buf634 = convert_ushort2(*(int2*)buf635); + *(ushort3*)buf636 = convert_ushort3(*(int3*)buf637); + *(ushort4*)buf638 = convert_ushort4(*(int4*)buf639); + *(ushort2*)buf640 = convert_ushort2(*(uint2*)buf641); + *(ushort3*)buf642 = convert_ushort3(*(uint3*)buf643); + *(ushort4*)buf644 = convert_ushort4(*(uint4*)buf645); + *(int2*)buf646 = convert_int2(*(float2*)buf647); + *(int3*)buf648 = convert_int3(*(float3*)buf649); + *(int4*)buf650 = convert_int4(*(float4*)buf651); + *(int2*)buf652 = convert_int2(*(char2*)buf653); + *(int3*)buf654 = convert_int3(*(char3*)buf655); + *(int4*)buf656 = convert_int4(*(char4*)buf657); + *(int2*)buf658 = convert_int2(*(uchar2*)buf659); + *(int3*)buf660 = convert_int3(*(uchar3*)buf661); + *(int4*)buf662 = convert_int4(*(uchar4*)buf663); + *(int2*)buf664 = convert_int2(*(short2*)buf665); + *(int3*)buf666 = convert_int3(*(short3*)buf667); + *(int4*)buf668 = convert_int4(*(short4*)buf669); + *(int2*)buf670 = convert_int2(*(ushort2*)buf671); + *(int3*)buf672 = convert_int3(*(ushort3*)buf673); + *(int4*)buf674 = convert_int4(*(ushort4*)buf675); + *(int2*)buf676 = convert_int2(*(int2*)buf677); + *(int3*)buf678 = convert_int3(*(int3*)buf679); + *(int4*)buf680 = convert_int4(*(int4*)buf681); + *(int2*)buf682 = convert_int2(*(uint2*)buf683); + *(int3*)buf684 = convert_int3(*(uint3*)buf685); + *(int4*)buf686 = convert_int4(*(uint4*)buf687); + *(uint2*)buf688 = convert_uint2(*(float2*)buf689); + *(uint3*)buf690 = convert_uint3(*(float3*)buf691); + *(uint4*)buf692 = convert_uint4(*(float4*)buf693); + *(uint2*)buf694 = convert_uint2(*(char2*)buf695); + *(uint3*)buf696 = convert_uint3(*(char3*)buf697); + *(uint4*)buf698 = convert_uint4(*(char4*)buf699); + *(uint2*)buf700 = convert_uint2(*(uchar2*)buf701); + *(uint3*)buf702 = convert_uint3(*(uchar3*)buf703); + *(uint4*)buf704 = convert_uint4(*(uchar4*)buf705); + *(uint2*)buf706 = convert_uint2(*(short2*)buf707); + *(uint3*)buf708 = convert_uint3(*(short3*)buf709); + *(uint4*)buf710 = convert_uint4(*(short4*)buf711); + *(uint2*)buf712 = convert_uint2(*(ushort2*)buf713); + *(uint3*)buf714 = convert_uint3(*(ushort3*)buf715); + *(uint4*)buf716 = convert_uint4(*(ushort4*)buf717); + *(uint2*)buf718 = convert_uint2(*(int2*)buf719); + *(uint3*)buf720 = convert_uint3(*(int3*)buf721); + *(uint4*)buf722 = convert_uint4(*(int4*)buf723); + *(uint2*)buf724 = convert_uint2(*(uint2*)buf725); + *(uint3*)buf726 = convert_uint3(*(uint3*)buf727); + *(uint4*)buf728 = convert_uint4(*(uint4*)buf729); + *(double2*)buf730 = convert_double2(*(double2*)buf731); + *(double3*)buf732 = convert_double3(*(double3*)buf733); + *(double4*)buf734 = convert_double4(*(double4*)buf735); + *(double2*)buf736 = convert_double2(*(long2*)buf737); + *(double3*)buf738 = convert_double3(*(long3*)buf739); + *(double4*)buf740 = convert_double4(*(long4*)buf741); + *(double2*)buf742 = convert_double2(*(ulong2*)buf743); + *(double3*)buf744 = convert_double3(*(ulong3*)buf745); + *(double4*)buf746 = convert_double4(*(ulong4*)buf747); + *(long2*)buf748 = convert_long2(*(double2*)buf749); + *(long3*)buf750 = convert_long3(*(double3*)buf751); + *(long4*)buf752 = convert_long4(*(double4*)buf753); + *(long2*)buf754 = convert_long2(*(long2*)buf755); + *(long3*)buf756 = convert_long3(*(long3*)buf757); + *(long4*)buf758 = convert_long4(*(long4*)buf759); + *(long2*)buf760 = convert_long2(*(ulong2*)buf761); + *(long3*)buf762 = convert_long3(*(ulong3*)buf763); + *(long4*)buf764 = convert_long4(*(ulong4*)buf765); + *(ulong2*)buf766 = convert_ulong2(*(double2*)buf767); + *(ulong3*)buf768 = convert_ulong3(*(double3*)buf769); + *(ulong4*)buf770 = convert_ulong4(*(double4*)buf771); + *(ulong2*)buf772 = convert_ulong2(*(long2*)buf773); + *(ulong3*)buf774 = convert_ulong3(*(long3*)buf775); + *(ulong4*)buf776 = convert_ulong4(*(long4*)buf777); + *(ulong2*)buf778 = convert_ulong2(*(ulong2*)buf779); + *(ulong3*)buf780 = convert_ulong3(*(ulong3*)buf781); + *(ulong4*)buf782 = convert_ulong4(*(ulong4*)buf783); + *(float2*)buf784 = convert_float2(*(double2*)buf785); + *(float3*)buf786 = convert_float3(*(double3*)buf787); + *(float4*)buf788 = convert_float4(*(double4*)buf789); + *(float2*)buf790 = convert_float2(*(long2*)buf791); + *(float3*)buf792 = convert_float3(*(long3*)buf793); + *(float4*)buf794 = convert_float4(*(long4*)buf795); + *(float2*)buf796 = convert_float2(*(ulong2*)buf797); + *(float3*)buf798 = convert_float3(*(ulong3*)buf799); + *(float4*)buf800 = convert_float4(*(ulong4*)buf801); + *(char2*)buf802 = convert_char2(*(double2*)buf803); + *(char3*)buf804 = convert_char3(*(double3*)buf805); + *(char4*)buf806 = convert_char4(*(double4*)buf807); + *(char2*)buf808 = convert_char2(*(long2*)buf809); + *(char3*)buf810 = convert_char3(*(long3*)buf811); + *(char4*)buf812 = convert_char4(*(long4*)buf813); + *(char2*)buf814 = convert_char2(*(ulong2*)buf815); + *(char3*)buf816 = convert_char3(*(ulong3*)buf817); + *(char4*)buf818 = convert_char4(*(ulong4*)buf819); + *(uchar2*)buf820 = convert_uchar2(*(double2*)buf821); + *(uchar3*)buf822 = convert_uchar3(*(double3*)buf823); + *(uchar4*)buf824 = convert_uchar4(*(double4*)buf825); + *(uchar2*)buf826 = convert_uchar2(*(long2*)buf827); + *(uchar3*)buf828 = convert_uchar3(*(long3*)buf829); + *(uchar4*)buf830 = convert_uchar4(*(long4*)buf831); + *(uchar2*)buf832 = convert_uchar2(*(ulong2*)buf833); + *(uchar3*)buf834 = convert_uchar3(*(ulong3*)buf835); + *(uchar4*)buf836 = convert_uchar4(*(ulong4*)buf837); + *(short2*)buf838 = convert_short2(*(double2*)buf839); + *(short3*)buf840 = convert_short3(*(double3*)buf841); + *(short4*)buf842 = convert_short4(*(double4*)buf843); + *(short2*)buf844 = convert_short2(*(long2*)buf845); + *(short3*)buf846 = convert_short3(*(long3*)buf847); + *(short4*)buf848 = convert_short4(*(long4*)buf849); + *(short2*)buf850 = convert_short2(*(ulong2*)buf851); + *(short3*)buf852 = convert_short3(*(ulong3*)buf853); + *(short4*)buf854 = convert_short4(*(ulong4*)buf855); + *(ushort2*)buf856 = convert_ushort2(*(double2*)buf857); + *(ushort3*)buf858 = convert_ushort3(*(double3*)buf859); + *(ushort4*)buf860 = convert_ushort4(*(double4*)buf861); + *(ushort2*)buf862 = convert_ushort2(*(long2*)buf863); + *(ushort3*)buf864 = convert_ushort3(*(long3*)buf865); + *(ushort4*)buf866 = convert_ushort4(*(long4*)buf867); + *(ushort2*)buf868 = convert_ushort2(*(ulong2*)buf869); + *(ushort3*)buf870 = convert_ushort3(*(ulong3*)buf871); + *(ushort4*)buf872 = convert_ushort4(*(ulong4*)buf873); + *(int2*)buf874 = convert_int2(*(double2*)buf875); + *(int3*)buf876 = convert_int3(*(double3*)buf877); + *(int4*)buf878 = convert_int4(*(double4*)buf879); + *(int2*)buf880 = convert_int2(*(long2*)buf881); + *(int3*)buf882 = convert_int3(*(long3*)buf883); + *(int4*)buf884 = convert_int4(*(long4*)buf885); + *(int2*)buf886 = convert_int2(*(ulong2*)buf887); + *(int3*)buf888 = convert_int3(*(ulong3*)buf889); + *(int4*)buf890 = convert_int4(*(ulong4*)buf891); + *(uint2*)buf892 = convert_uint2(*(double2*)buf893); + *(uint3*)buf894 = convert_uint3(*(double3*)buf895); + *(uint4*)buf896 = convert_uint4(*(double4*)buf897); + *(uint2*)buf898 = convert_uint2(*(long2*)buf899); + *(uint3*)buf900 = convert_uint3(*(long3*)buf901); + *(uint4*)buf902 = convert_uint4(*(long4*)buf903); + *(uint2*)buf904 = convert_uint2(*(ulong2*)buf905); + *(uint3*)buf906 = convert_uint3(*(ulong3*)buf907); + *(uint4*)buf908 = convert_uint4(*(ulong4*)buf909); + *(double2*)buf910 = convert_double2(*(float2*)buf911); + *(double3*)buf912 = convert_double3(*(float3*)buf913); + *(double4*)buf914 = convert_double4(*(float4*)buf915); + *(double2*)buf916 = convert_double2(*(char2*)buf917); + *(double3*)buf918 = convert_double3(*(char3*)buf919); + *(double4*)buf920 = convert_double4(*(char4*)buf921); + *(double2*)buf922 = convert_double2(*(uchar2*)buf923); + *(double3*)buf924 = convert_double3(*(uchar3*)buf925); + *(double4*)buf926 = convert_double4(*(uchar4*)buf927); + *(double2*)buf928 = convert_double2(*(short2*)buf929); + *(double3*)buf930 = convert_double3(*(short3*)buf931); + *(double4*)buf932 = convert_double4(*(short4*)buf933); + *(double2*)buf934 = convert_double2(*(ushort2*)buf935); + *(double3*)buf936 = convert_double3(*(ushort3*)buf937); + *(double4*)buf938 = convert_double4(*(ushort4*)buf939); + *(double2*)buf940 = convert_double2(*(int2*)buf941); + *(double3*)buf942 = convert_double3(*(int3*)buf943); + *(double4*)buf944 = convert_double4(*(int4*)buf945); + *(double2*)buf946 = convert_double2(*(uint2*)buf947); + *(double3*)buf948 = convert_double3(*(uint3*)buf949); + *(double4*)buf950 = convert_double4(*(uint4*)buf951); + *(long2*)buf952 = convert_long2(*(float2*)buf953); + *(long3*)buf954 = convert_long3(*(float3*)buf955); + *(long4*)buf956 = convert_long4(*(float4*)buf957); + *(long2*)buf958 = convert_long2(*(char2*)buf959); + *(long3*)buf960 = convert_long3(*(char3*)buf961); + *(long4*)buf962 = convert_long4(*(char4*)buf963); + *(long2*)buf964 = convert_long2(*(uchar2*)buf965); + *(long3*)buf966 = convert_long3(*(uchar3*)buf967); + *(long4*)buf968 = convert_long4(*(uchar4*)buf969); + *(long2*)buf970 = convert_long2(*(short2*)buf971); + *(long3*)buf972 = convert_long3(*(short3*)buf973); + *(long4*)buf974 = convert_long4(*(short4*)buf975); + *(long2*)buf976 = convert_long2(*(ushort2*)buf977); + *(long3*)buf978 = convert_long3(*(ushort3*)buf979); + *(long4*)buf980 = convert_long4(*(ushort4*)buf981); + *(long2*)buf982 = convert_long2(*(int2*)buf983); + *(long3*)buf984 = convert_long3(*(int3*)buf985); + *(long4*)buf986 = convert_long4(*(int4*)buf987); + *(long2*)buf988 = convert_long2(*(uint2*)buf989); + *(long3*)buf990 = convert_long3(*(uint3*)buf991); + *(long4*)buf992 = convert_long4(*(uint4*)buf993); + *(ulong2*)buf994 = convert_ulong2(*(float2*)buf995); + *(ulong3*)buf996 = convert_ulong3(*(float3*)buf997); + *(ulong4*)buf998 = convert_ulong4(*(float4*)buf999); + *(ulong2*)buf1000 = convert_ulong2(*(char2*)buf1001); + *(ulong3*)buf1002 = convert_ulong3(*(char3*)buf1003); + *(ulong4*)buf1004 = convert_ulong4(*(char4*)buf1005); + *(ulong2*)buf1006 = convert_ulong2(*(uchar2*)buf1007); + *(ulong3*)buf1008 = convert_ulong3(*(uchar3*)buf1009); + *(ulong4*)buf1010 = convert_ulong4(*(uchar4*)buf1011); + *(ulong2*)buf1012 = convert_ulong2(*(short2*)buf1013); + *(ulong3*)buf1014 = convert_ulong3(*(short3*)buf1015); + *(ulong4*)buf1016 = convert_ulong4(*(short4*)buf1017); + *(ulong2*)buf1018 = convert_ulong2(*(ushort2*)buf1019); + *(ulong3*)buf1020 = convert_ulong3(*(ushort3*)buf1021); + *(ulong4*)buf1022 = convert_ulong4(*(ushort4*)buf1023); + *(ulong2*)buf1024 = convert_ulong2(*(int2*)buf1025); + *(ulong3*)buf1026 = convert_ulong3(*(int3*)buf1027); + *(ulong4*)buf1028 = convert_ulong4(*(int4*)buf1029); + *(ulong2*)buf1030 = convert_ulong2(*(uint2*)buf1031); + *(ulong3*)buf1032 = convert_ulong3(*(uint3*)buf1033); + *(ulong4*)buf1034 = convert_ulong4(*(uint4*)buf1035); + *(float*)buf1036 = copysign(*(float*)buf1037, *(float*)buf1038); + *(float2*)buf1039 = copysign(*(float2*)buf1040, *(float2*)buf1041); + *(float3*)buf1042 = copysign(*(float3*)buf1043, *(float3*)buf1044); + *(float4*)buf1045 = copysign(*(float4*)buf1046, *(float4*)buf1047); + *(float*)buf1048 = cos(*(float*)buf1049); + *(float2*)buf1050 = cos(*(float2*)buf1051); + *(float3*)buf1052 = cos(*(float3*)buf1053); + *(float4*)buf1054 = cos(*(float4*)buf1055); + *(float*)buf1056 = cosh(*(float*)buf1057); + *(float2*)buf1058 = cosh(*(float2*)buf1059); + *(float3*)buf1060 = cosh(*(float3*)buf1061); + *(float4*)buf1062 = cosh(*(float4*)buf1063); + *(float*)buf1064 = cospi(*(float*)buf1065); + *(float2*)buf1066 = cospi(*(float2*)buf1067); + *(float3*)buf1068 = cospi(*(float3*)buf1069); + *(float4*)buf1070 = cospi(*(float4*)buf1071); + *(float3*)buf1072 = cross(*(float3*)buf1073, *(float3*)buf1074); + *(float4*)buf1075 = cross(*(float4*)buf1076, *(float4*)buf1077); + *(float*)buf1078 = degrees(*(float*)buf1079); + *(float2*)buf1080 = degrees(*(float2*)buf1081); + *(float3*)buf1082 = degrees(*(float3*)buf1083); + *(float4*)buf1084 = degrees(*(float4*)buf1085); + *(float*)buf1086 = distance(*(float*)buf1087, *(float*)buf1088); + *(float*)buf1089 = distance(*(float2*)buf1090, *(float2*)buf1091); + *(float*)buf1092 = distance(*(float3*)buf1093, *(float3*)buf1094); + *(float*)buf1095 = distance(*(float4*)buf1096, *(float4*)buf1097); + *(float*)buf1098 = dot(*(float*)buf1099, *(float*)buf1100); + *(float*)buf1101 = dot(*(float2*)buf1102, *(float2*)buf1103); + *(float*)buf1104 = dot(*(float3*)buf1105, *(float3*)buf1106); + *(float*)buf1107 = dot(*(float4*)buf1108, *(float4*)buf1109); + *(float*)buf1110 = erf(*(float*)buf1111); + *(float2*)buf1112 = erf(*(float2*)buf1113); + *(float3*)buf1114 = erf(*(float3*)buf1115); + *(float4*)buf1116 = erf(*(float4*)buf1117); + *(float*)buf1118 = erfc(*(float*)buf1119); + *(float2*)buf1120 = erfc(*(float2*)buf1121); + *(float3*)buf1122 = erfc(*(float3*)buf1123); + *(float4*)buf1124 = erfc(*(float4*)buf1125); + *(float*)buf1126 = exp(*(float*)buf1127); + *(float2*)buf1128 = exp(*(float2*)buf1129); + *(float3*)buf1130 = exp(*(float3*)buf1131); + *(float4*)buf1132 = exp(*(float4*)buf1133); + *(float*)buf1134 = exp10(*(float*)buf1135); + *(float2*)buf1136 = exp10(*(float2*)buf1137); + *(float3*)buf1138 = exp10(*(float3*)buf1139); + *(float4*)buf1140 = exp10(*(float4*)buf1141); + *(float*)buf1142 = exp2(*(float*)buf1143); + *(float2*)buf1144 = exp2(*(float2*)buf1145); + *(float3*)buf1146 = exp2(*(float3*)buf1147); + *(float4*)buf1148 = exp2(*(float4*)buf1149); + *(float*)buf1150 = expm1(*(float*)buf1151); + *(float2*)buf1152 = expm1(*(float2*)buf1153); + *(float3*)buf1154 = expm1(*(float3*)buf1155); + *(float4*)buf1156 = expm1(*(float4*)buf1157); + *(float*)buf1158 = fabs(*(float*)buf1159); + *(float2*)buf1160 = fabs(*(float2*)buf1161); + *(float3*)buf1162 = fabs(*(float3*)buf1163); + *(float4*)buf1164 = fabs(*(float4*)buf1165); + *(float*)buf1166 = fast_distance(*(float*)buf1167, *(float*)buf1168); + *(float*)buf1169 = fast_distance(*(float2*)buf1170, *(float2*)buf1171); + *(float*)buf1172 = fast_distance(*(float3*)buf1173, *(float3*)buf1174); + *(float*)buf1175 = fast_distance(*(float4*)buf1176, *(float4*)buf1177); + *(float*)buf1178 = fast_length(*(float*)buf1179); + *(float*)buf1180 = fast_length(*(float2*)buf1181); + *(float*)buf1182 = fast_length(*(float3*)buf1183); + *(float*)buf1184 = fast_length(*(float4*)buf1185); + *(float*)buf1186 = fast_normalize(*(float*)buf1187); + *(float2*)buf1188 = fast_normalize(*(float2*)buf1189); + *(float3*)buf1190 = fast_normalize(*(float3*)buf1191); + *(float4*)buf1192 = fast_normalize(*(float4*)buf1193); + *(float*)buf1194 = fdim(*(float*)buf1195, *(float*)buf1196); + *(float2*)buf1197 = fdim(*(float2*)buf1198, *(float2*)buf1199); + *(float3*)buf1200 = fdim(*(float3*)buf1201, *(float3*)buf1202); + *(float4*)buf1203 = fdim(*(float4*)buf1204, *(float4*)buf1205); + *(float*)buf1206 = floor(*(float*)buf1207); + *(float2*)buf1208 = floor(*(float2*)buf1209); + *(float3*)buf1210 = floor(*(float3*)buf1211); + *(float4*)buf1212 = floor(*(float4*)buf1213); + *(float*)buf1214 = fma(*(float*)buf1215, *(float*)buf1216, *(float*)buf1217); + *(float2*)buf1218 = fma(*(float2*)buf1219, *(float2*)buf1220, *(float2*)buf1221); + *(float3*)buf1222 = fma(*(float3*)buf1223, *(float3*)buf1224, *(float3*)buf1225); + *(float4*)buf1226 = fma(*(float4*)buf1227, *(float4*)buf1228, *(float4*)buf1229); + *(float*)buf1230 = fmax(*(float*)buf1231, *(float*)buf1232); + *(float2*)buf1233 = fmax(*(float2*)buf1234, *(float2*)buf1235); + *(float3*)buf1236 = fmax(*(float3*)buf1237, *(float3*)buf1238); + *(float4*)buf1239 = fmax(*(float4*)buf1240, *(float4*)buf1241); + *(float2*)buf1242 = fmax(*(float2*)buf1243, *(float*)buf1244); + *(float3*)buf1245 = fmax(*(float3*)buf1246, *(float*)buf1247); + *(float4*)buf1248 = fmax(*(float4*)buf1249, *(float*)buf1250); + *(float*)buf1251 = fmin(*(float*)buf1252, *(float*)buf1253); + *(float2*)buf1254 = fmin(*(float2*)buf1255, *(float2*)buf1256); + *(float3*)buf1257 = fmin(*(float3*)buf1258, *(float3*)buf1259); + *(float4*)buf1260 = fmin(*(float4*)buf1261, *(float4*)buf1262); + *(float2*)buf1263 = fmin(*(float2*)buf1264, *(float*)buf1265); + *(float3*)buf1266 = fmin(*(float3*)buf1267, *(float*)buf1268); + *(float4*)buf1269 = fmin(*(float4*)buf1270, *(float*)buf1271); + *(float*)buf1272 = fmod(*(float*)buf1273, *(float*)buf1274); + *(float2*)buf1275 = fmod(*(float2*)buf1276, *(float2*)buf1277); + *(float3*)buf1278 = fmod(*(float3*)buf1279, *(float3*)buf1280); + *(float4*)buf1281 = fmod(*(float4*)buf1282, *(float4*)buf1283); + *(float*)buf1284 = fract(*(float*)buf1285, (float*) buf1286); + *(float2*)buf1287 = fract(*(float2*)buf1288, (float2*) buf1289); + *(float3*)buf1290 = fract(*(float3*)buf1291, (float3*) buf1292); + *(float4*)buf1293 = fract(*(float4*)buf1294, (float4*) buf1295); + *(float*)buf1296 = fract(*(float*)buf1297); + *(float2*)buf1298 = fract(*(float2*)buf1299); + *(float3*)buf1300 = fract(*(float3*)buf1301); + *(float4*)buf1302 = fract(*(float4*)buf1303); + *(float*)buf1304 = frexp(*(float*)buf1305, (int*) buf1306); + *(float2*)buf1307 = frexp(*(float2*)buf1308, (int2*) buf1309); + *(float3*)buf1310 = frexp(*(float3*)buf1311, (int3*) buf1312); + *(float4*)buf1313 = frexp(*(float4*)buf1314, (int4*) buf1315); + *(float*)buf1316 = half_recip(*(float*)buf1317); + *(float2*)buf1318 = half_recip(*(float2*)buf1319); + *(float3*)buf1320 = half_recip(*(float3*)buf1321); + *(float4*)buf1322 = half_recip(*(float4*)buf1323); + *(float*)buf1324 = half_rsqrt(*(float*)buf1325); + *(float2*)buf1326 = half_rsqrt(*(float2*)buf1327); + *(float3*)buf1328 = half_rsqrt(*(float3*)buf1329); + *(float4*)buf1330 = half_rsqrt(*(float4*)buf1331); + *(float*)buf1332 = half_sqrt(*(float*)buf1333); + *(float2*)buf1334 = half_sqrt(*(float2*)buf1335); + *(float3*)buf1336 = half_sqrt(*(float3*)buf1337); + *(float4*)buf1338 = half_sqrt(*(float4*)buf1339); + *(float*)buf1340 = hypot(*(float*)buf1341, *(float*)buf1342); + *(float2*)buf1343 = hypot(*(float2*)buf1344, *(float2*)buf1345); + *(float3*)buf1346 = hypot(*(float3*)buf1347, *(float3*)buf1348); + *(float4*)buf1349 = hypot(*(float4*)buf1350, *(float4*)buf1351); + *(int*)buf1352 = ilogb(*(float*)buf1353); + *(int2*)buf1354 = ilogb(*(float2*)buf1355); + *(int3*)buf1356 = ilogb(*(float3*)buf1357); + *(int4*)buf1358 = ilogb(*(float4*)buf1359); + *(float*)buf1360 = ldexp(*(float*)buf1361, *(int*)buf1362); + *(float2*)buf1363 = ldexp(*(float2*)buf1364, *(int2*)buf1365); + *(float3*)buf1366 = ldexp(*(float3*)buf1367, *(int3*)buf1368); + *(float4*)buf1369 = ldexp(*(float4*)buf1370, *(int4*)buf1371); + *(float2*)buf1372 = ldexp(*(float2*)buf1373, *(int*)buf1374); + *(float3*)buf1375 = ldexp(*(float3*)buf1376, *(int*)buf1377); + *(float4*)buf1378 = ldexp(*(float4*)buf1379, *(int*)buf1380); + *(float*)buf1381 = length(*(float*)buf1382); + *(float*)buf1383 = length(*(float2*)buf1384); + *(float*)buf1385 = length(*(float3*)buf1386); + *(float*)buf1387 = length(*(float4*)buf1388); + *(float*)buf1389 = lgamma(*(float*)buf1390); + *(float2*)buf1391 = lgamma(*(float2*)buf1392); + *(float3*)buf1393 = lgamma(*(float3*)buf1394); + *(float4*)buf1395 = lgamma(*(float4*)buf1396); + *(float*)buf1397 = lgamma(*(float*)buf1398, (int*) buf1399); + *(float2*)buf1400 = lgamma(*(float2*)buf1401, (int2*) buf1402); + *(float3*)buf1403 = lgamma(*(float3*)buf1404, (int3*) buf1405); + *(float4*)buf1406 = lgamma(*(float4*)buf1407, (int4*) buf1408); + *(float*)buf1409 = log(*(float*)buf1410); + *(float2*)buf1411 = log(*(float2*)buf1412); + *(float3*)buf1413 = log(*(float3*)buf1414); + *(float4*)buf1415 = log(*(float4*)buf1416); + *(float*)buf1417 = log10(*(float*)buf1418); + *(float2*)buf1419 = log10(*(float2*)buf1420); + *(float3*)buf1421 = log10(*(float3*)buf1422); + *(float4*)buf1423 = log10(*(float4*)buf1424); + *(float*)buf1425 = log1p(*(float*)buf1426); + *(float2*)buf1427 = log1p(*(float2*)buf1428); + *(float3*)buf1429 = log1p(*(float3*)buf1430); + *(float4*)buf1431 = log1p(*(float4*)buf1432); + *(float*)buf1433 = log2(*(float*)buf1434); + *(float2*)buf1435 = log2(*(float2*)buf1436); + *(float3*)buf1437 = log2(*(float3*)buf1438); + *(float4*)buf1439 = log2(*(float4*)buf1440); + *(float*)buf1441 = logb(*(float*)buf1442); + *(float2*)buf1443 = logb(*(float2*)buf1444); + *(float3*)buf1445 = logb(*(float3*)buf1446); + *(float4*)buf1447 = logb(*(float4*)buf1448); + *(float*)buf1449 = mad(*(float*)buf1450, *(float*)buf1451, *(float*)buf1452); + *(float2*)buf1453 = mad(*(float2*)buf1454, *(float2*)buf1455, *(float2*)buf1456); + *(float3*)buf1457 = mad(*(float3*)buf1458, *(float3*)buf1459, *(float3*)buf1460); + *(float4*)buf1461 = mad(*(float4*)buf1462, *(float4*)buf1463, *(float4*)buf1464); + *(float*)buf1465 = max(*(float*)buf1466, *(float*)buf1467); + *(float2*)buf1468 = max(*(float2*)buf1469, *(float2*)buf1470); + *(float3*)buf1471 = max(*(float3*)buf1472, *(float3*)buf1473); + *(float4*)buf1474 = max(*(float4*)buf1475, *(float4*)buf1476); + *(float2*)buf1477 = max(*(float2*)buf1478, *(float*)buf1479); + *(float3*)buf1480 = max(*(float3*)buf1481, *(float*)buf1482); + *(float4*)buf1483 = max(*(float4*)buf1484, *(float*)buf1485); + *(char*)buf1486 = max(*(char*)buf1487, *(char*)buf1488); + *(char2*)buf1489 = max(*(char2*)buf1490, *(char2*)buf1491); + *(char3*)buf1492 = max(*(char3*)buf1493, *(char3*)buf1494); + *(char4*)buf1495 = max(*(char4*)buf1496, *(char4*)buf1497); + *(uchar*)buf1498 = max(*(uchar*)buf1499, *(uchar*)buf1500); + *(uchar2*)buf1501 = max(*(uchar2*)buf1502, *(uchar2*)buf1503); + *(uchar3*)buf1504 = max(*(uchar3*)buf1505, *(uchar3*)buf1506); + *(uchar4*)buf1507 = max(*(uchar4*)buf1508, *(uchar4*)buf1509); + *(short*)buf1510 = max(*(short*)buf1511, *(short*)buf1512); + *(short2*)buf1513 = max(*(short2*)buf1514, *(short2*)buf1515); + *(short3*)buf1516 = max(*(short3*)buf1517, *(short3*)buf1518); + *(short4*)buf1519 = max(*(short4*)buf1520, *(short4*)buf1521); + *(ushort*)buf1522 = max(*(ushort*)buf1523, *(ushort*)buf1524); + *(ushort2*)buf1525 = max(*(ushort2*)buf1526, *(ushort2*)buf1527); + *(ushort3*)buf1528 = max(*(ushort3*)buf1529, *(ushort3*)buf1530); + *(ushort4*)buf1531 = max(*(ushort4*)buf1532, *(ushort4*)buf1533); + *(int*)buf1534 = max(*(int*)buf1535, *(int*)buf1536); + *(int2*)buf1537 = max(*(int2*)buf1538, *(int2*)buf1539); + *(int3*)buf1540 = max(*(int3*)buf1541, *(int3*)buf1542); + *(int4*)buf1543 = max(*(int4*)buf1544, *(int4*)buf1545); + *(uint*)buf1546 = max(*(uint*)buf1547, *(uint*)buf1548); + *(uint2*)buf1549 = max(*(uint2*)buf1550, *(uint2*)buf1551); + *(uint3*)buf1552 = max(*(uint3*)buf1553, *(uint3*)buf1554); + *(uint4*)buf1555 = max(*(uint4*)buf1556, *(uint4*)buf1557); + *(long*)buf1558 = max(*(long*)buf1559, *(long*)buf1560); + *(long2*)buf1561 = max(*(long2*)buf1562, *(long2*)buf1563); + *(long3*)buf1564 = max(*(long3*)buf1565, *(long3*)buf1566); + *(long4*)buf1567 = max(*(long4*)buf1568, *(long4*)buf1569); + *(ulong*)buf1570 = max(*(ulong*)buf1571, *(ulong*)buf1572); + *(ulong2*)buf1573 = max(*(ulong2*)buf1574, *(ulong2*)buf1575); + *(ulong3*)buf1576 = max(*(ulong3*)buf1577, *(ulong3*)buf1578); + *(ulong4*)buf1579 = max(*(ulong4*)buf1580, *(ulong4*)buf1581); + *(float*)buf1582 = min(*(float*)buf1583, *(float*)buf1584); + *(float2*)buf1585 = min(*(float2*)buf1586, *(float2*)buf1587); + *(float3*)buf1588 = min(*(float3*)buf1589, *(float3*)buf1590); + *(float4*)buf1591 = min(*(float4*)buf1592, *(float4*)buf1593); + *(float2*)buf1594 = min(*(float2*)buf1595, *(float*)buf1596); + *(float3*)buf1597 = min(*(float3*)buf1598, *(float*)buf1599); + *(float4*)buf1600 = min(*(float4*)buf1601, *(float*)buf1602); + *(char*)buf1603 = min(*(char*)buf1604, *(char*)buf1605); + *(char2*)buf1606 = min(*(char2*)buf1607, *(char2*)buf1608); + *(char3*)buf1609 = min(*(char3*)buf1610, *(char3*)buf1611); + *(char4*)buf1612 = min(*(char4*)buf1613, *(char4*)buf1614); + *(uchar*)buf1615 = min(*(uchar*)buf1616, *(uchar*)buf1617); + *(uchar2*)buf1618 = min(*(uchar2*)buf1619, *(uchar2*)buf1620); + *(uchar3*)buf1621 = min(*(uchar3*)buf1622, *(uchar3*)buf1623); + *(uchar4*)buf1624 = min(*(uchar4*)buf1625, *(uchar4*)buf1626); + *(short*)buf1627 = min(*(short*)buf1628, *(short*)buf1629); + *(short2*)buf1630 = min(*(short2*)buf1631, *(short2*)buf1632); + *(short3*)buf1633 = min(*(short3*)buf1634, *(short3*)buf1635); + *(short4*)buf1636 = min(*(short4*)buf1637, *(short4*)buf1638); + *(ushort*)buf1639 = min(*(ushort*)buf1640, *(ushort*)buf1641); + *(ushort2*)buf1642 = min(*(ushort2*)buf1643, *(ushort2*)buf1644); + *(ushort3*)buf1645 = min(*(ushort3*)buf1646, *(ushort3*)buf1647); + *(ushort4*)buf1648 = min(*(ushort4*)buf1649, *(ushort4*)buf1650); + *(int*)buf1651 = min(*(int*)buf1652, *(int*)buf1653); + *(int2*)buf1654 = min(*(int2*)buf1655, *(int2*)buf1656); + *(int3*)buf1657 = min(*(int3*)buf1658, *(int3*)buf1659); + *(int4*)buf1660 = min(*(int4*)buf1661, *(int4*)buf1662); + *(uint*)buf1663 = min(*(uint*)buf1664, *(uint*)buf1665); + *(uint2*)buf1666 = min(*(uint2*)buf1667, *(uint2*)buf1668); + *(uint3*)buf1669 = min(*(uint3*)buf1670, *(uint3*)buf1671); + *(uint4*)buf1672 = min(*(uint4*)buf1673, *(uint4*)buf1674); + *(long*)buf1675 = min(*(long*)buf1676, *(long*)buf1677); + *(long2*)buf1678 = min(*(long2*)buf1679, *(long2*)buf1680); + *(long3*)buf1681 = min(*(long3*)buf1682, *(long3*)buf1683); + *(long4*)buf1684 = min(*(long4*)buf1685, *(long4*)buf1686); + *(ulong*)buf1687 = min(*(ulong*)buf1688, *(ulong*)buf1689); + *(ulong2*)buf1690 = min(*(ulong2*)buf1691, *(ulong2*)buf1692); + *(ulong3*)buf1693 = min(*(ulong3*)buf1694, *(ulong3*)buf1695); + *(ulong4*)buf1696 = min(*(ulong4*)buf1697, *(ulong4*)buf1698); + *(float*)buf1699 = mix(*(float*)buf1700, *(float*)buf1701, *(float*)buf1702); + *(float2*)buf1703 = mix(*(float2*)buf1704, *(float2*)buf1705, *(float2*)buf1706); + *(float3*)buf1707 = mix(*(float3*)buf1708, *(float3*)buf1709, *(float3*)buf1710); + *(float4*)buf1711 = mix(*(float4*)buf1712, *(float4*)buf1713, *(float4*)buf1714); + *(float2*)buf1715 = mix(*(float2*)buf1716, *(float2*)buf1717, *(float*)buf1718); + *(float3*)buf1719 = mix(*(float3*)buf1720, *(float3*)buf1721, *(float*)buf1722); + *(float4*)buf1723 = mix(*(float4*)buf1724, *(float4*)buf1725, *(float*)buf1726); + *(float*)buf1727 = modf(*(float*)buf1728, (float*) buf1729); + *(float2*)buf1730 = modf(*(float2*)buf1731, (float2*) buf1732); + *(float3*)buf1733 = modf(*(float3*)buf1734, (float3*) buf1735); + *(float4*)buf1736 = modf(*(float4*)buf1737, (float4*) buf1738); + *(float*)buf1739 = nan(*(uint*)buf1740); + *(float*)buf1741 = native_acos(*(float*)buf1742); + *(float2*)buf1743 = native_acos(*(float2*)buf1744); + *(float3*)buf1745 = native_acos(*(float3*)buf1746); + *(float4*)buf1747 = native_acos(*(float4*)buf1748); + *(float*)buf1749 = native_acosh(*(float*)buf1750); + *(float2*)buf1751 = native_acosh(*(float2*)buf1752); + *(float3*)buf1753 = native_acosh(*(float3*)buf1754); + *(float4*)buf1755 = native_acosh(*(float4*)buf1756); + *(float*)buf1757 = native_acospi(*(float*)buf1758); + *(float2*)buf1759 = native_acospi(*(float2*)buf1760); + *(float3*)buf1761 = native_acospi(*(float3*)buf1762); + *(float4*)buf1763 = native_acospi(*(float4*)buf1764); + *(float*)buf1765 = native_asin(*(float*)buf1766); + *(float2*)buf1767 = native_asin(*(float2*)buf1768); + *(float3*)buf1769 = native_asin(*(float3*)buf1770); + *(float4*)buf1771 = native_asin(*(float4*)buf1772); + *(float*)buf1773 = native_asinh(*(float*)buf1774); + *(float2*)buf1775 = native_asinh(*(float2*)buf1776); + *(float3*)buf1777 = native_asinh(*(float3*)buf1778); + *(float4*)buf1779 = native_asinh(*(float4*)buf1780); + *(float*)buf1781 = native_asinpi(*(float*)buf1782); + *(float2*)buf1783 = native_asinpi(*(float2*)buf1784); + *(float3*)buf1785 = native_asinpi(*(float3*)buf1786); + *(float4*)buf1787 = native_asinpi(*(float4*)buf1788); + *(float*)buf1789 = native_atan(*(float*)buf1790); + *(float2*)buf1791 = native_atan(*(float2*)buf1792); + *(float3*)buf1793 = native_atan(*(float3*)buf1794); + *(float4*)buf1795 = native_atan(*(float4*)buf1796); + *(float*)buf1797 = native_atan2(*(float*)buf1798, *(float*)buf1799); + *(float2*)buf1800 = native_atan2(*(float2*)buf1801, *(float2*)buf1802); + *(float3*)buf1803 = native_atan2(*(float3*)buf1804, *(float3*)buf1805); + *(float4*)buf1806 = native_atan2(*(float4*)buf1807, *(float4*)buf1808); + *(float*)buf1809 = native_atan2pi(*(float*)buf1810, *(float*)buf1811); + *(float2*)buf1812 = native_atan2pi(*(float2*)buf1813, *(float2*)buf1814); + *(float3*)buf1815 = native_atan2pi(*(float3*)buf1816, *(float3*)buf1817); + *(float4*)buf1818 = native_atan2pi(*(float4*)buf1819, *(float4*)buf1820); + *(float*)buf1821 = native_atanh(*(float*)buf1822); + *(float2*)buf1823 = native_atanh(*(float2*)buf1824); + *(float3*)buf1825 = native_atanh(*(float3*)buf1826); + *(float4*)buf1827 = native_atanh(*(float4*)buf1828); + *(float*)buf1829 = native_atanpi(*(float*)buf1830); + *(float2*)buf1831 = native_atanpi(*(float2*)buf1832); + *(float3*)buf1833 = native_atanpi(*(float3*)buf1834); + *(float4*)buf1835 = native_atanpi(*(float4*)buf1836); + *(float*)buf1837 = native_cbrt(*(float*)buf1838); + *(float2*)buf1839 = native_cbrt(*(float2*)buf1840); + *(float3*)buf1841 = native_cbrt(*(float3*)buf1842); + *(float4*)buf1843 = native_cbrt(*(float4*)buf1844); + *(float*)buf1845 = native_cos(*(float*)buf1846); + *(float2*)buf1847 = native_cos(*(float2*)buf1848); + *(float3*)buf1849 = native_cos(*(float3*)buf1850); + *(float4*)buf1851 = native_cos(*(float4*)buf1852); + *(float*)buf1853 = native_cosh(*(float*)buf1854); + *(float2*)buf1855 = native_cosh(*(float2*)buf1856); + *(float3*)buf1857 = native_cosh(*(float3*)buf1858); + *(float4*)buf1859 = native_cosh(*(float4*)buf1860); + *(float*)buf1861 = native_cospi(*(float*)buf1862); + *(float2*)buf1863 = native_cospi(*(float2*)buf1864); + *(float3*)buf1865 = native_cospi(*(float3*)buf1866); + *(float4*)buf1867 = native_cospi(*(float4*)buf1868); + *(float*)buf1869 = native_distance(*(float*)buf1870, *(float*)buf1871); + *(float*)buf1872 = native_distance(*(float2*)buf1873, *(float2*)buf1874); + *(float*)buf1875 = native_distance(*(float3*)buf1876, *(float3*)buf1877); + *(float*)buf1878 = native_distance(*(float4*)buf1879, *(float4*)buf1880); + *(float*)buf1881 = native_divide(*(float*)buf1882, *(float*)buf1883); + *(float2*)buf1884 = native_divide(*(float2*)buf1885, *(float2*)buf1886); + *(float3*)buf1887 = native_divide(*(float3*)buf1888, *(float3*)buf1889); + *(float4*)buf1890 = native_divide(*(float4*)buf1891, *(float4*)buf1892); + *(float*)buf1893 = native_exp(*(float*)buf1894); + *(float2*)buf1895 = native_exp(*(float2*)buf1896); + *(float3*)buf1897 = native_exp(*(float3*)buf1898); + *(float4*)buf1899 = native_exp(*(float4*)buf1900); + *(float*)buf1901 = native_exp10(*(float*)buf1902); + *(float2*)buf1903 = native_exp10(*(float2*)buf1904); + *(float3*)buf1905 = native_exp10(*(float3*)buf1906); + *(float4*)buf1907 = native_exp10(*(float4*)buf1908); + *(float*)buf1909 = native_exp2(*(float*)buf1910); + *(float2*)buf1911 = native_exp2(*(float2*)buf1912); + *(float3*)buf1913 = native_exp2(*(float3*)buf1914); + *(float4*)buf1915 = native_exp2(*(float4*)buf1916); + *(float*)buf1917 = native_expm1(*(float*)buf1918); + *(float2*)buf1919 = native_expm1(*(float2*)buf1920); + *(float3*)buf1921 = native_expm1(*(float3*)buf1922); + *(float4*)buf1923 = native_expm1(*(float4*)buf1924); + *(float*)buf1925 = native_hypot(*(float*)buf1926, *(float*)buf1927); + *(float2*)buf1928 = native_hypot(*(float2*)buf1929, *(float2*)buf1930); + *(float3*)buf1931 = native_hypot(*(float3*)buf1932, *(float3*)buf1933); + *(float4*)buf1934 = native_hypot(*(float4*)buf1935, *(float4*)buf1936); + *(float*)buf1937 = native_length(*(float*)buf1938); + *(float*)buf1939 = native_length(*(float2*)buf1940); + *(float*)buf1941 = native_length(*(float3*)buf1942); + *(float*)buf1943 = native_length(*(float4*)buf1944); + *(float*)buf1945 = native_log(*(float*)buf1946); + *(float2*)buf1947 = native_log(*(float2*)buf1948); + *(float3*)buf1949 = native_log(*(float3*)buf1950); + *(float4*)buf1951 = native_log(*(float4*)buf1952); + *(float*)buf1953 = native_log10(*(float*)buf1954); + *(float2*)buf1955 = native_log10(*(float2*)buf1956); + *(float3*)buf1957 = native_log10(*(float3*)buf1958); + *(float4*)buf1959 = native_log10(*(float4*)buf1960); + *(float*)buf1961 = native_log1p(*(float*)buf1962); + *(float2*)buf1963 = native_log1p(*(float2*)buf1964); + *(float3*)buf1965 = native_log1p(*(float3*)buf1966); + *(float4*)buf1967 = native_log1p(*(float4*)buf1968); + *(float*)buf1969 = native_log2(*(float*)buf1970); + *(float2*)buf1971 = native_log2(*(float2*)buf1972); + *(float3*)buf1973 = native_log2(*(float3*)buf1974); + *(float4*)buf1975 = native_log2(*(float4*)buf1976); + *(float*)buf1977 = native_normalize(*(float*)buf1978); + *(float2*)buf1979 = native_normalize(*(float2*)buf1980); + *(float3*)buf1981 = native_normalize(*(float3*)buf1982); + *(float4*)buf1983 = native_normalize(*(float4*)buf1984); + *(float*)buf1985 = native_powr(*(float*)buf1986, *(float*)buf1987); + *(float2*)buf1988 = native_powr(*(float2*)buf1989, *(float2*)buf1990); + *(float3*)buf1991 = native_powr(*(float3*)buf1992, *(float3*)buf1993); + *(float4*)buf1994 = native_powr(*(float4*)buf1995, *(float4*)buf1996); + *(float*)buf1997 = native_recip(*(float*)buf1998); + *(float2*)buf1999 = native_recip(*(float2*)buf2000); + *(float3*)buf2001 = native_recip(*(float3*)buf2002); + *(float4*)buf2003 = native_recip(*(float4*)buf2004); + *(float*)buf2005 = native_rootn(*(float*)buf2006, *(int*)buf2007); + *(float2*)buf2008 = native_rootn(*(float2*)buf2009, *(int2*)buf2010); + *(float3*)buf2011 = native_rootn(*(float3*)buf2012, *(int3*)buf2013); + *(float4*)buf2014 = native_rootn(*(float4*)buf2015, *(int4*)buf2016); + *(float*)buf2017 = native_rsqrt(*(float*)buf2018); + *(float2*)buf2019 = native_rsqrt(*(float2*)buf2020); + *(float3*)buf2021 = native_rsqrt(*(float3*)buf2022); + *(float4*)buf2023 = native_rsqrt(*(float4*)buf2024); + *(float*)buf2025 = native_sin(*(float*)buf2026); + *(float2*)buf2027 = native_sin(*(float2*)buf2028); + *(float3*)buf2029 = native_sin(*(float3*)buf2030); + *(float4*)buf2031 = native_sin(*(float4*)buf2032); + *(float*)buf2033 = native_sincos(*(float*)buf2034, (float*) buf2035); + *(float2*)buf2036 = native_sincos(*(float2*)buf2037, (float2*) buf2038); + *(float3*)buf2039 = native_sincos(*(float3*)buf2040, (float3*) buf2041); + *(float4*)buf2042 = native_sincos(*(float4*)buf2043, (float4*) buf2044); + *(float*)buf2045 = native_sinh(*(float*)buf2046); + *(float2*)buf2047 = native_sinh(*(float2*)buf2048); + *(float3*)buf2049 = native_sinh(*(float3*)buf2050); + *(float4*)buf2051 = native_sinh(*(float4*)buf2052); + *(float*)buf2053 = native_sinpi(*(float*)buf2054); + *(float2*)buf2055 = native_sinpi(*(float2*)buf2056); + *(float3*)buf2057 = native_sinpi(*(float3*)buf2058); + *(float4*)buf2059 = native_sinpi(*(float4*)buf2060); + *(float*)buf2061 = native_sqrt(*(float*)buf2062); + *(float2*)buf2063 = native_sqrt(*(float2*)buf2064); + *(float3*)buf2065 = native_sqrt(*(float3*)buf2066); + *(float4*)buf2067 = native_sqrt(*(float4*)buf2068); + *(float*)buf2069 = native_tan(*(float*)buf2070); + *(float2*)buf2071 = native_tan(*(float2*)buf2072); + *(float3*)buf2073 = native_tan(*(float3*)buf2074); + *(float4*)buf2075 = native_tan(*(float4*)buf2076); + *(float*)buf2077 = native_tanh(*(float*)buf2078); + *(float2*)buf2079 = native_tanh(*(float2*)buf2080); + *(float3*)buf2081 = native_tanh(*(float3*)buf2082); + *(float4*)buf2083 = native_tanh(*(float4*)buf2084); + *(float*)buf2085 = native_tanpi(*(float*)buf2086); + *(float2*)buf2087 = native_tanpi(*(float2*)buf2088); + *(float3*)buf2089 = native_tanpi(*(float3*)buf2090); + *(float4*)buf2091 = native_tanpi(*(float4*)buf2092); + *(float*)buf2093 = nextafter(*(float*)buf2094, *(float*)buf2095); + *(float2*)buf2096 = nextafter(*(float2*)buf2097, *(float2*)buf2098); + *(float3*)buf2099 = nextafter(*(float3*)buf2100, *(float3*)buf2101); + *(float4*)buf2102 = nextafter(*(float4*)buf2103, *(float4*)buf2104); + *(float*)buf2105 = normalize(*(float*)buf2106); + *(float2*)buf2107 = normalize(*(float2*)buf2108); + *(float3*)buf2109 = normalize(*(float3*)buf2110); + *(float4*)buf2111 = normalize(*(float4*)buf2112); + *(float*)buf2113 = pow(*(float*)buf2114, *(float*)buf2115); + *(float2*)buf2116 = pow(*(float2*)buf2117, *(float2*)buf2118); + *(float3*)buf2119 = pow(*(float3*)buf2120, *(float3*)buf2121); + *(float4*)buf2122 = pow(*(float4*)buf2123, *(float4*)buf2124); + *(float*)buf2125 = pown(*(float*)buf2126, *(int*)buf2127); + *(float2*)buf2128 = pown(*(float2*)buf2129, *(int2*)buf2130); + *(float3*)buf2131 = pown(*(float3*)buf2132, *(int3*)buf2133); + *(float4*)buf2134 = pown(*(float4*)buf2135, *(int4*)buf2136); + *(float*)buf2137 = powr(*(float*)buf2138, *(float*)buf2139); + *(float2*)buf2140 = powr(*(float2*)buf2141, *(float2*)buf2142); + *(float3*)buf2143 = powr(*(float3*)buf2144, *(float3*)buf2145); + *(float4*)buf2146 = powr(*(float4*)buf2147, *(float4*)buf2148); + *(float*)buf2149 = radians(*(float*)buf2150); + *(float2*)buf2151 = radians(*(float2*)buf2152); + *(float3*)buf2153 = radians(*(float3*)buf2154); + *(float4*)buf2155 = radians(*(float4*)buf2156); + *(float*)buf2157 = remainder(*(float*)buf2158, *(float*)buf2159); + *(float2*)buf2160 = remainder(*(float2*)buf2161, *(float2*)buf2162); + *(float3*)buf2163 = remainder(*(float3*)buf2164, *(float3*)buf2165); + *(float4*)buf2166 = remainder(*(float4*)buf2167, *(float4*)buf2168); + *(float*)buf2169 = remquo(*(float*)buf2170, *(float*)buf2171, (int*) buf2172); + *(float2*)buf2173 = remquo(*(float2*)buf2174, *(float2*)buf2175, (int2*) buf2176); + *(float3*)buf2177 = remquo(*(float3*)buf2178, *(float3*)buf2179, (int3*) buf2180); + *(float4*)buf2181 = remquo(*(float4*)buf2182, *(float4*)buf2183, (int4*) buf2184); + *(float*)buf2185 = rint(*(float*)buf2186); + *(float2*)buf2187 = rint(*(float2*)buf2188); + *(float3*)buf2189 = rint(*(float3*)buf2190); + *(float4*)buf2191 = rint(*(float4*)buf2192); + *(float*)buf2193 = rootn(*(float*)buf2194, *(int*)buf2195); + *(float2*)buf2196 = rootn(*(float2*)buf2197, *(int2*)buf2198); + *(float3*)buf2199 = rootn(*(float3*)buf2200, *(int3*)buf2201); + *(float4*)buf2202 = rootn(*(float4*)buf2203, *(int4*)buf2204); + *(float*)buf2205 = round(*(float*)buf2206); + *(float2*)buf2207 = round(*(float2*)buf2208); + *(float3*)buf2209 = round(*(float3*)buf2210); + *(float4*)buf2211 = round(*(float4*)buf2212); + rsAllocationCopy1DRange(*(rs_allocation*)buf2213, *(uint32_t*)buf2214, *(uint32_t*)buf2215, *(uint32_t*)buf2216, *(rs_allocation*)buf2217, *(uint32_t*)buf2218, *(uint32_t*)buf2219); + rsAllocationCopy2DRange(*(rs_allocation*)buf2220, *(uint32_t*)buf2221, *(uint32_t*)buf2222, *(uint32_t*)buf2223, *(rs_allocation_cubemap_face*)buf2224, *(uint32_t*)buf2225, *(uint32_t*)buf2226, *(rs_allocation*)buf2227, *(uint32_t*)buf2228, *(uint32_t*)buf2229, *(uint32_t*)buf2230, *(rs_allocation_cubemap_face*)buf2231); + *(uint32_t*)buf2232 = rsAllocationGetDimFaces(*(rs_allocation*)buf2233); + *(uint32_t*)buf2234 = rsAllocationGetDimLOD(*(rs_allocation*)buf2235); + *(uint32_t*)buf2236 = rsAllocationGetDimX(*(rs_allocation*)buf2237); + *(uint32_t*)buf2238 = rsAllocationGetDimY(*(rs_allocation*)buf2239); + *(uint32_t*)buf2240 = rsAllocationGetDimZ(*(rs_allocation*)buf2241); + *(rs_element*)buf2242 = rsAllocationGetElement(*(rs_allocation*)buf2243); + rsAllocationIoReceive(*(rs_allocation*)buf2244); + rsAllocationIoSend(*(rs_allocation*)buf2245); + *(float2*)buf2246 = rsAllocationVLoadX_float2(*(rs_allocation*)buf2247, *(uint32_t*)buf2248); + *(float3*)buf2249 = rsAllocationVLoadX_float3(*(rs_allocation*)buf2250, *(uint32_t*)buf2251); + *(float4*)buf2252 = rsAllocationVLoadX_float4(*(rs_allocation*)buf2253, *(uint32_t*)buf2254); + *(double2*)buf2255 = rsAllocationVLoadX_double2(*(rs_allocation*)buf2256, *(uint32_t*)buf2257); + *(double3*)buf2258 = rsAllocationVLoadX_double3(*(rs_allocation*)buf2259, *(uint32_t*)buf2260); + *(double4*)buf2261 = rsAllocationVLoadX_double4(*(rs_allocation*)buf2262, *(uint32_t*)buf2263); + *(char2*)buf2264 = rsAllocationVLoadX_char2(*(rs_allocation*)buf2265, *(uint32_t*)buf2266); + *(char3*)buf2267 = rsAllocationVLoadX_char3(*(rs_allocation*)buf2268, *(uint32_t*)buf2269); + *(char4*)buf2270 = rsAllocationVLoadX_char4(*(rs_allocation*)buf2271, *(uint32_t*)buf2272); + *(uchar2*)buf2273 = rsAllocationVLoadX_uchar2(*(rs_allocation*)buf2274, *(uint32_t*)buf2275); + *(uchar3*)buf2276 = rsAllocationVLoadX_uchar3(*(rs_allocation*)buf2277, *(uint32_t*)buf2278); + *(uchar4*)buf2279 = rsAllocationVLoadX_uchar4(*(rs_allocation*)buf2280, *(uint32_t*)buf2281); + *(short2*)buf2282 = rsAllocationVLoadX_short2(*(rs_allocation*)buf2283, *(uint32_t*)buf2284); + *(short3*)buf2285 = rsAllocationVLoadX_short3(*(rs_allocation*)buf2286, *(uint32_t*)buf2287); + *(short4*)buf2288 = rsAllocationVLoadX_short4(*(rs_allocation*)buf2289, *(uint32_t*)buf2290); + *(ushort2*)buf2291 = rsAllocationVLoadX_ushort2(*(rs_allocation*)buf2292, *(uint32_t*)buf2293); + *(ushort3*)buf2294 = rsAllocationVLoadX_ushort3(*(rs_allocation*)buf2295, *(uint32_t*)buf2296); + *(ushort4*)buf2297 = rsAllocationVLoadX_ushort4(*(rs_allocation*)buf2298, *(uint32_t*)buf2299); + *(int2*)buf2300 = rsAllocationVLoadX_int2(*(rs_allocation*)buf2301, *(uint32_t*)buf2302); + *(int3*)buf2303 = rsAllocationVLoadX_int3(*(rs_allocation*)buf2304, *(uint32_t*)buf2305); + *(int4*)buf2306 = rsAllocationVLoadX_int4(*(rs_allocation*)buf2307, *(uint32_t*)buf2308); + *(uint2*)buf2309 = rsAllocationVLoadX_uint2(*(rs_allocation*)buf2310, *(uint32_t*)buf2311); + *(uint3*)buf2312 = rsAllocationVLoadX_uint3(*(rs_allocation*)buf2313, *(uint32_t*)buf2314); + *(uint4*)buf2315 = rsAllocationVLoadX_uint4(*(rs_allocation*)buf2316, *(uint32_t*)buf2317); + *(long2*)buf2318 = rsAllocationVLoadX_long2(*(rs_allocation*)buf2319, *(uint32_t*)buf2320); + *(long3*)buf2321 = rsAllocationVLoadX_long3(*(rs_allocation*)buf2322, *(uint32_t*)buf2323); + *(long4*)buf2324 = rsAllocationVLoadX_long4(*(rs_allocation*)buf2325, *(uint32_t*)buf2326); + *(ulong2*)buf2327 = rsAllocationVLoadX_ulong2(*(rs_allocation*)buf2328, *(uint32_t*)buf2329); + *(ulong3*)buf2330 = rsAllocationVLoadX_ulong3(*(rs_allocation*)buf2331, *(uint32_t*)buf2332); + *(ulong4*)buf2333 = rsAllocationVLoadX_ulong4(*(rs_allocation*)buf2334, *(uint32_t*)buf2335); + *(float2*)buf2336 = rsAllocationVLoadX_float2(*(rs_allocation*)buf2337, *(uint32_t*)buf2338, *(uint32_t*)buf2339); + *(float3*)buf2340 = rsAllocationVLoadX_float3(*(rs_allocation*)buf2341, *(uint32_t*)buf2342, *(uint32_t*)buf2343); + *(float4*)buf2344 = rsAllocationVLoadX_float4(*(rs_allocation*)buf2345, *(uint32_t*)buf2346, *(uint32_t*)buf2347); + *(double2*)buf2348 = rsAllocationVLoadX_double2(*(rs_allocation*)buf2349, *(uint32_t*)buf2350, *(uint32_t*)buf2351); + *(double3*)buf2352 = rsAllocationVLoadX_double3(*(rs_allocation*)buf2353, *(uint32_t*)buf2354, *(uint32_t*)buf2355); + *(double4*)buf2356 = rsAllocationVLoadX_double4(*(rs_allocation*)buf2357, *(uint32_t*)buf2358, *(uint32_t*)buf2359); + *(char2*)buf2360 = rsAllocationVLoadX_char2(*(rs_allocation*)buf2361, *(uint32_t*)buf2362, *(uint32_t*)buf2363); + *(char3*)buf2364 = rsAllocationVLoadX_char3(*(rs_allocation*)buf2365, *(uint32_t*)buf2366, *(uint32_t*)buf2367); + *(char4*)buf2368 = rsAllocationVLoadX_char4(*(rs_allocation*)buf2369, *(uint32_t*)buf2370, *(uint32_t*)buf2371); + *(uchar2*)buf2372 = rsAllocationVLoadX_uchar2(*(rs_allocation*)buf2373, *(uint32_t*)buf2374, *(uint32_t*)buf2375); + *(uchar3*)buf2376 = rsAllocationVLoadX_uchar3(*(rs_allocation*)buf2377, *(uint32_t*)buf2378, *(uint32_t*)buf2379); + *(uchar4*)buf2380 = rsAllocationVLoadX_uchar4(*(rs_allocation*)buf2381, *(uint32_t*)buf2382, *(uint32_t*)buf2383); + *(short2*)buf2384 = rsAllocationVLoadX_short2(*(rs_allocation*)buf2385, *(uint32_t*)buf2386, *(uint32_t*)buf2387); + *(short3*)buf2388 = rsAllocationVLoadX_short3(*(rs_allocation*)buf2389, *(uint32_t*)buf2390, *(uint32_t*)buf2391); + *(short4*)buf2392 = rsAllocationVLoadX_short4(*(rs_allocation*)buf2393, *(uint32_t*)buf2394, *(uint32_t*)buf2395); + *(ushort2*)buf2396 = rsAllocationVLoadX_ushort2(*(rs_allocation*)buf2397, *(uint32_t*)buf2398, *(uint32_t*)buf2399); + *(ushort3*)buf2400 = rsAllocationVLoadX_ushort3(*(rs_allocation*)buf2401, *(uint32_t*)buf2402, *(uint32_t*)buf2403); + *(ushort4*)buf2404 = rsAllocationVLoadX_ushort4(*(rs_allocation*)buf2405, *(uint32_t*)buf2406, *(uint32_t*)buf2407); + *(int2*)buf2408 = rsAllocationVLoadX_int2(*(rs_allocation*)buf2409, *(uint32_t*)buf2410, *(uint32_t*)buf2411); + *(int3*)buf2412 = rsAllocationVLoadX_int3(*(rs_allocation*)buf2413, *(uint32_t*)buf2414, *(uint32_t*)buf2415); + *(int4*)buf2416 = rsAllocationVLoadX_int4(*(rs_allocation*)buf2417, *(uint32_t*)buf2418, *(uint32_t*)buf2419); + *(uint2*)buf2420 = rsAllocationVLoadX_uint2(*(rs_allocation*)buf2421, *(uint32_t*)buf2422, *(uint32_t*)buf2423); + *(uint3*)buf2424 = rsAllocationVLoadX_uint3(*(rs_allocation*)buf2425, *(uint32_t*)buf2426, *(uint32_t*)buf2427); + *(uint4*)buf2428 = rsAllocationVLoadX_uint4(*(rs_allocation*)buf2429, *(uint32_t*)buf2430, *(uint32_t*)buf2431); + *(long2*)buf2432 = rsAllocationVLoadX_long2(*(rs_allocation*)buf2433, *(uint32_t*)buf2434, *(uint32_t*)buf2435); + *(long3*)buf2436 = rsAllocationVLoadX_long3(*(rs_allocation*)buf2437, *(uint32_t*)buf2438, *(uint32_t*)buf2439); + *(long4*)buf2440 = rsAllocationVLoadX_long4(*(rs_allocation*)buf2441, *(uint32_t*)buf2442, *(uint32_t*)buf2443); + *(ulong2*)buf2444 = rsAllocationVLoadX_ulong2(*(rs_allocation*)buf2445, *(uint32_t*)buf2446, *(uint32_t*)buf2447); + *(ulong3*)buf2448 = rsAllocationVLoadX_ulong3(*(rs_allocation*)buf2449, *(uint32_t*)buf2450, *(uint32_t*)buf2451); + *(ulong4*)buf2452 = rsAllocationVLoadX_ulong4(*(rs_allocation*)buf2453, *(uint32_t*)buf2454, *(uint32_t*)buf2455); + *(float2*)buf2456 = rsAllocationVLoadX_float2(*(rs_allocation*)buf2457, *(uint32_t*)buf2458, *(uint32_t*)buf2459, *(uint32_t*)buf2460); + *(float3*)buf2461 = rsAllocationVLoadX_float3(*(rs_allocation*)buf2462, *(uint32_t*)buf2463, *(uint32_t*)buf2464, *(uint32_t*)buf2465); + *(float4*)buf2466 = rsAllocationVLoadX_float4(*(rs_allocation*)buf2467, *(uint32_t*)buf2468, *(uint32_t*)buf2469, *(uint32_t*)buf2470); + *(double2*)buf2471 = rsAllocationVLoadX_double2(*(rs_allocation*)buf2472, *(uint32_t*)buf2473, *(uint32_t*)buf2474, *(uint32_t*)buf2475); + *(double3*)buf2476 = rsAllocationVLoadX_double3(*(rs_allocation*)buf2477, *(uint32_t*)buf2478, *(uint32_t*)buf2479, *(uint32_t*)buf2480); + *(double4*)buf2481 = rsAllocationVLoadX_double4(*(rs_allocation*)buf2482, *(uint32_t*)buf2483, *(uint32_t*)buf2484, *(uint32_t*)buf2485); + *(char2*)buf2486 = rsAllocationVLoadX_char2(*(rs_allocation*)buf2487, *(uint32_t*)buf2488, *(uint32_t*)buf2489, *(uint32_t*)buf2490); + *(char3*)buf2491 = rsAllocationVLoadX_char3(*(rs_allocation*)buf2492, *(uint32_t*)buf2493, *(uint32_t*)buf2494, *(uint32_t*)buf2495); + *(char4*)buf2496 = rsAllocationVLoadX_char4(*(rs_allocation*)buf2497, *(uint32_t*)buf2498, *(uint32_t*)buf2499, *(uint32_t*)buf2500); + *(uchar2*)buf2501 = rsAllocationVLoadX_uchar2(*(rs_allocation*)buf2502, *(uint32_t*)buf2503, *(uint32_t*)buf2504, *(uint32_t*)buf2505); + *(uchar3*)buf2506 = rsAllocationVLoadX_uchar3(*(rs_allocation*)buf2507, *(uint32_t*)buf2508, *(uint32_t*)buf2509, *(uint32_t*)buf2510); + *(uchar4*)buf2511 = rsAllocationVLoadX_uchar4(*(rs_allocation*)buf2512, *(uint32_t*)buf2513, *(uint32_t*)buf2514, *(uint32_t*)buf2515); + *(short2*)buf2516 = rsAllocationVLoadX_short2(*(rs_allocation*)buf2517, *(uint32_t*)buf2518, *(uint32_t*)buf2519, *(uint32_t*)buf2520); + *(short3*)buf2521 = rsAllocationVLoadX_short3(*(rs_allocation*)buf2522, *(uint32_t*)buf2523, *(uint32_t*)buf2524, *(uint32_t*)buf2525); + *(short4*)buf2526 = rsAllocationVLoadX_short4(*(rs_allocation*)buf2527, *(uint32_t*)buf2528, *(uint32_t*)buf2529, *(uint32_t*)buf2530); + *(ushort2*)buf2531 = rsAllocationVLoadX_ushort2(*(rs_allocation*)buf2532, *(uint32_t*)buf2533, *(uint32_t*)buf2534, *(uint32_t*)buf2535); + *(ushort3*)buf2536 = rsAllocationVLoadX_ushort3(*(rs_allocation*)buf2537, *(uint32_t*)buf2538, *(uint32_t*)buf2539, *(uint32_t*)buf2540); + *(ushort4*)buf2541 = rsAllocationVLoadX_ushort4(*(rs_allocation*)buf2542, *(uint32_t*)buf2543, *(uint32_t*)buf2544, *(uint32_t*)buf2545); + *(int2*)buf2546 = rsAllocationVLoadX_int2(*(rs_allocation*)buf2547, *(uint32_t*)buf2548, *(uint32_t*)buf2549, *(uint32_t*)buf2550); + *(int3*)buf2551 = rsAllocationVLoadX_int3(*(rs_allocation*)buf2552, *(uint32_t*)buf2553, *(uint32_t*)buf2554, *(uint32_t*)buf2555); + *(int4*)buf2556 = rsAllocationVLoadX_int4(*(rs_allocation*)buf2557, *(uint32_t*)buf2558, *(uint32_t*)buf2559, *(uint32_t*)buf2560); + *(uint2*)buf2561 = rsAllocationVLoadX_uint2(*(rs_allocation*)buf2562, *(uint32_t*)buf2563, *(uint32_t*)buf2564, *(uint32_t*)buf2565); + *(uint3*)buf2566 = rsAllocationVLoadX_uint3(*(rs_allocation*)buf2567, *(uint32_t*)buf2568, *(uint32_t*)buf2569, *(uint32_t*)buf2570); + *(uint4*)buf2571 = rsAllocationVLoadX_uint4(*(rs_allocation*)buf2572, *(uint32_t*)buf2573, *(uint32_t*)buf2574, *(uint32_t*)buf2575); + *(long2*)buf2576 = rsAllocationVLoadX_long2(*(rs_allocation*)buf2577, *(uint32_t*)buf2578, *(uint32_t*)buf2579, *(uint32_t*)buf2580); + *(long3*)buf2581 = rsAllocationVLoadX_long3(*(rs_allocation*)buf2582, *(uint32_t*)buf2583, *(uint32_t*)buf2584, *(uint32_t*)buf2585); + *(long4*)buf2586 = rsAllocationVLoadX_long4(*(rs_allocation*)buf2587, *(uint32_t*)buf2588, *(uint32_t*)buf2589, *(uint32_t*)buf2590); + *(ulong2*)buf2591 = rsAllocationVLoadX_ulong2(*(rs_allocation*)buf2592, *(uint32_t*)buf2593, *(uint32_t*)buf2594, *(uint32_t*)buf2595); + *(ulong3*)buf2596 = rsAllocationVLoadX_ulong3(*(rs_allocation*)buf2597, *(uint32_t*)buf2598, *(uint32_t*)buf2599, *(uint32_t*)buf2600); + *(ulong4*)buf2601 = rsAllocationVLoadX_ulong4(*(rs_allocation*)buf2602, *(uint32_t*)buf2603, *(uint32_t*)buf2604, *(uint32_t*)buf2605); + rsAllocationVStoreX_float2(*(rs_allocation*)buf2606, *(float2*)buf2607, *(uint32_t*)buf2608); + rsAllocationVStoreX_float3(*(rs_allocation*)buf2609, *(float3*)buf2610, *(uint32_t*)buf2611); + rsAllocationVStoreX_float4(*(rs_allocation*)buf2612, *(float4*)buf2613, *(uint32_t*)buf2614); + rsAllocationVStoreX_double2(*(rs_allocation*)buf2615, *(double2*)buf2616, *(uint32_t*)buf2617); + rsAllocationVStoreX_double3(*(rs_allocation*)buf2618, *(double3*)buf2619, *(uint32_t*)buf2620); + rsAllocationVStoreX_double4(*(rs_allocation*)buf2621, *(double4*)buf2622, *(uint32_t*)buf2623); + rsAllocationVStoreX_char2(*(rs_allocation*)buf2624, *(char2*)buf2625, *(uint32_t*)buf2626); + rsAllocationVStoreX_char3(*(rs_allocation*)buf2627, *(char3*)buf2628, *(uint32_t*)buf2629); + rsAllocationVStoreX_char4(*(rs_allocation*)buf2630, *(char4*)buf2631, *(uint32_t*)buf2632); + rsAllocationVStoreX_uchar2(*(rs_allocation*)buf2633, *(uchar2*)buf2634, *(uint32_t*)buf2635); + rsAllocationVStoreX_uchar3(*(rs_allocation*)buf2636, *(uchar3*)buf2637, *(uint32_t*)buf2638); + rsAllocationVStoreX_uchar4(*(rs_allocation*)buf2639, *(uchar4*)buf2640, *(uint32_t*)buf2641); + rsAllocationVStoreX_short2(*(rs_allocation*)buf2642, *(short2*)buf2643, *(uint32_t*)buf2644); + rsAllocationVStoreX_short3(*(rs_allocation*)buf2645, *(short3*)buf2646, *(uint32_t*)buf2647); + rsAllocationVStoreX_short4(*(rs_allocation*)buf2648, *(short4*)buf2649, *(uint32_t*)buf2650); + rsAllocationVStoreX_ushort2(*(rs_allocation*)buf2651, *(ushort2*)buf2652, *(uint32_t*)buf2653); + rsAllocationVStoreX_ushort3(*(rs_allocation*)buf2654, *(ushort3*)buf2655, *(uint32_t*)buf2656); + rsAllocationVStoreX_ushort4(*(rs_allocation*)buf2657, *(ushort4*)buf2658, *(uint32_t*)buf2659); + rsAllocationVStoreX_int2(*(rs_allocation*)buf2660, *(int2*)buf2661, *(uint32_t*)buf2662); + rsAllocationVStoreX_int3(*(rs_allocation*)buf2663, *(int3*)buf2664, *(uint32_t*)buf2665); + rsAllocationVStoreX_int4(*(rs_allocation*)buf2666, *(int4*)buf2667, *(uint32_t*)buf2668); + rsAllocationVStoreX_uint2(*(rs_allocation*)buf2669, *(uint2*)buf2670, *(uint32_t*)buf2671); + rsAllocationVStoreX_uint3(*(rs_allocation*)buf2672, *(uint3*)buf2673, *(uint32_t*)buf2674); + rsAllocationVStoreX_uint4(*(rs_allocation*)buf2675, *(uint4*)buf2676, *(uint32_t*)buf2677); + rsAllocationVStoreX_long2(*(rs_allocation*)buf2678, *(long2*)buf2679, *(uint32_t*)buf2680); + rsAllocationVStoreX_long3(*(rs_allocation*)buf2681, *(long3*)buf2682, *(uint32_t*)buf2683); + rsAllocationVStoreX_long4(*(rs_allocation*)buf2684, *(long4*)buf2685, *(uint32_t*)buf2686); + rsAllocationVStoreX_ulong2(*(rs_allocation*)buf2687, *(ulong2*)buf2688, *(uint32_t*)buf2689); + rsAllocationVStoreX_ulong3(*(rs_allocation*)buf2690, *(ulong3*)buf2691, *(uint32_t*)buf2692); + rsAllocationVStoreX_ulong4(*(rs_allocation*)buf2693, *(ulong4*)buf2694, *(uint32_t*)buf2695); + rsAllocationVStoreX_float2(*(rs_allocation*)buf2696, *(float2*)buf2697, *(uint32_t*)buf2698, *(uint32_t*)buf2699); + rsAllocationVStoreX_float3(*(rs_allocation*)buf2700, *(float3*)buf2701, *(uint32_t*)buf2702, *(uint32_t*)buf2703); + rsAllocationVStoreX_float4(*(rs_allocation*)buf2704, *(float4*)buf2705, *(uint32_t*)buf2706, *(uint32_t*)buf2707); + rsAllocationVStoreX_double2(*(rs_allocation*)buf2708, *(double2*)buf2709, *(uint32_t*)buf2710, *(uint32_t*)buf2711); + rsAllocationVStoreX_double3(*(rs_allocation*)buf2712, *(double3*)buf2713, *(uint32_t*)buf2714, *(uint32_t*)buf2715); + rsAllocationVStoreX_double4(*(rs_allocation*)buf2716, *(double4*)buf2717, *(uint32_t*)buf2718, *(uint32_t*)buf2719); + rsAllocationVStoreX_char2(*(rs_allocation*)buf2720, *(char2*)buf2721, *(uint32_t*)buf2722, *(uint32_t*)buf2723); + rsAllocationVStoreX_char3(*(rs_allocation*)buf2724, *(char3*)buf2725, *(uint32_t*)buf2726, *(uint32_t*)buf2727); + rsAllocationVStoreX_char4(*(rs_allocation*)buf2728, *(char4*)buf2729, *(uint32_t*)buf2730, *(uint32_t*)buf2731); + rsAllocationVStoreX_uchar2(*(rs_allocation*)buf2732, *(uchar2*)buf2733, *(uint32_t*)buf2734, *(uint32_t*)buf2735); + rsAllocationVStoreX_uchar3(*(rs_allocation*)buf2736, *(uchar3*)buf2737, *(uint32_t*)buf2738, *(uint32_t*)buf2739); + rsAllocationVStoreX_uchar4(*(rs_allocation*)buf2740, *(uchar4*)buf2741, *(uint32_t*)buf2742, *(uint32_t*)buf2743); + rsAllocationVStoreX_short2(*(rs_allocation*)buf2744, *(short2*)buf2745, *(uint32_t*)buf2746, *(uint32_t*)buf2747); + rsAllocationVStoreX_short3(*(rs_allocation*)buf2748, *(short3*)buf2749, *(uint32_t*)buf2750, *(uint32_t*)buf2751); + rsAllocationVStoreX_short4(*(rs_allocation*)buf2752, *(short4*)buf2753, *(uint32_t*)buf2754, *(uint32_t*)buf2755); + rsAllocationVStoreX_ushort2(*(rs_allocation*)buf2756, *(ushort2*)buf2757, *(uint32_t*)buf2758, *(uint32_t*)buf2759); + rsAllocationVStoreX_ushort3(*(rs_allocation*)buf2760, *(ushort3*)buf2761, *(uint32_t*)buf2762, *(uint32_t*)buf2763); + rsAllocationVStoreX_ushort4(*(rs_allocation*)buf2764, *(ushort4*)buf2765, *(uint32_t*)buf2766, *(uint32_t*)buf2767); + rsAllocationVStoreX_int2(*(rs_allocation*)buf2768, *(int2*)buf2769, *(uint32_t*)buf2770, *(uint32_t*)buf2771); + rsAllocationVStoreX_int3(*(rs_allocation*)buf2772, *(int3*)buf2773, *(uint32_t*)buf2774, *(uint32_t*)buf2775); + rsAllocationVStoreX_int4(*(rs_allocation*)buf2776, *(int4*)buf2777, *(uint32_t*)buf2778, *(uint32_t*)buf2779); + rsAllocationVStoreX_uint2(*(rs_allocation*)buf2780, *(uint2*)buf2781, *(uint32_t*)buf2782, *(uint32_t*)buf2783); + rsAllocationVStoreX_uint3(*(rs_allocation*)buf2784, *(uint3*)buf2785, *(uint32_t*)buf2786, *(uint32_t*)buf2787); + rsAllocationVStoreX_uint4(*(rs_allocation*)buf2788, *(uint4*)buf2789, *(uint32_t*)buf2790, *(uint32_t*)buf2791); + rsAllocationVStoreX_long2(*(rs_allocation*)buf2792, *(long2*)buf2793, *(uint32_t*)buf2794, *(uint32_t*)buf2795); + rsAllocationVStoreX_long3(*(rs_allocation*)buf2796, *(long3*)buf2797, *(uint32_t*)buf2798, *(uint32_t*)buf2799); + rsAllocationVStoreX_long4(*(rs_allocation*)buf2800, *(long4*)buf2801, *(uint32_t*)buf2802, *(uint32_t*)buf2803); + rsAllocationVStoreX_ulong2(*(rs_allocation*)buf2804, *(ulong2*)buf2805, *(uint32_t*)buf2806, *(uint32_t*)buf2807); + rsAllocationVStoreX_ulong3(*(rs_allocation*)buf2808, *(ulong3*)buf2809, *(uint32_t*)buf2810, *(uint32_t*)buf2811); + rsAllocationVStoreX_ulong4(*(rs_allocation*)buf2812, *(ulong4*)buf2813, *(uint32_t*)buf2814, *(uint32_t*)buf2815); + rsAllocationVStoreX_float2(*(rs_allocation*)buf2816, *(float2*)buf2817, *(uint32_t*)buf2818, *(uint32_t*)buf2819, *(uint32_t*)buf2820); + rsAllocationVStoreX_float3(*(rs_allocation*)buf2821, *(float3*)buf2822, *(uint32_t*)buf2823, *(uint32_t*)buf2824, *(uint32_t*)buf2825); + rsAllocationVStoreX_float4(*(rs_allocation*)buf2826, *(float4*)buf2827, *(uint32_t*)buf2828, *(uint32_t*)buf2829, *(uint32_t*)buf2830); + rsAllocationVStoreX_double2(*(rs_allocation*)buf2831, *(double2*)buf2832, *(uint32_t*)buf2833, *(uint32_t*)buf2834, *(uint32_t*)buf2835); + rsAllocationVStoreX_double3(*(rs_allocation*)buf2836, *(double3*)buf2837, *(uint32_t*)buf2838, *(uint32_t*)buf2839, *(uint32_t*)buf2840); + rsAllocationVStoreX_double4(*(rs_allocation*)buf2841, *(double4*)buf2842, *(uint32_t*)buf2843, *(uint32_t*)buf2844, *(uint32_t*)buf2845); + rsAllocationVStoreX_char2(*(rs_allocation*)buf2846, *(char2*)buf2847, *(uint32_t*)buf2848, *(uint32_t*)buf2849, *(uint32_t*)buf2850); + rsAllocationVStoreX_char3(*(rs_allocation*)buf2851, *(char3*)buf2852, *(uint32_t*)buf2853, *(uint32_t*)buf2854, *(uint32_t*)buf2855); + rsAllocationVStoreX_char4(*(rs_allocation*)buf2856, *(char4*)buf2857, *(uint32_t*)buf2858, *(uint32_t*)buf2859, *(uint32_t*)buf2860); + rsAllocationVStoreX_uchar2(*(rs_allocation*)buf2861, *(uchar2*)buf2862, *(uint32_t*)buf2863, *(uint32_t*)buf2864, *(uint32_t*)buf2865); + rsAllocationVStoreX_uchar3(*(rs_allocation*)buf2866, *(uchar3*)buf2867, *(uint32_t*)buf2868, *(uint32_t*)buf2869, *(uint32_t*)buf2870); + rsAllocationVStoreX_uchar4(*(rs_allocation*)buf2871, *(uchar4*)buf2872, *(uint32_t*)buf2873, *(uint32_t*)buf2874, *(uint32_t*)buf2875); + rsAllocationVStoreX_short2(*(rs_allocation*)buf2876, *(short2*)buf2877, *(uint32_t*)buf2878, *(uint32_t*)buf2879, *(uint32_t*)buf2880); + rsAllocationVStoreX_short3(*(rs_allocation*)buf2881, *(short3*)buf2882, *(uint32_t*)buf2883, *(uint32_t*)buf2884, *(uint32_t*)buf2885); + rsAllocationVStoreX_short4(*(rs_allocation*)buf2886, *(short4*)buf2887, *(uint32_t*)buf2888, *(uint32_t*)buf2889, *(uint32_t*)buf2890); + rsAllocationVStoreX_ushort2(*(rs_allocation*)buf2891, *(ushort2*)buf2892, *(uint32_t*)buf2893, *(uint32_t*)buf2894, *(uint32_t*)buf2895); + rsAllocationVStoreX_ushort3(*(rs_allocation*)buf2896, *(ushort3*)buf2897, *(uint32_t*)buf2898, *(uint32_t*)buf2899, *(uint32_t*)buf2900); + rsAllocationVStoreX_ushort4(*(rs_allocation*)buf2901, *(ushort4*)buf2902, *(uint32_t*)buf2903, *(uint32_t*)buf2904, *(uint32_t*)buf2905); + rsAllocationVStoreX_int2(*(rs_allocation*)buf2906, *(int2*)buf2907, *(uint32_t*)buf2908, *(uint32_t*)buf2909, *(uint32_t*)buf2910); + rsAllocationVStoreX_int3(*(rs_allocation*)buf2911, *(int3*)buf2912, *(uint32_t*)buf2913, *(uint32_t*)buf2914, *(uint32_t*)buf2915); + rsAllocationVStoreX_int4(*(rs_allocation*)buf2916, *(int4*)buf2917, *(uint32_t*)buf2918, *(uint32_t*)buf2919, *(uint32_t*)buf2920); + rsAllocationVStoreX_uint2(*(rs_allocation*)buf2921, *(uint2*)buf2922, *(uint32_t*)buf2923, *(uint32_t*)buf2924, *(uint32_t*)buf2925); + rsAllocationVStoreX_uint3(*(rs_allocation*)buf2926, *(uint3*)buf2927, *(uint32_t*)buf2928, *(uint32_t*)buf2929, *(uint32_t*)buf2930); + rsAllocationVStoreX_uint4(*(rs_allocation*)buf2931, *(uint4*)buf2932, *(uint32_t*)buf2933, *(uint32_t*)buf2934, *(uint32_t*)buf2935); + rsAllocationVStoreX_long2(*(rs_allocation*)buf2936, *(long2*)buf2937, *(uint32_t*)buf2938, *(uint32_t*)buf2939, *(uint32_t*)buf2940); + rsAllocationVStoreX_long3(*(rs_allocation*)buf2941, *(long3*)buf2942, *(uint32_t*)buf2943, *(uint32_t*)buf2944, *(uint32_t*)buf2945); + rsAllocationVStoreX_long4(*(rs_allocation*)buf2946, *(long4*)buf2947, *(uint32_t*)buf2948, *(uint32_t*)buf2949, *(uint32_t*)buf2950); + rsAllocationVStoreX_ulong2(*(rs_allocation*)buf2951, *(ulong2*)buf2952, *(uint32_t*)buf2953, *(uint32_t*)buf2954, *(uint32_t*)buf2955); + rsAllocationVStoreX_ulong3(*(rs_allocation*)buf2956, *(ulong3*)buf2957, *(uint32_t*)buf2958, *(uint32_t*)buf2959, *(uint32_t*)buf2960); + rsAllocationVStoreX_ulong4(*(rs_allocation*)buf2961, *(ulong4*)buf2962, *(uint32_t*)buf2963, *(uint32_t*)buf2964, *(uint32_t*)buf2965); + *(int32_t*)buf2966 = rsAtomicAdd((volatile int32_t*) buf2967, *(int32_t*)buf2968); + *(int32_t*)buf2969 = rsAtomicAdd((volatile uint32_t*) buf2970, *(uint32_t*)buf2971); + *(int32_t*)buf2972 = rsAtomicAnd((volatile int32_t*) buf2973, *(int32_t*)buf2974); + *(int32_t*)buf2975 = rsAtomicAnd((volatile uint32_t*) buf2976, *(uint32_t*)buf2977); + *(int32_t*)buf2978 = rsAtomicCas((volatile int32_t*) buf2979, *(int32_t*)buf2980, *(int32_t*)buf2981); + *(uint32_t*)buf2982 = rsAtomicCas((volatile uint32_t*) buf2983, *(uint32_t*)buf2984, *(uint32_t*)buf2985); + *(int32_t*)buf2986 = rsAtomicDec((volatile int32_t*) buf2987); + *(int32_t*)buf2988 = rsAtomicDec((volatile uint32_t*) buf2989); + *(int32_t*)buf2990 = rsAtomicInc((volatile int32_t*) buf2991); + *(int32_t*)buf2992 = rsAtomicInc((volatile uint32_t*) buf2993); + *(uint32_t*)buf2994 = rsAtomicMax((volatile uint32_t*) buf2995, *(uint32_t*)buf2996); + *(int32_t*)buf2997 = rsAtomicMax((volatile int32_t*) buf2998, *(int32_t*)buf2999); + *(uint32_t*)buf3000 = rsAtomicMin((volatile uint32_t*) buf3001, *(uint32_t*)buf3002); + *(int32_t*)buf3003 = rsAtomicMin((volatile int32_t*) buf3004, *(int32_t*)buf3005); + *(int32_t*)buf3006 = rsAtomicOr((volatile int32_t*) buf3007, *(int32_t*)buf3008); + *(int32_t*)buf3009 = rsAtomicOr((volatile uint32_t*) buf3010, *(uint32_t*)buf3011); + *(int32_t*)buf3012 = rsAtomicSub((volatile int32_t*) buf3013, *(int32_t*)buf3014); + *(int32_t*)buf3015 = rsAtomicSub((volatile uint32_t*) buf3016, *(uint32_t*)buf3017); + *(int32_t*)buf3018 = rsAtomicXor((volatile int32_t*) buf3019, *(int32_t*)buf3020); + *(int32_t*)buf3021 = rsAtomicXor((volatile uint32_t*) buf3022, *(uint32_t*)buf3023); + *(char*)buf3024 = rsClamp(*(char*)buf3025, *(char*)buf3026, *(char*)buf3027); + *(uchar*)buf3028 = rsClamp(*(uchar*)buf3029, *(uchar*)buf3030, *(uchar*)buf3031); + *(short*)buf3032 = rsClamp(*(short*)buf3033, *(short*)buf3034, *(short*)buf3035); + *(ushort*)buf3036 = rsClamp(*(ushort*)buf3037, *(ushort*)buf3038, *(ushort*)buf3039); + *(int*)buf3040 = rsClamp(*(int*)buf3041, *(int*)buf3042, *(int*)buf3043); + *(uint*)buf3044 = rsClamp(*(uint*)buf3045, *(uint*)buf3046, *(uint*)buf3047); + rsClearObject((rs_element*) buf3048); + rsClearObject((rs_type*) buf3049); + rsClearObject((rs_allocation*) buf3050); + rsClearObject((rs_sampler*) buf3051); + rsClearObject((rs_script*) buf3052); + rsDebug((const char*) buf3053, *(double*)buf3054); + rsDebug((const char*) buf3055, *(int*)buf3056); + rsDebug((const char*) buf3057, *(uint*)buf3058); + rsDebug((const char*) buf3059, *(long*)buf3060); + rsDebug((const char*) buf3061, *(ulong*)buf3062); + rsDebug((const char*) buf3063, *(int2*)buf3064); + rsDebug((const char*) buf3065, *(int3*)buf3066); + rsDebug((const char*) buf3067, *(int4*)buf3068); + rsDebug((const char*) buf3069, *(uint2*)buf3070); + rsDebug((const char*) buf3071, *(uint3*)buf3072); + rsDebug((const char*) buf3073, *(uint4*)buf3074); + rsDebug((const char*) buf3075, *(long2*)buf3076); + rsDebug((const char*) buf3077, *(long3*)buf3078); + rsDebug((const char*) buf3079, *(long4*)buf3080); + rsDebug((const char*) buf3081, *(ulong2*)buf3082); + rsDebug((const char*) buf3083, *(ulong3*)buf3084); + rsDebug((const char*) buf3085, *(ulong4*)buf3086); + rsDebug((const char*) buf3087, *(double2*)buf3088); + rsDebug((const char*) buf3089, *(double3*)buf3090); + rsDebug((const char*) buf3091, *(double4*)buf3092); + rsDebug((const char*) buf3093, *(float*)buf3094); + rsDebug((const char*) buf3095, *(float2*)buf3096); + rsDebug((const char*) buf3097, *(float3*)buf3098); + rsDebug((const char*) buf3099, *(float4*)buf3100); + rsDebug((const char*) buf3101, *(char*)buf3102); + rsDebug((const char*) buf3103, *(char2*)buf3104); + rsDebug((const char*) buf3105, *(char3*)buf3106); + rsDebug((const char*) buf3107, *(char4*)buf3108); + rsDebug((const char*) buf3109, *(uchar*)buf3110); + rsDebug((const char*) buf3111, *(uchar2*)buf3112); + rsDebug((const char*) buf3113, *(uchar3*)buf3114); + rsDebug((const char*) buf3115, *(uchar4*)buf3116); + rsDebug((const char*) buf3117, *(short*)buf3118); + rsDebug((const char*) buf3119, *(short2*)buf3120); + rsDebug((const char*) buf3121, *(short3*)buf3122); + rsDebug((const char*) buf3123, *(short4*)buf3124); + rsDebug((const char*) buf3125, *(ushort*)buf3126); + rsDebug((const char*) buf3127, *(ushort2*)buf3128); + rsDebug((const char*) buf3129, *(ushort3*)buf3130); + rsDebug((const char*) buf3131, *(ushort4*)buf3132); + rsDebug((const char*) buf3133, *(float*)buf3134, *(float*)buf3135); + rsDebug((const char*) buf3136, *(float*)buf3137, *(float*)buf3138, *(float*)buf3139); + rsDebug((const char*) buf3140, *(float*)buf3141, *(float*)buf3142, *(float*)buf3143, *(float*)buf3144); + rsDebug((const char*) buf3145, *(long long*)buf3146); + rsDebug((const char*) buf3147, *(unsigned long long*)buf3148); + rsDebug((const char*) buf3149, (const void*) buf3150); + rsDebug((const char*) buf3151, (const rs_matrix4x4*) buf3152); + rsDebug((const char*) buf3153, (const rs_matrix3x3*) buf3154); + rsDebug((const char*) buf3155, (const rs_matrix2x2*) buf3156); + *(uint32_t*)buf3157 = rsElementGetBytesSize(*(rs_element*)buf3158); + *(rs_data_kind*)buf3159 = rsElementGetDataKind(*(rs_element*)buf3160); + *(rs_data_type*)buf3161 = rsElementGetDataType(*(rs_element*)buf3162); + *(rs_element*)buf3163 = rsElementGetSubElement(*(rs_element*)buf3164, *(uint32_t*)buf3165); + *(uint32_t*)buf3166 = rsElementGetSubElementArraySize(*(rs_element*)buf3167, *(uint32_t*)buf3168); + *(uint32_t*)buf3169 = rsElementGetSubElementCount(*(rs_element*)buf3170); + *(uint32_t*)buf3171 = rsElementGetSubElementName(*(rs_element*)buf3172, *(uint32_t*)buf3173, (char*) buf3174, *(uint32_t*)buf3175); + *(uint32_t*)buf3176 = rsElementGetSubElementNameLength(*(rs_element*)buf3177, *(uint32_t*)buf3178); + *(uint32_t*)buf3179 = rsElementGetSubElementOffsetBytes(*(rs_element*)buf3180, *(uint32_t*)buf3181); + *(uint32_t*)buf3182 = rsElementGetVectorSize(*(rs_element*)buf3183); + rsExtractFrustumPlanes((const rs_matrix4x4*) buf3184, (float4*) buf3185, (float4*) buf3186, (float4*) buf3187, (float4*) buf3188, (float4*) buf3189, (float4*) buf3190); + rsForEach(*(rs_script*)buf3191, *(rs_allocation*)buf3192, *(rs_allocation*)buf3193); + *(float*)buf3194 = rsFrac(*(float*)buf3195); + *(rs_allocation*)buf3196 = rsGetAllocation((const void*) buf3197); + *(uint32_t*)buf3198 = rsGetArray0(context); + *(uint32_t*)buf3199 = rsGetArray1(context); + *(uint32_t*)buf3200 = rsGetArray2(context); + *(uint32_t*)buf3201 = rsGetArray3(context); + *(uint32_t*)buf3202 = rsGetDimArray0(context); + *(uint32_t*)buf3203 = rsGetDimArray1(context); + *(uint32_t*)buf3204 = rsGetDimArray2(context); + *(uint32_t*)buf3205 = rsGetDimArray3(context); + *(bool*)buf3206 = rsGetDimHasFaces(context); + *(uint32_t*)buf3207 = rsGetDimLod(context); + *(uint32_t*)buf3208 = rsGetDimX(context); + *(uint32_t*)buf3209 = rsGetDimY(context); + *(uint32_t*)buf3210 = rsGetDimZ(context); + *(float*)buf3211 = rsGetDt(); + *(const void**)buf3212 = rsGetElementAt(*(rs_allocation*)buf3213, *(uint32_t*)buf3214); + *(const void**)buf3215 = rsGetElementAt(*(rs_allocation*)buf3216, *(uint32_t*)buf3217, *(uint32_t*)buf3218); + *(const void**)buf3219 = rsGetElementAt(*(rs_allocation*)buf3220, *(uint32_t*)buf3221, *(uint32_t*)buf3222, *(uint32_t*)buf3223); + *(float*)buf3224 = rsGetElementAt_float(*(rs_allocation*)buf3225, *(uint32_t*)buf3226); + *(float2*)buf3227 = rsGetElementAt_float2(*(rs_allocation*)buf3228, *(uint32_t*)buf3229); + *(float3*)buf3230 = rsGetElementAt_float3(*(rs_allocation*)buf3231, *(uint32_t*)buf3232); + *(float4*)buf3233 = rsGetElementAt_float4(*(rs_allocation*)buf3234, *(uint32_t*)buf3235); + *(double*)buf3236 = rsGetElementAt_double(*(rs_allocation*)buf3237, *(uint32_t*)buf3238); + *(double2*)buf3239 = rsGetElementAt_double2(*(rs_allocation*)buf3240, *(uint32_t*)buf3241); + *(double3*)buf3242 = rsGetElementAt_double3(*(rs_allocation*)buf3243, *(uint32_t*)buf3244); + *(double4*)buf3245 = rsGetElementAt_double4(*(rs_allocation*)buf3246, *(uint32_t*)buf3247); + *(char*)buf3248 = rsGetElementAt_char(*(rs_allocation*)buf3249, *(uint32_t*)buf3250); + *(char2*)buf3251 = rsGetElementAt_char2(*(rs_allocation*)buf3252, *(uint32_t*)buf3253); + *(char3*)buf3254 = rsGetElementAt_char3(*(rs_allocation*)buf3255, *(uint32_t*)buf3256); + *(char4*)buf3257 = rsGetElementAt_char4(*(rs_allocation*)buf3258, *(uint32_t*)buf3259); + *(uchar*)buf3260 = rsGetElementAt_uchar(*(rs_allocation*)buf3261, *(uint32_t*)buf3262); + *(uchar2*)buf3263 = rsGetElementAt_uchar2(*(rs_allocation*)buf3264, *(uint32_t*)buf3265); + *(uchar3*)buf3266 = rsGetElementAt_uchar3(*(rs_allocation*)buf3267, *(uint32_t*)buf3268); + *(uchar4*)buf3269 = rsGetElementAt_uchar4(*(rs_allocation*)buf3270, *(uint32_t*)buf3271); + *(short*)buf3272 = rsGetElementAt_short(*(rs_allocation*)buf3273, *(uint32_t*)buf3274); + *(short2*)buf3275 = rsGetElementAt_short2(*(rs_allocation*)buf3276, *(uint32_t*)buf3277); + *(short3*)buf3278 = rsGetElementAt_short3(*(rs_allocation*)buf3279, *(uint32_t*)buf3280); + *(short4*)buf3281 = rsGetElementAt_short4(*(rs_allocation*)buf3282, *(uint32_t*)buf3283); + *(ushort*)buf3284 = rsGetElementAt_ushort(*(rs_allocation*)buf3285, *(uint32_t*)buf3286); + *(ushort2*)buf3287 = rsGetElementAt_ushort2(*(rs_allocation*)buf3288, *(uint32_t*)buf3289); + *(ushort3*)buf3290 = rsGetElementAt_ushort3(*(rs_allocation*)buf3291, *(uint32_t*)buf3292); + *(ushort4*)buf3293 = rsGetElementAt_ushort4(*(rs_allocation*)buf3294, *(uint32_t*)buf3295); + *(int*)buf3296 = rsGetElementAt_int(*(rs_allocation*)buf3297, *(uint32_t*)buf3298); + *(int2*)buf3299 = rsGetElementAt_int2(*(rs_allocation*)buf3300, *(uint32_t*)buf3301); + *(int3*)buf3302 = rsGetElementAt_int3(*(rs_allocation*)buf3303, *(uint32_t*)buf3304); + *(int4*)buf3305 = rsGetElementAt_int4(*(rs_allocation*)buf3306, *(uint32_t*)buf3307); + *(uint*)buf3308 = rsGetElementAt_uint(*(rs_allocation*)buf3309, *(uint32_t*)buf3310); + *(uint2*)buf3311 = rsGetElementAt_uint2(*(rs_allocation*)buf3312, *(uint32_t*)buf3313); + *(uint3*)buf3314 = rsGetElementAt_uint3(*(rs_allocation*)buf3315, *(uint32_t*)buf3316); + *(uint4*)buf3317 = rsGetElementAt_uint4(*(rs_allocation*)buf3318, *(uint32_t*)buf3319); + *(long*)buf3320 = rsGetElementAt_long(*(rs_allocation*)buf3321, *(uint32_t*)buf3322); + *(long2*)buf3323 = rsGetElementAt_long2(*(rs_allocation*)buf3324, *(uint32_t*)buf3325); + *(long3*)buf3326 = rsGetElementAt_long3(*(rs_allocation*)buf3327, *(uint32_t*)buf3328); + *(long4*)buf3329 = rsGetElementAt_long4(*(rs_allocation*)buf3330, *(uint32_t*)buf3331); + *(ulong*)buf3332 = rsGetElementAt_ulong(*(rs_allocation*)buf3333, *(uint32_t*)buf3334); + *(ulong2*)buf3335 = rsGetElementAt_ulong2(*(rs_allocation*)buf3336, *(uint32_t*)buf3337); + *(ulong3*)buf3338 = rsGetElementAt_ulong3(*(rs_allocation*)buf3339, *(uint32_t*)buf3340); + *(ulong4*)buf3341 = rsGetElementAt_ulong4(*(rs_allocation*)buf3342, *(uint32_t*)buf3343); + *(float*)buf3344 = rsGetElementAt_float(*(rs_allocation*)buf3345, *(uint32_t*)buf3346, *(uint32_t*)buf3347); + *(float2*)buf3348 = rsGetElementAt_float2(*(rs_allocation*)buf3349, *(uint32_t*)buf3350, *(uint32_t*)buf3351); + *(float3*)buf3352 = rsGetElementAt_float3(*(rs_allocation*)buf3353, *(uint32_t*)buf3354, *(uint32_t*)buf3355); + *(float4*)buf3356 = rsGetElementAt_float4(*(rs_allocation*)buf3357, *(uint32_t*)buf3358, *(uint32_t*)buf3359); + *(double*)buf3360 = rsGetElementAt_double(*(rs_allocation*)buf3361, *(uint32_t*)buf3362, *(uint32_t*)buf3363); + *(double2*)buf3364 = rsGetElementAt_double2(*(rs_allocation*)buf3365, *(uint32_t*)buf3366, *(uint32_t*)buf3367); + *(double3*)buf3368 = rsGetElementAt_double3(*(rs_allocation*)buf3369, *(uint32_t*)buf3370, *(uint32_t*)buf3371); + *(double4*)buf3372 = rsGetElementAt_double4(*(rs_allocation*)buf3373, *(uint32_t*)buf3374, *(uint32_t*)buf3375); + *(char*)buf3376 = rsGetElementAt_char(*(rs_allocation*)buf3377, *(uint32_t*)buf3378, *(uint32_t*)buf3379); + *(char2*)buf3380 = rsGetElementAt_char2(*(rs_allocation*)buf3381, *(uint32_t*)buf3382, *(uint32_t*)buf3383); + *(char3*)buf3384 = rsGetElementAt_char3(*(rs_allocation*)buf3385, *(uint32_t*)buf3386, *(uint32_t*)buf3387); + *(char4*)buf3388 = rsGetElementAt_char4(*(rs_allocation*)buf3389, *(uint32_t*)buf3390, *(uint32_t*)buf3391); + *(uchar*)buf3392 = rsGetElementAt_uchar(*(rs_allocation*)buf3393, *(uint32_t*)buf3394, *(uint32_t*)buf3395); + *(uchar2*)buf3396 = rsGetElementAt_uchar2(*(rs_allocation*)buf3397, *(uint32_t*)buf3398, *(uint32_t*)buf3399); + *(uchar3*)buf3400 = rsGetElementAt_uchar3(*(rs_allocation*)buf3401, *(uint32_t*)buf3402, *(uint32_t*)buf3403); + *(uchar4*)buf3404 = rsGetElementAt_uchar4(*(rs_allocation*)buf3405, *(uint32_t*)buf3406, *(uint32_t*)buf3407); + *(short*)buf3408 = rsGetElementAt_short(*(rs_allocation*)buf3409, *(uint32_t*)buf3410, *(uint32_t*)buf3411); + *(short2*)buf3412 = rsGetElementAt_short2(*(rs_allocation*)buf3413, *(uint32_t*)buf3414, *(uint32_t*)buf3415); + *(short3*)buf3416 = rsGetElementAt_short3(*(rs_allocation*)buf3417, *(uint32_t*)buf3418, *(uint32_t*)buf3419); + *(short4*)buf3420 = rsGetElementAt_short4(*(rs_allocation*)buf3421, *(uint32_t*)buf3422, *(uint32_t*)buf3423); + *(ushort*)buf3424 = rsGetElementAt_ushort(*(rs_allocation*)buf3425, *(uint32_t*)buf3426, *(uint32_t*)buf3427); + *(ushort2*)buf3428 = rsGetElementAt_ushort2(*(rs_allocation*)buf3429, *(uint32_t*)buf3430, *(uint32_t*)buf3431); + *(ushort3*)buf3432 = rsGetElementAt_ushort3(*(rs_allocation*)buf3433, *(uint32_t*)buf3434, *(uint32_t*)buf3435); + *(ushort4*)buf3436 = rsGetElementAt_ushort4(*(rs_allocation*)buf3437, *(uint32_t*)buf3438, *(uint32_t*)buf3439); + *(int*)buf3440 = rsGetElementAt_int(*(rs_allocation*)buf3441, *(uint32_t*)buf3442, *(uint32_t*)buf3443); + *(int2*)buf3444 = rsGetElementAt_int2(*(rs_allocation*)buf3445, *(uint32_t*)buf3446, *(uint32_t*)buf3447); + *(int3*)buf3448 = rsGetElementAt_int3(*(rs_allocation*)buf3449, *(uint32_t*)buf3450, *(uint32_t*)buf3451); + *(int4*)buf3452 = rsGetElementAt_int4(*(rs_allocation*)buf3453, *(uint32_t*)buf3454, *(uint32_t*)buf3455); + *(uint*)buf3456 = rsGetElementAt_uint(*(rs_allocation*)buf3457, *(uint32_t*)buf3458, *(uint32_t*)buf3459); + *(uint2*)buf3460 = rsGetElementAt_uint2(*(rs_allocation*)buf3461, *(uint32_t*)buf3462, *(uint32_t*)buf3463); + *(uint3*)buf3464 = rsGetElementAt_uint3(*(rs_allocation*)buf3465, *(uint32_t*)buf3466, *(uint32_t*)buf3467); + *(uint4*)buf3468 = rsGetElementAt_uint4(*(rs_allocation*)buf3469, *(uint32_t*)buf3470, *(uint32_t*)buf3471); + *(long*)buf3472 = rsGetElementAt_long(*(rs_allocation*)buf3473, *(uint32_t*)buf3474, *(uint32_t*)buf3475); + *(long2*)buf3476 = rsGetElementAt_long2(*(rs_allocation*)buf3477, *(uint32_t*)buf3478, *(uint32_t*)buf3479); + *(long3*)buf3480 = rsGetElementAt_long3(*(rs_allocation*)buf3481, *(uint32_t*)buf3482, *(uint32_t*)buf3483); + *(long4*)buf3484 = rsGetElementAt_long4(*(rs_allocation*)buf3485, *(uint32_t*)buf3486, *(uint32_t*)buf3487); + *(ulong*)buf3488 = rsGetElementAt_ulong(*(rs_allocation*)buf3489, *(uint32_t*)buf3490, *(uint32_t*)buf3491); + *(ulong2*)buf3492 = rsGetElementAt_ulong2(*(rs_allocation*)buf3493, *(uint32_t*)buf3494, *(uint32_t*)buf3495); + *(ulong3*)buf3496 = rsGetElementAt_ulong3(*(rs_allocation*)buf3497, *(uint32_t*)buf3498, *(uint32_t*)buf3499); + *(ulong4*)buf3500 = rsGetElementAt_ulong4(*(rs_allocation*)buf3501, *(uint32_t*)buf3502, *(uint32_t*)buf3503); + *(float*)buf3504 = rsGetElementAt_float(*(rs_allocation*)buf3505, *(uint32_t*)buf3506, *(uint32_t*)buf3507, *(uint32_t*)buf3508); + *(float2*)buf3509 = rsGetElementAt_float2(*(rs_allocation*)buf3510, *(uint32_t*)buf3511, *(uint32_t*)buf3512, *(uint32_t*)buf3513); + *(float3*)buf3514 = rsGetElementAt_float3(*(rs_allocation*)buf3515, *(uint32_t*)buf3516, *(uint32_t*)buf3517, *(uint32_t*)buf3518); + *(float4*)buf3519 = rsGetElementAt_float4(*(rs_allocation*)buf3520, *(uint32_t*)buf3521, *(uint32_t*)buf3522, *(uint32_t*)buf3523); + *(double*)buf3524 = rsGetElementAt_double(*(rs_allocation*)buf3525, *(uint32_t*)buf3526, *(uint32_t*)buf3527, *(uint32_t*)buf3528); + *(double2*)buf3529 = rsGetElementAt_double2(*(rs_allocation*)buf3530, *(uint32_t*)buf3531, *(uint32_t*)buf3532, *(uint32_t*)buf3533); + *(double3*)buf3534 = rsGetElementAt_double3(*(rs_allocation*)buf3535, *(uint32_t*)buf3536, *(uint32_t*)buf3537, *(uint32_t*)buf3538); + *(double4*)buf3539 = rsGetElementAt_double4(*(rs_allocation*)buf3540, *(uint32_t*)buf3541, *(uint32_t*)buf3542, *(uint32_t*)buf3543); + *(char*)buf3544 = rsGetElementAt_char(*(rs_allocation*)buf3545, *(uint32_t*)buf3546, *(uint32_t*)buf3547, *(uint32_t*)buf3548); + *(char2*)buf3549 = rsGetElementAt_char2(*(rs_allocation*)buf3550, *(uint32_t*)buf3551, *(uint32_t*)buf3552, *(uint32_t*)buf3553); + *(char3*)buf3554 = rsGetElementAt_char3(*(rs_allocation*)buf3555, *(uint32_t*)buf3556, *(uint32_t*)buf3557, *(uint32_t*)buf3558); + *(char4*)buf3559 = rsGetElementAt_char4(*(rs_allocation*)buf3560, *(uint32_t*)buf3561, *(uint32_t*)buf3562, *(uint32_t*)buf3563); + *(uchar*)buf3564 = rsGetElementAt_uchar(*(rs_allocation*)buf3565, *(uint32_t*)buf3566, *(uint32_t*)buf3567, *(uint32_t*)buf3568); + *(uchar2*)buf3569 = rsGetElementAt_uchar2(*(rs_allocation*)buf3570, *(uint32_t*)buf3571, *(uint32_t*)buf3572, *(uint32_t*)buf3573); + *(uchar3*)buf3574 = rsGetElementAt_uchar3(*(rs_allocation*)buf3575, *(uint32_t*)buf3576, *(uint32_t*)buf3577, *(uint32_t*)buf3578); + *(uchar4*)buf3579 = rsGetElementAt_uchar4(*(rs_allocation*)buf3580, *(uint32_t*)buf3581, *(uint32_t*)buf3582, *(uint32_t*)buf3583); + *(short*)buf3584 = rsGetElementAt_short(*(rs_allocation*)buf3585, *(uint32_t*)buf3586, *(uint32_t*)buf3587, *(uint32_t*)buf3588); + *(short2*)buf3589 = rsGetElementAt_short2(*(rs_allocation*)buf3590, *(uint32_t*)buf3591, *(uint32_t*)buf3592, *(uint32_t*)buf3593); + *(short3*)buf3594 = rsGetElementAt_short3(*(rs_allocation*)buf3595, *(uint32_t*)buf3596, *(uint32_t*)buf3597, *(uint32_t*)buf3598); + *(short4*)buf3599 = rsGetElementAt_short4(*(rs_allocation*)buf3600, *(uint32_t*)buf3601, *(uint32_t*)buf3602, *(uint32_t*)buf3603); + *(ushort*)buf3604 = rsGetElementAt_ushort(*(rs_allocation*)buf3605, *(uint32_t*)buf3606, *(uint32_t*)buf3607, *(uint32_t*)buf3608); + *(ushort2*)buf3609 = rsGetElementAt_ushort2(*(rs_allocation*)buf3610, *(uint32_t*)buf3611, *(uint32_t*)buf3612, *(uint32_t*)buf3613); + *(ushort3*)buf3614 = rsGetElementAt_ushort3(*(rs_allocation*)buf3615, *(uint32_t*)buf3616, *(uint32_t*)buf3617, *(uint32_t*)buf3618); + *(ushort4*)buf3619 = rsGetElementAt_ushort4(*(rs_allocation*)buf3620, *(uint32_t*)buf3621, *(uint32_t*)buf3622, *(uint32_t*)buf3623); + *(int*)buf3624 = rsGetElementAt_int(*(rs_allocation*)buf3625, *(uint32_t*)buf3626, *(uint32_t*)buf3627, *(uint32_t*)buf3628); + *(int2*)buf3629 = rsGetElementAt_int2(*(rs_allocation*)buf3630, *(uint32_t*)buf3631, *(uint32_t*)buf3632, *(uint32_t*)buf3633); + *(int3*)buf3634 = rsGetElementAt_int3(*(rs_allocation*)buf3635, *(uint32_t*)buf3636, *(uint32_t*)buf3637, *(uint32_t*)buf3638); + *(int4*)buf3639 = rsGetElementAt_int4(*(rs_allocation*)buf3640, *(uint32_t*)buf3641, *(uint32_t*)buf3642, *(uint32_t*)buf3643); + *(uint*)buf3644 = rsGetElementAt_uint(*(rs_allocation*)buf3645, *(uint32_t*)buf3646, *(uint32_t*)buf3647, *(uint32_t*)buf3648); + *(uint2*)buf3649 = rsGetElementAt_uint2(*(rs_allocation*)buf3650, *(uint32_t*)buf3651, *(uint32_t*)buf3652, *(uint32_t*)buf3653); + *(uint3*)buf3654 = rsGetElementAt_uint3(*(rs_allocation*)buf3655, *(uint32_t*)buf3656, *(uint32_t*)buf3657, *(uint32_t*)buf3658); + *(uint4*)buf3659 = rsGetElementAt_uint4(*(rs_allocation*)buf3660, *(uint32_t*)buf3661, *(uint32_t*)buf3662, *(uint32_t*)buf3663); + *(long*)buf3664 = rsGetElementAt_long(*(rs_allocation*)buf3665, *(uint32_t*)buf3666, *(uint32_t*)buf3667, *(uint32_t*)buf3668); + *(long2*)buf3669 = rsGetElementAt_long2(*(rs_allocation*)buf3670, *(uint32_t*)buf3671, *(uint32_t*)buf3672, *(uint32_t*)buf3673); + *(long3*)buf3674 = rsGetElementAt_long3(*(rs_allocation*)buf3675, *(uint32_t*)buf3676, *(uint32_t*)buf3677, *(uint32_t*)buf3678); + *(long4*)buf3679 = rsGetElementAt_long4(*(rs_allocation*)buf3680, *(uint32_t*)buf3681, *(uint32_t*)buf3682, *(uint32_t*)buf3683); + *(ulong*)buf3684 = rsGetElementAt_ulong(*(rs_allocation*)buf3685, *(uint32_t*)buf3686, *(uint32_t*)buf3687, *(uint32_t*)buf3688); + *(ulong2*)buf3689 = rsGetElementAt_ulong2(*(rs_allocation*)buf3690, *(uint32_t*)buf3691, *(uint32_t*)buf3692, *(uint32_t*)buf3693); + *(ulong3*)buf3694 = rsGetElementAt_ulong3(*(rs_allocation*)buf3695, *(uint32_t*)buf3696, *(uint32_t*)buf3697, *(uint32_t*)buf3698); + *(ulong4*)buf3699 = rsGetElementAt_ulong4(*(rs_allocation*)buf3700, *(uint32_t*)buf3701, *(uint32_t*)buf3702, *(uint32_t*)buf3703); + *(half*)buf3704 = rsGetElementAt_half(*(rs_allocation*)buf3705, *(uint32_t*)buf3706); + *(half2*)buf3707 = rsGetElementAt_half2(*(rs_allocation*)buf3708, *(uint32_t*)buf3709); + *(half3*)buf3710 = rsGetElementAt_half3(*(rs_allocation*)buf3711, *(uint32_t*)buf3712); + *(half4*)buf3713 = rsGetElementAt_half4(*(rs_allocation*)buf3714, *(uint32_t*)buf3715); + *(half*)buf3716 = rsGetElementAt_half(*(rs_allocation*)buf3717, *(uint32_t*)buf3718, *(uint32_t*)buf3719); + *(half2*)buf3720 = rsGetElementAt_half2(*(rs_allocation*)buf3721, *(uint32_t*)buf3722, *(uint32_t*)buf3723); + *(half3*)buf3724 = rsGetElementAt_half3(*(rs_allocation*)buf3725, *(uint32_t*)buf3726, *(uint32_t*)buf3727); + *(half4*)buf3728 = rsGetElementAt_half4(*(rs_allocation*)buf3729, *(uint32_t*)buf3730, *(uint32_t*)buf3731); + *(half*)buf3732 = rsGetElementAt_half(*(rs_allocation*)buf3733, *(uint32_t*)buf3734, *(uint32_t*)buf3735, *(uint32_t*)buf3736); + *(half2*)buf3737 = rsGetElementAt_half2(*(rs_allocation*)buf3738, *(uint32_t*)buf3739, *(uint32_t*)buf3740, *(uint32_t*)buf3741); + *(half3*)buf3742 = rsGetElementAt_half3(*(rs_allocation*)buf3743, *(uint32_t*)buf3744, *(uint32_t*)buf3745, *(uint32_t*)buf3746); + *(half4*)buf3747 = rsGetElementAt_half4(*(rs_allocation*)buf3748, *(uint32_t*)buf3749, *(uint32_t*)buf3750, *(uint32_t*)buf3751); + *(uchar*)buf3752 = rsGetElementAtYuv_uchar_U(*(rs_allocation*)buf3753, *(uint32_t*)buf3754, *(uint32_t*)buf3755); + *(uchar*)buf3756 = rsGetElementAtYuv_uchar_V(*(rs_allocation*)buf3757, *(uint32_t*)buf3758, *(uint32_t*)buf3759); + *(uchar*)buf3760 = rsGetElementAtYuv_uchar_Y(*(rs_allocation*)buf3761, *(uint32_t*)buf3762, *(uint32_t*)buf3763); + *(rs_allocation_cubemap_face*)buf3764 = rsGetFace(context); + *(uint32_t*)buf3765 = rsGetLod(context); + *(bool*)buf3766 = rsIsObject(*(rs_element*)buf3767); + *(bool*)buf3768 = rsIsObject(*(rs_type*)buf3769); + *(bool*)buf3770 = rsIsObject(*(rs_allocation*)buf3771); + *(bool*)buf3772 = rsIsObject(*(rs_sampler*)buf3773); + *(bool*)buf3774 = rsIsObject(*(rs_script*)buf3775); + *(bool*)buf3776 = rsIsSphereInFrustum((float4*) buf3777, (float4*) buf3778, (float4*) buf3779, (float4*) buf3780, (float4*) buf3781, (float4*) buf3782, (float4*) buf3783); + *(rs_tm**)buf3784 = rsLocaltime((rs_tm*) buf3785, (const rs_time_t*) buf3786); + *(float*)buf3787 = rsMatrixGet((const rs_matrix4x4*) buf3788, *(uint32_t*)buf3789, *(uint32_t*)buf3790); + *(float*)buf3791 = rsMatrixGet((const rs_matrix3x3*) buf3792, *(uint32_t*)buf3793, *(uint32_t*)buf3794); + *(float*)buf3795 = rsMatrixGet((const rs_matrix2x2*) buf3796, *(uint32_t*)buf3797, *(uint32_t*)buf3798); + *(bool*)buf3799 = rsMatrixInverse((rs_matrix4x4*) buf3800); + *(bool*)buf3801 = rsMatrixInverseTranspose((rs_matrix4x4*) buf3802); + rsMatrixLoad((rs_matrix4x4*) buf3803, (const float*) buf3804); + rsMatrixLoad((rs_matrix3x3*) buf3805, (const float*) buf3806); + rsMatrixLoad((rs_matrix2x2*) buf3807, (const float*) buf3808); + rsMatrixLoad((rs_matrix4x4*) buf3809, (const rs_matrix4x4*) buf3810); + rsMatrixLoad((rs_matrix3x3*) buf3811, (const rs_matrix3x3*) buf3812); + rsMatrixLoad((rs_matrix2x2*) buf3813, (const rs_matrix2x2*) buf3814); + rsMatrixLoad((rs_matrix4x4*) buf3815, (const rs_matrix3x3*) buf3816); + rsMatrixLoad((rs_matrix4x4*) buf3817, (const rs_matrix2x2*) buf3818); + rsMatrixLoadFrustum((rs_matrix4x4*) buf3819, *(float*)buf3820, *(float*)buf3821, *(float*)buf3822, *(float*)buf3823, *(float*)buf3824, *(float*)buf3825); + rsMatrixLoadIdentity((rs_matrix4x4*) buf3826); + rsMatrixLoadIdentity((rs_matrix3x3*) buf3827); + rsMatrixLoadIdentity((rs_matrix2x2*) buf3828); + rsMatrixLoadMultiply((rs_matrix4x4*) buf3829, (const rs_matrix4x4*) buf3830, (const rs_matrix4x4*) buf3831); + rsMatrixLoadMultiply((rs_matrix3x3*) buf3832, (const rs_matrix3x3*) buf3833, (const rs_matrix3x3*) buf3834); + rsMatrixLoadMultiply((rs_matrix2x2*) buf3835, (const rs_matrix2x2*) buf3836, (const rs_matrix2x2*) buf3837); + rsMatrixLoadOrtho((rs_matrix4x4*) buf3838, *(float*)buf3839, *(float*)buf3840, *(float*)buf3841, *(float*)buf3842, *(float*)buf3843, *(float*)buf3844); + rsMatrixLoadPerspective((rs_matrix4x4*) buf3845, *(float*)buf3846, *(float*)buf3847, *(float*)buf3848, *(float*)buf3849); + rsMatrixLoadRotate((rs_matrix4x4*) buf3850, *(float*)buf3851, *(float*)buf3852, *(float*)buf3853, *(float*)buf3854); + rsMatrixLoadScale((rs_matrix4x4*) buf3855, *(float*)buf3856, *(float*)buf3857, *(float*)buf3858); + rsMatrixLoadTranslate((rs_matrix4x4*) buf3859, *(float*)buf3860, *(float*)buf3861, *(float*)buf3862); + rsMatrixMultiply((rs_matrix4x4*) buf3863, (const rs_matrix4x4*) buf3864); + rsMatrixMultiply((rs_matrix3x3*) buf3865, (const rs_matrix3x3*) buf3866); + rsMatrixMultiply((rs_matrix2x2*) buf3867, (const rs_matrix2x2*) buf3868); + *(float4*)buf3869 = rsMatrixMultiply((const rs_matrix4x4*) buf3870, *(float4*)buf3871); + *(float4*)buf3872 = rsMatrixMultiply((const rs_matrix4x4*) buf3873, *(float3*)buf3874); + *(float4*)buf3875 = rsMatrixMultiply((const rs_matrix4x4*) buf3876, *(float2*)buf3877); + *(float3*)buf3878 = rsMatrixMultiply((const rs_matrix3x3*) buf3879, *(float3*)buf3880); + *(float3*)buf3881 = rsMatrixMultiply((const rs_matrix3x3*) buf3882, *(float2*)buf3883); + *(float2*)buf3884 = rsMatrixMultiply((const rs_matrix2x2*) buf3885, *(float2*)buf3886); + rsMatrixRotate((rs_matrix4x4*) buf3887, *(float*)buf3888, *(float*)buf3889, *(float*)buf3890, *(float*)buf3891); + rsMatrixScale((rs_matrix4x4*) buf3892, *(float*)buf3893, *(float*)buf3894, *(float*)buf3895); + rsMatrixSet((rs_matrix4x4*) buf3896, *(uint32_t*)buf3897, *(uint32_t*)buf3898, *(float*)buf3899); + rsMatrixSet((rs_matrix3x3*) buf3900, *(uint32_t*)buf3901, *(uint32_t*)buf3902, *(float*)buf3903); + rsMatrixSet((rs_matrix2x2*) buf3904, *(uint32_t*)buf3905, *(uint32_t*)buf3906, *(float*)buf3907); + rsMatrixTranslate((rs_matrix4x4*) buf3908, *(float*)buf3909, *(float*)buf3910, *(float*)buf3911); + rsMatrixTranspose((rs_matrix4x4*) buf3912); + rsMatrixTranspose((rs_matrix3x3*) buf3913); + rsMatrixTranspose((rs_matrix2x2*) buf3914); + *(uchar4*)buf3915 = rsPackColorTo8888(*(float*)buf3916, *(float*)buf3917, *(float*)buf3918); + *(uchar4*)buf3919 = rsPackColorTo8888(*(float*)buf3920, *(float*)buf3921, *(float*)buf3922, *(float*)buf3923); + *(uchar4*)buf3924 = rsPackColorTo8888(*(float3*)buf3925); + *(uchar4*)buf3926 = rsPackColorTo8888(*(float4*)buf3927); + rsQuaternionAdd((rs_quaternion*) buf3928, (const rs_quaternion*) buf3929); + rsQuaternionConjugate((rs_quaternion*) buf3930); + *(float*)buf3931 = rsQuaternionDot((const rs_quaternion*) buf3932, (const rs_quaternion*) buf3933); + rsQuaternionGetMatrixUnit((rs_matrix4x4*) buf3934, (const rs_quaternion*) buf3935); + rsQuaternionLoadRotate((rs_quaternion*) buf3936, *(float*)buf3937, *(float*)buf3938, *(float*)buf3939, *(float*)buf3940); + rsQuaternionLoadRotateUnit((rs_quaternion*) buf3941, *(float*)buf3942, *(float*)buf3943, *(float*)buf3944, *(float*)buf3945); + rsQuaternionMultiply((rs_quaternion*) buf3946, *(float*)buf3947); + rsQuaternionMultiply((rs_quaternion*) buf3948, (const rs_quaternion*) buf3949); + rsQuaternionNormalize((rs_quaternion*) buf3950); + rsQuaternionSet((rs_quaternion*) buf3951, *(float*)buf3952, *(float*)buf3953, *(float*)buf3954, *(float*)buf3955); + rsQuaternionSet((rs_quaternion*) buf3956, (const rs_quaternion*) buf3957); + rsQuaternionSlerp((rs_quaternion*) buf3958, (const rs_quaternion*) buf3959, (const rs_quaternion*) buf3960, *(float*)buf3961); + *(int*)buf3962 = rsRand(*(int*)buf3963); + *(int*)buf3964 = rsRand(*(int*)buf3965, *(int*)buf3966); + *(float*)buf3967 = rsRand(*(float*)buf3968); + *(float*)buf3969 = rsRand(*(float*)buf3970, *(float*)buf3971); + *(float4*)buf3972 = rsSample(*(rs_allocation*)buf3973, *(rs_sampler*)buf3974, *(float*)buf3975); + *(float4*)buf3976 = rsSample(*(rs_allocation*)buf3977, *(rs_sampler*)buf3978, *(float*)buf3979, *(float*)buf3980); + *(float4*)buf3981 = rsSample(*(rs_allocation*)buf3982, *(rs_sampler*)buf3983, *(float2*)buf3984); + *(float4*)buf3985 = rsSample(*(rs_allocation*)buf3986, *(rs_sampler*)buf3987, *(float2*)buf3988, *(float*)buf3989); + *(float*)buf3990 = rsSamplerGetAnisotropy(*(rs_sampler*)buf3991); + *(rs_sampler_value*)buf3992 = rsSamplerGetMagnification(*(rs_sampler*)buf3993); + *(rs_sampler_value*)buf3994 = rsSamplerGetMinification(*(rs_sampler*)buf3995); + *(rs_sampler_value*)buf3996 = rsSamplerGetWrapS(*(rs_sampler*)buf3997); + *(rs_sampler_value*)buf3998 = rsSamplerGetWrapT(*(rs_sampler*)buf3999); + *(bool*)buf4000 = rsSendToClient(*(int*)buf4001); + *(bool*)buf4002 = rsSendToClient(*(int*)buf4003, (const void*) buf4004, *(uint*)buf4005); + rsSendToClientBlocking(*(int*)buf4006); + rsSendToClientBlocking(*(int*)buf4007, (const void*) buf4008, *(uint*)buf4009); + rsSetElementAt(*(rs_allocation*)buf4010, (void*) buf4011, *(uint32_t*)buf4012); + rsSetElementAt(*(rs_allocation*)buf4013, (void*) buf4014, *(uint32_t*)buf4015, *(uint32_t*)buf4016); + rsSetElementAt_float(*(rs_allocation*)buf4017, *(float*)buf4018, *(uint32_t*)buf4019); + rsSetElementAt_float2(*(rs_allocation*)buf4020, *(float2*)buf4021, *(uint32_t*)buf4022); + rsSetElementAt_float3(*(rs_allocation*)buf4023, *(float3*)buf4024, *(uint32_t*)buf4025); + rsSetElementAt_float4(*(rs_allocation*)buf4026, *(float4*)buf4027, *(uint32_t*)buf4028); + rsSetElementAt_double(*(rs_allocation*)buf4029, *(double*)buf4030, *(uint32_t*)buf4031); + rsSetElementAt_double2(*(rs_allocation*)buf4032, *(double2*)buf4033, *(uint32_t*)buf4034); + rsSetElementAt_double3(*(rs_allocation*)buf4035, *(double3*)buf4036, *(uint32_t*)buf4037); + rsSetElementAt_double4(*(rs_allocation*)buf4038, *(double4*)buf4039, *(uint32_t*)buf4040); + rsSetElementAt_char(*(rs_allocation*)buf4041, *(char*)buf4042, *(uint32_t*)buf4043); + rsSetElementAt_char2(*(rs_allocation*)buf4044, *(char2*)buf4045, *(uint32_t*)buf4046); + rsSetElementAt_char3(*(rs_allocation*)buf4047, *(char3*)buf4048, *(uint32_t*)buf4049); + rsSetElementAt_char4(*(rs_allocation*)buf4050, *(char4*)buf4051, *(uint32_t*)buf4052); + rsSetElementAt_uchar(*(rs_allocation*)buf4053, *(uchar*)buf4054, *(uint32_t*)buf4055); + rsSetElementAt_uchar2(*(rs_allocation*)buf4056, *(uchar2*)buf4057, *(uint32_t*)buf4058); + rsSetElementAt_uchar3(*(rs_allocation*)buf4059, *(uchar3*)buf4060, *(uint32_t*)buf4061); + rsSetElementAt_uchar4(*(rs_allocation*)buf4062, *(uchar4*)buf4063, *(uint32_t*)buf4064); + rsSetElementAt_short(*(rs_allocation*)buf4065, *(short*)buf4066, *(uint32_t*)buf4067); + rsSetElementAt_short2(*(rs_allocation*)buf4068, *(short2*)buf4069, *(uint32_t*)buf4070); + rsSetElementAt_short3(*(rs_allocation*)buf4071, *(short3*)buf4072, *(uint32_t*)buf4073); + rsSetElementAt_short4(*(rs_allocation*)buf4074, *(short4*)buf4075, *(uint32_t*)buf4076); + rsSetElementAt_ushort(*(rs_allocation*)buf4077, *(ushort*)buf4078, *(uint32_t*)buf4079); + rsSetElementAt_ushort2(*(rs_allocation*)buf4080, *(ushort2*)buf4081, *(uint32_t*)buf4082); + rsSetElementAt_ushort3(*(rs_allocation*)buf4083, *(ushort3*)buf4084, *(uint32_t*)buf4085); + rsSetElementAt_ushort4(*(rs_allocation*)buf4086, *(ushort4*)buf4087, *(uint32_t*)buf4088); + rsSetElementAt_int(*(rs_allocation*)buf4089, *(int*)buf4090, *(uint32_t*)buf4091); + rsSetElementAt_int2(*(rs_allocation*)buf4092, *(int2*)buf4093, *(uint32_t*)buf4094); + rsSetElementAt_int3(*(rs_allocation*)buf4095, *(int3*)buf4096, *(uint32_t*)buf4097); + rsSetElementAt_int4(*(rs_allocation*)buf4098, *(int4*)buf4099, *(uint32_t*)buf4100); + rsSetElementAt_uint(*(rs_allocation*)buf4101, *(uint*)buf4102, *(uint32_t*)buf4103); + rsSetElementAt_uint2(*(rs_allocation*)buf4104, *(uint2*)buf4105, *(uint32_t*)buf4106); + rsSetElementAt_uint3(*(rs_allocation*)buf4107, *(uint3*)buf4108, *(uint32_t*)buf4109); + rsSetElementAt_uint4(*(rs_allocation*)buf4110, *(uint4*)buf4111, *(uint32_t*)buf4112); + rsSetElementAt_long(*(rs_allocation*)buf4113, *(long*)buf4114, *(uint32_t*)buf4115); + rsSetElementAt_long2(*(rs_allocation*)buf4116, *(long2*)buf4117, *(uint32_t*)buf4118); + rsSetElementAt_long3(*(rs_allocation*)buf4119, *(long3*)buf4120, *(uint32_t*)buf4121); + rsSetElementAt_long4(*(rs_allocation*)buf4122, *(long4*)buf4123, *(uint32_t*)buf4124); + rsSetElementAt_ulong(*(rs_allocation*)buf4125, *(ulong*)buf4126, *(uint32_t*)buf4127); + rsSetElementAt_ulong2(*(rs_allocation*)buf4128, *(ulong2*)buf4129, *(uint32_t*)buf4130); + rsSetElementAt_ulong3(*(rs_allocation*)buf4131, *(ulong3*)buf4132, *(uint32_t*)buf4133); + rsSetElementAt_ulong4(*(rs_allocation*)buf4134, *(ulong4*)buf4135, *(uint32_t*)buf4136); + rsSetElementAt_float(*(rs_allocation*)buf4137, *(float*)buf4138, *(uint32_t*)buf4139, *(uint32_t*)buf4140); + rsSetElementAt_float2(*(rs_allocation*)buf4141, *(float2*)buf4142, *(uint32_t*)buf4143, *(uint32_t*)buf4144); + rsSetElementAt_float3(*(rs_allocation*)buf4145, *(float3*)buf4146, *(uint32_t*)buf4147, *(uint32_t*)buf4148); + rsSetElementAt_float4(*(rs_allocation*)buf4149, *(float4*)buf4150, *(uint32_t*)buf4151, *(uint32_t*)buf4152); + rsSetElementAt_double(*(rs_allocation*)buf4153, *(double*)buf4154, *(uint32_t*)buf4155, *(uint32_t*)buf4156); + rsSetElementAt_double2(*(rs_allocation*)buf4157, *(double2*)buf4158, *(uint32_t*)buf4159, *(uint32_t*)buf4160); + rsSetElementAt_double3(*(rs_allocation*)buf4161, *(double3*)buf4162, *(uint32_t*)buf4163, *(uint32_t*)buf4164); + rsSetElementAt_double4(*(rs_allocation*)buf4165, *(double4*)buf4166, *(uint32_t*)buf4167, *(uint32_t*)buf4168); + rsSetElementAt_char(*(rs_allocation*)buf4169, *(char*)buf4170, *(uint32_t*)buf4171, *(uint32_t*)buf4172); + rsSetElementAt_char2(*(rs_allocation*)buf4173, *(char2*)buf4174, *(uint32_t*)buf4175, *(uint32_t*)buf4176); + rsSetElementAt_char3(*(rs_allocation*)buf4177, *(char3*)buf4178, *(uint32_t*)buf4179, *(uint32_t*)buf4180); + rsSetElementAt_char4(*(rs_allocation*)buf4181, *(char4*)buf4182, *(uint32_t*)buf4183, *(uint32_t*)buf4184); + rsSetElementAt_uchar(*(rs_allocation*)buf4185, *(uchar*)buf4186, *(uint32_t*)buf4187, *(uint32_t*)buf4188); + rsSetElementAt_uchar2(*(rs_allocation*)buf4189, *(uchar2*)buf4190, *(uint32_t*)buf4191, *(uint32_t*)buf4192); + rsSetElementAt_uchar3(*(rs_allocation*)buf4193, *(uchar3*)buf4194, *(uint32_t*)buf4195, *(uint32_t*)buf4196); + rsSetElementAt_uchar4(*(rs_allocation*)buf4197, *(uchar4*)buf4198, *(uint32_t*)buf4199, *(uint32_t*)buf4200); + rsSetElementAt_short(*(rs_allocation*)buf4201, *(short*)buf4202, *(uint32_t*)buf4203, *(uint32_t*)buf4204); + rsSetElementAt_short2(*(rs_allocation*)buf4205, *(short2*)buf4206, *(uint32_t*)buf4207, *(uint32_t*)buf4208); + rsSetElementAt_short3(*(rs_allocation*)buf4209, *(short3*)buf4210, *(uint32_t*)buf4211, *(uint32_t*)buf4212); + rsSetElementAt_short4(*(rs_allocation*)buf4213, *(short4*)buf4214, *(uint32_t*)buf4215, *(uint32_t*)buf4216); + rsSetElementAt_ushort(*(rs_allocation*)buf4217, *(ushort*)buf4218, *(uint32_t*)buf4219, *(uint32_t*)buf4220); + rsSetElementAt_ushort2(*(rs_allocation*)buf4221, *(ushort2*)buf4222, *(uint32_t*)buf4223, *(uint32_t*)buf4224); + rsSetElementAt_ushort3(*(rs_allocation*)buf4225, *(ushort3*)buf4226, *(uint32_t*)buf4227, *(uint32_t*)buf4228); + rsSetElementAt_ushort4(*(rs_allocation*)buf4229, *(ushort4*)buf4230, *(uint32_t*)buf4231, *(uint32_t*)buf4232); + rsSetElementAt_int(*(rs_allocation*)buf4233, *(int*)buf4234, *(uint32_t*)buf4235, *(uint32_t*)buf4236); + rsSetElementAt_int2(*(rs_allocation*)buf4237, *(int2*)buf4238, *(uint32_t*)buf4239, *(uint32_t*)buf4240); + rsSetElementAt_int3(*(rs_allocation*)buf4241, *(int3*)buf4242, *(uint32_t*)buf4243, *(uint32_t*)buf4244); + rsSetElementAt_int4(*(rs_allocation*)buf4245, *(int4*)buf4246, *(uint32_t*)buf4247, *(uint32_t*)buf4248); + rsSetElementAt_uint(*(rs_allocation*)buf4249, *(uint*)buf4250, *(uint32_t*)buf4251, *(uint32_t*)buf4252); + rsSetElementAt_uint2(*(rs_allocation*)buf4253, *(uint2*)buf4254, *(uint32_t*)buf4255, *(uint32_t*)buf4256); + rsSetElementAt_uint3(*(rs_allocation*)buf4257, *(uint3*)buf4258, *(uint32_t*)buf4259, *(uint32_t*)buf4260); + rsSetElementAt_uint4(*(rs_allocation*)buf4261, *(uint4*)buf4262, *(uint32_t*)buf4263, *(uint32_t*)buf4264); + rsSetElementAt_long(*(rs_allocation*)buf4265, *(long*)buf4266, *(uint32_t*)buf4267, *(uint32_t*)buf4268); + rsSetElementAt_long2(*(rs_allocation*)buf4269, *(long2*)buf4270, *(uint32_t*)buf4271, *(uint32_t*)buf4272); + rsSetElementAt_long3(*(rs_allocation*)buf4273, *(long3*)buf4274, *(uint32_t*)buf4275, *(uint32_t*)buf4276); + rsSetElementAt_long4(*(rs_allocation*)buf4277, *(long4*)buf4278, *(uint32_t*)buf4279, *(uint32_t*)buf4280); + rsSetElementAt_ulong(*(rs_allocation*)buf4281, *(ulong*)buf4282, *(uint32_t*)buf4283, *(uint32_t*)buf4284); + rsSetElementAt_ulong2(*(rs_allocation*)buf4285, *(ulong2*)buf4286, *(uint32_t*)buf4287, *(uint32_t*)buf4288); + rsSetElementAt_ulong3(*(rs_allocation*)buf4289, *(ulong3*)buf4290, *(uint32_t*)buf4291, *(uint32_t*)buf4292); + rsSetElementAt_ulong4(*(rs_allocation*)buf4293, *(ulong4*)buf4294, *(uint32_t*)buf4295, *(uint32_t*)buf4296); + rsSetElementAt_float(*(rs_allocation*)buf4297, *(float*)buf4298, *(uint32_t*)buf4299, *(uint32_t*)buf4300, *(uint32_t*)buf4301); + rsSetElementAt_float2(*(rs_allocation*)buf4302, *(float2*)buf4303, *(uint32_t*)buf4304, *(uint32_t*)buf4305, *(uint32_t*)buf4306); + rsSetElementAt_float3(*(rs_allocation*)buf4307, *(float3*)buf4308, *(uint32_t*)buf4309, *(uint32_t*)buf4310, *(uint32_t*)buf4311); + rsSetElementAt_float4(*(rs_allocation*)buf4312, *(float4*)buf4313, *(uint32_t*)buf4314, *(uint32_t*)buf4315, *(uint32_t*)buf4316); + rsSetElementAt_double(*(rs_allocation*)buf4317, *(double*)buf4318, *(uint32_t*)buf4319, *(uint32_t*)buf4320, *(uint32_t*)buf4321); + rsSetElementAt_double2(*(rs_allocation*)buf4322, *(double2*)buf4323, *(uint32_t*)buf4324, *(uint32_t*)buf4325, *(uint32_t*)buf4326); + rsSetElementAt_double3(*(rs_allocation*)buf4327, *(double3*)buf4328, *(uint32_t*)buf4329, *(uint32_t*)buf4330, *(uint32_t*)buf4331); + rsSetElementAt_double4(*(rs_allocation*)buf4332, *(double4*)buf4333, *(uint32_t*)buf4334, *(uint32_t*)buf4335, *(uint32_t*)buf4336); + rsSetElementAt_char(*(rs_allocation*)buf4337, *(char*)buf4338, *(uint32_t*)buf4339, *(uint32_t*)buf4340, *(uint32_t*)buf4341); + rsSetElementAt_char2(*(rs_allocation*)buf4342, *(char2*)buf4343, *(uint32_t*)buf4344, *(uint32_t*)buf4345, *(uint32_t*)buf4346); + rsSetElementAt_char3(*(rs_allocation*)buf4347, *(char3*)buf4348, *(uint32_t*)buf4349, *(uint32_t*)buf4350, *(uint32_t*)buf4351); + rsSetElementAt_char4(*(rs_allocation*)buf4352, *(char4*)buf4353, *(uint32_t*)buf4354, *(uint32_t*)buf4355, *(uint32_t*)buf4356); + rsSetElementAt_uchar(*(rs_allocation*)buf4357, *(uchar*)buf4358, *(uint32_t*)buf4359, *(uint32_t*)buf4360, *(uint32_t*)buf4361); + rsSetElementAt_uchar2(*(rs_allocation*)buf4362, *(uchar2*)buf4363, *(uint32_t*)buf4364, *(uint32_t*)buf4365, *(uint32_t*)buf4366); + rsSetElementAt_uchar3(*(rs_allocation*)buf4367, *(uchar3*)buf4368, *(uint32_t*)buf4369, *(uint32_t*)buf4370, *(uint32_t*)buf4371); + rsSetElementAt_uchar4(*(rs_allocation*)buf4372, *(uchar4*)buf4373, *(uint32_t*)buf4374, *(uint32_t*)buf4375, *(uint32_t*)buf4376); + rsSetElementAt_short(*(rs_allocation*)buf4377, *(short*)buf4378, *(uint32_t*)buf4379, *(uint32_t*)buf4380, *(uint32_t*)buf4381); + rsSetElementAt_short2(*(rs_allocation*)buf4382, *(short2*)buf4383, *(uint32_t*)buf4384, *(uint32_t*)buf4385, *(uint32_t*)buf4386); + rsSetElementAt_short3(*(rs_allocation*)buf4387, *(short3*)buf4388, *(uint32_t*)buf4389, *(uint32_t*)buf4390, *(uint32_t*)buf4391); + rsSetElementAt_short4(*(rs_allocation*)buf4392, *(short4*)buf4393, *(uint32_t*)buf4394, *(uint32_t*)buf4395, *(uint32_t*)buf4396); + rsSetElementAt_ushort(*(rs_allocation*)buf4397, *(ushort*)buf4398, *(uint32_t*)buf4399, *(uint32_t*)buf4400, *(uint32_t*)buf4401); + rsSetElementAt_ushort2(*(rs_allocation*)buf4402, *(ushort2*)buf4403, *(uint32_t*)buf4404, *(uint32_t*)buf4405, *(uint32_t*)buf4406); + rsSetElementAt_ushort3(*(rs_allocation*)buf4407, *(ushort3*)buf4408, *(uint32_t*)buf4409, *(uint32_t*)buf4410, *(uint32_t*)buf4411); + rsSetElementAt_ushort4(*(rs_allocation*)buf4412, *(ushort4*)buf4413, *(uint32_t*)buf4414, *(uint32_t*)buf4415, *(uint32_t*)buf4416); + rsSetElementAt_int(*(rs_allocation*)buf4417, *(int*)buf4418, *(uint32_t*)buf4419, *(uint32_t*)buf4420, *(uint32_t*)buf4421); + rsSetElementAt_int2(*(rs_allocation*)buf4422, *(int2*)buf4423, *(uint32_t*)buf4424, *(uint32_t*)buf4425, *(uint32_t*)buf4426); + rsSetElementAt_int3(*(rs_allocation*)buf4427, *(int3*)buf4428, *(uint32_t*)buf4429, *(uint32_t*)buf4430, *(uint32_t*)buf4431); + rsSetElementAt_int4(*(rs_allocation*)buf4432, *(int4*)buf4433, *(uint32_t*)buf4434, *(uint32_t*)buf4435, *(uint32_t*)buf4436); + rsSetElementAt_uint(*(rs_allocation*)buf4437, *(uint*)buf4438, *(uint32_t*)buf4439, *(uint32_t*)buf4440, *(uint32_t*)buf4441); + rsSetElementAt_uint2(*(rs_allocation*)buf4442, *(uint2*)buf4443, *(uint32_t*)buf4444, *(uint32_t*)buf4445, *(uint32_t*)buf4446); + rsSetElementAt_uint3(*(rs_allocation*)buf4447, *(uint3*)buf4448, *(uint32_t*)buf4449, *(uint32_t*)buf4450, *(uint32_t*)buf4451); + rsSetElementAt_uint4(*(rs_allocation*)buf4452, *(uint4*)buf4453, *(uint32_t*)buf4454, *(uint32_t*)buf4455, *(uint32_t*)buf4456); + rsSetElementAt_long(*(rs_allocation*)buf4457, *(long*)buf4458, *(uint32_t*)buf4459, *(uint32_t*)buf4460, *(uint32_t*)buf4461); + rsSetElementAt_long2(*(rs_allocation*)buf4462, *(long2*)buf4463, *(uint32_t*)buf4464, *(uint32_t*)buf4465, *(uint32_t*)buf4466); + rsSetElementAt_long3(*(rs_allocation*)buf4467, *(long3*)buf4468, *(uint32_t*)buf4469, *(uint32_t*)buf4470, *(uint32_t*)buf4471); + rsSetElementAt_long4(*(rs_allocation*)buf4472, *(long4*)buf4473, *(uint32_t*)buf4474, *(uint32_t*)buf4475, *(uint32_t*)buf4476); + rsSetElementAt_ulong(*(rs_allocation*)buf4477, *(ulong*)buf4478, *(uint32_t*)buf4479, *(uint32_t*)buf4480, *(uint32_t*)buf4481); + rsSetElementAt_ulong2(*(rs_allocation*)buf4482, *(ulong2*)buf4483, *(uint32_t*)buf4484, *(uint32_t*)buf4485, *(uint32_t*)buf4486); + rsSetElementAt_ulong3(*(rs_allocation*)buf4487, *(ulong3*)buf4488, *(uint32_t*)buf4489, *(uint32_t*)buf4490, *(uint32_t*)buf4491); + rsSetElementAt_ulong4(*(rs_allocation*)buf4492, *(ulong4*)buf4493, *(uint32_t*)buf4494, *(uint32_t*)buf4495, *(uint32_t*)buf4496); + rsSetElementAt_half(*(rs_allocation*)buf4497, *(half*)buf4498, *(uint32_t*)buf4499); + rsSetElementAt_half2(*(rs_allocation*)buf4500, *(half2*)buf4501, *(uint32_t*)buf4502); + rsSetElementAt_half3(*(rs_allocation*)buf4503, *(half3*)buf4504, *(uint32_t*)buf4505); + rsSetElementAt_half4(*(rs_allocation*)buf4506, *(half4*)buf4507, *(uint32_t*)buf4508); + rsSetElementAt_half(*(rs_allocation*)buf4509, *(half*)buf4510, *(uint32_t*)buf4511, *(uint32_t*)buf4512); + rsSetElementAt_half2(*(rs_allocation*)buf4513, *(half2*)buf4514, *(uint32_t*)buf4515, *(uint32_t*)buf4516); + rsSetElementAt_half3(*(rs_allocation*)buf4517, *(half3*)buf4518, *(uint32_t*)buf4519, *(uint32_t*)buf4520); + rsSetElementAt_half4(*(rs_allocation*)buf4521, *(half4*)buf4522, *(uint32_t*)buf4523, *(uint32_t*)buf4524); + rsSetElementAt_half(*(rs_allocation*)buf4525, *(half*)buf4526, *(uint32_t*)buf4527, *(uint32_t*)buf4528, *(uint32_t*)buf4529); + rsSetElementAt_half2(*(rs_allocation*)buf4530, *(half2*)buf4531, *(uint32_t*)buf4532, *(uint32_t*)buf4533, *(uint32_t*)buf4534); + rsSetElementAt_half3(*(rs_allocation*)buf4535, *(half3*)buf4536, *(uint32_t*)buf4537, *(uint32_t*)buf4538, *(uint32_t*)buf4539); + rsSetElementAt_half4(*(rs_allocation*)buf4540, *(half4*)buf4541, *(uint32_t*)buf4542, *(uint32_t*)buf4543, *(uint32_t*)buf4544); + rsSetObject((rs_element*) buf4545, *(rs_element*)buf4546); + rsSetObject((rs_type*) buf4547, *(rs_type*)buf4548); + rsSetObject((rs_allocation*) buf4549, *(rs_allocation*)buf4550); + rsSetObject((rs_sampler*) buf4551, *(rs_sampler*)buf4552); + rsSetObject((rs_script*) buf4553, *(rs_script*)buf4554); + *(rs_time_t*)buf4555 = rsTime((rs_time_t*) buf4556); + *(float4*)buf4557 = rsUnpackColor8888(*(uchar4*)buf4558); + *(int64_t*)buf4559 = rsUptimeMillis(); + *(int64_t*)buf4560 = rsUptimeNanos(); + *(float4*)buf4561 = rsYuvToRGBA_float4(*(uchar*)buf4562, *(uchar*)buf4563, *(uchar*)buf4564); + *(uchar4*)buf4565 = rsYuvToRGBA_uchar4(*(uchar*)buf4566, *(uchar*)buf4567, *(uchar*)buf4568); + *(float*)buf4569 = rsqrt(*(float*)buf4570); + *(float2*)buf4571 = rsqrt(*(float2*)buf4572); + *(float3*)buf4573 = rsqrt(*(float3*)buf4574); + *(float4*)buf4575 = rsqrt(*(float4*)buf4576); + *(float*)buf4577 = sign(*(float*)buf4578); + *(float2*)buf4579 = sign(*(float2*)buf4580); + *(float3*)buf4581 = sign(*(float3*)buf4582); + *(float4*)buf4583 = sign(*(float4*)buf4584); + *(float*)buf4585 = sin(*(float*)buf4586); + *(float2*)buf4587 = sin(*(float2*)buf4588); + *(float3*)buf4589 = sin(*(float3*)buf4590); + *(float4*)buf4591 = sin(*(float4*)buf4592); + *(float*)buf4593 = sincos(*(float*)buf4594, (float*) buf4595); + *(float2*)buf4596 = sincos(*(float2*)buf4597, (float2*) buf4598); + *(float3*)buf4599 = sincos(*(float3*)buf4600, (float3*) buf4601); + *(float4*)buf4602 = sincos(*(float4*)buf4603, (float4*) buf4604); + *(float*)buf4605 = sinh(*(float*)buf4606); + *(float2*)buf4607 = sinh(*(float2*)buf4608); + *(float3*)buf4609 = sinh(*(float3*)buf4610); + *(float4*)buf4611 = sinh(*(float4*)buf4612); + *(float*)buf4613 = sinpi(*(float*)buf4614); + *(float2*)buf4615 = sinpi(*(float2*)buf4616); + *(float3*)buf4617 = sinpi(*(float3*)buf4618); + *(float4*)buf4619 = sinpi(*(float4*)buf4620); + *(float*)buf4621 = sqrt(*(float*)buf4622); + *(float2*)buf4623 = sqrt(*(float2*)buf4624); + *(float3*)buf4625 = sqrt(*(float3*)buf4626); + *(float4*)buf4627 = sqrt(*(float4*)buf4628); + *(float*)buf4629 = step(*(float*)buf4630, *(float*)buf4631); + *(float2*)buf4632 = step(*(float2*)buf4633, *(float2*)buf4634); + *(float3*)buf4635 = step(*(float3*)buf4636, *(float3*)buf4637); + *(float4*)buf4638 = step(*(float4*)buf4639, *(float4*)buf4640); + *(float2*)buf4641 = step(*(float2*)buf4642, *(float*)buf4643); + *(float3*)buf4644 = step(*(float3*)buf4645, *(float*)buf4646); + *(float4*)buf4647 = step(*(float4*)buf4648, *(float*)buf4649); + *(float2*)buf4650 = step(*(float*)buf4651, *(float2*)buf4652); + *(float3*)buf4653 = step(*(float*)buf4654, *(float3*)buf4655); + *(float4*)buf4656 = step(*(float*)buf4657, *(float4*)buf4658); + *(float*)buf4659 = tan(*(float*)buf4660); + *(float2*)buf4661 = tan(*(float2*)buf4662); + *(float3*)buf4663 = tan(*(float3*)buf4664); + *(float4*)buf4665 = tan(*(float4*)buf4666); + *(float*)buf4667 = tanh(*(float*)buf4668); + *(float2*)buf4669 = tanh(*(float2*)buf4670); + *(float3*)buf4671 = tanh(*(float3*)buf4672); + *(float4*)buf4673 = tanh(*(float4*)buf4674); + *(float*)buf4675 = tanpi(*(float*)buf4676); + *(float2*)buf4677 = tanpi(*(float2*)buf4678); + *(float3*)buf4679 = tanpi(*(float3*)buf4680); + *(float4*)buf4681 = tanpi(*(float4*)buf4682); + *(float*)buf4683 = tgamma(*(float*)buf4684); + *(float2*)buf4685 = tgamma(*(float2*)buf4686); + *(float3*)buf4687 = tgamma(*(float3*)buf4688); + *(float4*)buf4689 = tgamma(*(float4*)buf4690); + *(float*)buf4691 = trunc(*(float*)buf4692); + *(float2*)buf4693 = trunc(*(float2*)buf4694); + *(float3*)buf4695 = trunc(*(float3*)buf4696); + *(float4*)buf4697 = trunc(*(float4*)buf4698); +}
diff --git a/slang/tests/P_all_api_23/stderr.txt.expect b/slang/tests/P_all_api_23/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_23/stderr.txt.expect
diff --git a/slang/tests/P_all_api_23/stdout.txt.expect b/slang/tests/P_all_api_23/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_all_api_23/stdout.txt.expect
diff --git a/slang/tests/P_alloc_in_struct/alloc_in_struct.rs b/slang/tests/P_alloc_in_struct/alloc_in_struct.rs new file mode 100644 index 0000000..eaefd87 --- /dev/null +++ b/slang/tests/P_alloc_in_struct/alloc_in_struct.rs
@@ -0,0 +1,7 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +struct s { + rs_allocation a; +} myStruct; +
diff --git a/slang/tests/P_alloc_in_struct/stderr.txt.expect b/slang/tests/P_alloc_in_struct/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_alloc_in_struct/stderr.txt.expect
diff --git a/slang/tests/P_alloc_in_struct/stdout.txt.expect b/slang/tests/P_alloc_in_struct/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_alloc_in_struct/stdout.txt.expect
diff --git a/slang/tests/P_array_cpp/array.rs b/slang/tests/P_array_cpp/array.rs new file mode 100644 index 0000000..9a36c6d --- /dev/null +++ b/slang/tests/P_array_cpp/array.rs
@@ -0,0 +1,5 @@ +// -reflect-c++ +#pragma version(1) +#pragma rs java_package_name(foo) + +float array[16];
diff --git a/slang/tests/P_array_cpp/stderr.txt.expect b/slang/tests/P_array_cpp/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_array_cpp/stderr.txt.expect
diff --git a/slang/tests/P_array_cpp/stdout.txt.expect b/slang/tests/P_array_cpp/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_array_cpp/stdout.txt.expect
diff --git a/slang/tests/P_array_init/array_init.rs b/slang/tests/P_array_init/array_init.rs new file mode 100644 index 0000000..2a4fe0f --- /dev/null +++ b/slang/tests/P_array_init/array_init.rs
@@ -0,0 +1,22 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +const int ic = 99; + +int ica[2] = {ic, 1000}; + +float fa[4] = {1.0, 9.9999f}; +double da[2] = {7.0, 8.88888}; +char ca[4] = {'a', 7, 'b', 'c'}; +short sa[4] = {1, 1, 2, 3}; +int ia[4] = {5, 8}; +long la[2] = {13, 21}; +long long lla[4] = {34}; +bool ba[3] = {true, false}; + +// Clang should implicitly promote this type to have a constant size of 3. +char implicitArray[] = { 'a', 'b', 'c' }; + +// Clang should implicitly promote this type to have a constant size of 1. +// Note that this creates a warning. +char implicitArrayUninit[];
diff --git a/slang/tests/P_array_init/stderr.txt.expect b/slang/tests/P_array_init/stderr.txt.expect new file mode 100644 index 0000000..387a51d --- /dev/null +++ b/slang/tests/P_array_init/stderr.txt.expect
@@ -0,0 +1 @@ +array_init.rs:22:6: warning: tentative array definition assumed to have one element
diff --git a/slang/tests/P_array_init/stdout.txt.expect b/slang/tests/P_array_init/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_array_init/stdout.txt.expect
diff --git a/slang/tests/P_compute/compute.rs b/slang/tests/P_compute/compute.rs new file mode 100644 index 0000000..9ed58b8 --- /dev/null +++ b/slang/tests/P_compute/compute.rs
@@ -0,0 +1,12 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const void *usrData, + uint32_t x, uint32_t y) { +} + +void bar(int i, float f) { +} + +void foo (int *p) { +}
diff --git a/slang/tests/P_compute/stderr.txt.expect b/slang/tests/P_compute/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_compute/stderr.txt.expect
diff --git a/slang/tests/P_compute/stdout.txt.expect b/slang/tests/P_compute/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_compute/stdout.txt.expect
diff --git a/slang/tests/P_constant/constant.rs b/slang/tests/P_constant/constant.rs new file mode 100644 index 0000000..4457e37 --- /dev/null +++ b/slang/tests/P_constant/constant.rs
@@ -0,0 +1,22 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +const float floatTest = 1.99f; +const double doubleTest = 2.05; +const char charTest = -8; +const short shortTest = -16; +const int intTest = -32; +const long longTest = 17179869184l; // 1 << 34 +const long long longlongTest = 68719476736l; // 1 << 36 + +const uchar ucharTest = 8; +const ushort ushortTest = 16; +const uint uintTest = 32; +const ulong ulongTest = 4611686018427387904L; +const int64_t int64_tTest = -17179869184l; // - 1 << 34 +const uint64_t uint64_tTest = 117179869184l; + +const bool boolTest = true; + +extern const int i = 5; +
diff --git a/slang/tests/P_constant/stderr.txt.expect b/slang/tests/P_constant/stderr.txt.expect new file mode 100644 index 0000000..3728bee --- /dev/null +++ b/slang/tests/P_constant/stderr.txt.expect
@@ -0,0 +1 @@ +constant.rs:21:18: warning: 'extern' variable has an initializer
diff --git a/slang/tests/P_constant/stdout.txt.expect b/slang/tests/P_constant/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_constant/stdout.txt.expect
diff --git a/slang/tests/P_debug/debug.rs b/slang/tests/P_debug/debug.rs new file mode 100644 index 0000000..69ede2a --- /dev/null +++ b/slang/tests/P_debug/debug.rs
@@ -0,0 +1,5 @@ +// -O0 -g +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +int i;
diff --git a/slang/tests/P_debug/stderr.txt.expect b/slang/tests/P_debug/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_debug/stderr.txt.expect
diff --git a/slang/tests/P_debug/stdout.txt.expect b/slang/tests/P_debug/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_debug/stdout.txt.expect
diff --git a/slang/tests/P_dummy_root/dummy_root.rs b/slang/tests/P_dummy_root/dummy_root.rs new file mode 100644 index 0000000..7731d94 --- /dev/null +++ b/slang/tests/P_dummy_root/dummy_root.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void foo (int *p) { +}
diff --git a/slang/tests/P_dummy_root/stderr.txt.expect b/slang/tests/P_dummy_root/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_dummy_root/stderr.txt.expect
diff --git a/slang/tests/P_dummy_root/stdout.txt.expect b/slang/tests/P_dummy_root/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_dummy_root/stdout.txt.expect
diff --git a/slang/tests/P_export_types/export_types.rs b/slang/tests/P_export_types/export_types.rs new file mode 100644 index 0000000..8c725f1 --- /dev/null +++ b/slang/tests/P_export_types/export_types.rs
@@ -0,0 +1,32 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +half h = (half) 1.2f; +half2 h2 = {(half) 1.2f, (half) 2.3f}; +half3 h3 = {(half) 1.2f, (half) 2.3f, (half) 3.4f}; +half4 h4 = {(half) 1.2f, (half) 2.3f, (half) 3.4f, (half) 4.5f}; +float f = 9.9999f; +double d = 7.0; +char c = 'a'; +unsigned char uc = 'a'; +short s = 1; +unsigned short us = 1; +int i = 5; +unsigned int ui; +long l = 13; +unsigned long ul = 13; +long long ll = 34; +unsigned long long ull = 34; +bool b = true; + +rs_element element; +rs_type type; +rs_allocation allocation; +rs_sampler sampler; +rs_script script; +rs_data_kind dk; +rs_data_type dt; + +float *fp; +int *ip; +
diff --git a/slang/tests/P_export_types/stderr.txt.expect b/slang/tests/P_export_types/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_export_types/stderr.txt.expect
diff --git a/slang/tests/P_export_types/stdout.txt.expect b/slang/tests/P_export_types/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_export_types/stdout.txt.expect
diff --git a/slang/tests/P_export_types_v20/export_types.rs b/slang/tests/P_export_types_v20/export_types.rs new file mode 100644 index 0000000..61d55e1 --- /dev/null +++ b/slang/tests/P_export_types_v20/export_types.rs
@@ -0,0 +1,37 @@ +// -target-api 20 +#pragma version(1) +#pragma rs java_package_name(foo) + +#include "rs_graphics.rsh" + +float f = 9.9999f; +double d = 7.0; +char c = 'a'; +unsigned char uc = 'a'; +short s = 1; +unsigned short us = 1; +int i = 5; +unsigned int ui; +long l = 13; +unsigned long ul = 13; +long long ll = 34; +unsigned long long ull = 34; +bool b = true; + +rs_element element; +rs_type type; +rs_allocation allocation; +rs_sampler sampler; +rs_script script; +rs_mesh mesh; +rs_program_fragment program_fragment; +rs_program_vertex program_vertex; +rs_program_raster program_raster; +rs_program_store program_store; +rs_font font; +rs_data_kind dk; +rs_data_type dt; + +float *fp; +int *ip; +
diff --git a/slang/tests/P_export_types_v20/stderr.txt.expect b/slang/tests/P_export_types_v20/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_export_types_v20/stderr.txt.expect
diff --git a/slang/tests/P_export_types_v20/stdout.txt.expect b/slang/tests/P_export_types_v20/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_export_types_v20/stdout.txt.expect
diff --git a/slang/tests/P_extern_const/extern_const.rs b/slang/tests/P_extern_const/extern_const.rs new file mode 100644 index 0000000..e80906a --- /dev/null +++ b/slang/tests/P_extern_const/extern_const.rs
@@ -0,0 +1,7 @@ +// -I . +#pragma version(1) +#pragma rs java_package_name(foo) + +int __attribute__((kernel)) foo() { + return my_extern_const_in_header; +}
diff --git a/slang/tests/P_extern_const/rs_core.rsh b/slang/tests/P_extern_const/rs_core.rsh new file mode 100644 index 0000000..4332ed0 --- /dev/null +++ b/slang/tests/P_extern_const/rs_core.rsh
@@ -0,0 +1,8 @@ +// Fake rs_core.rsh header file +// +// We use -I . to pick up this header file implicitly, instead of the proper +// rs_core.rsh header file. + +// Declare an uninitialized external constant, which should be ok for our +// official header files. +extern const int my_extern_const_in_header;
diff --git a/slang/tests/P_extern_const/stderr.txt.expect b/slang/tests/P_extern_const/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_extern_const/stderr.txt.expect
diff --git a/slang/tests/P_extern_const/stdout.txt.expect b/slang/tests/P_extern_const/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_extern_const/stdout.txt.expect
diff --git a/slang/tests/P_float3/float3.rs b/slang/tests/P_float3/float3.rs new file mode 100644 index 0000000..1255992 --- /dev/null +++ b/slang/tests/P_float3/float3.rs
@@ -0,0 +1,11 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +float3 f; +float3 f1[1]; + +struct s { + float3 f; + float3 f1[1]; +} myStruct; +
diff --git a/slang/tests/P_float3/stderr.txt.expect b/slang/tests/P_float3/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_float3/stderr.txt.expect
diff --git a/slang/tests/P_float3/stdout.txt.expect b/slang/tests/P_float3/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_float3/stdout.txt.expect
diff --git a/slang/tests/P_foreach/foreach.rs b/slang/tests/P_foreach/foreach.rs new file mode 100644 index 0000000..c23fb81 --- /dev/null +++ b/slang/tests/P_foreach/foreach.rs
@@ -0,0 +1,15 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +void oldFoo(const int* a, int *b) { + *b = *a; +} + +int RS_KERNEL foo(int a) { + return a; +} + +void testStart(rs_allocation in, rs_allocation out) { + rsForEach(foo, in, out); +}
diff --git a/slang/tests/P_foreach/stderr.txt.expect b/slang/tests/P_foreach/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_foreach/stderr.txt.expect
diff --git a/slang/tests/P_foreach/stdout.txt.expect b/slang/tests/P_foreach/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_foreach/stdout.txt.expect
diff --git a/slang/tests/P_foreach_multi/foreach_multi.rs b/slang/tests/P_foreach_multi/foreach_multi.rs new file mode 100644 index 0000000..e8a597e --- /dev/null +++ b/slang/tests/P_foreach_multi/foreach_multi.rs
@@ -0,0 +1,11 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +int RS_KERNEL foo(int a, int b) { + return a + b; +} + +void testStart(rs_allocation in, rs_allocation out) { + rsForEach(foo, in, in, out); +}
diff --git a/slang/tests/P_foreach_multi/stderr.txt.expect b/slang/tests/P_foreach_multi/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_foreach_multi/stderr.txt.expect
diff --git a/slang/tests/P_foreach_multi/stdout.txt.expect b/slang/tests/P_foreach_multi/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_foreach_multi/stdout.txt.expect
diff --git a/slang/tests/P_foreach_options/foreach_options.rs b/slang/tests/P_foreach_options/foreach_options.rs new file mode 100644 index 0000000..cb15b73 --- /dev/null +++ b/slang/tests/P_foreach_options/foreach_options.rs
@@ -0,0 +1,14 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(com.example.foo) + +int RS_KERNEL foo(int a) { + return a; +} + +void testStart(rs_allocation in, rs_allocation out) { + rs_script_call_t opts = {0}; + opts.xStart=0; + opts.xEnd = 100; + rsForEach(foo, in, out); +}
diff --git a/slang/tests/P_foreach_options/stderr.txt.expect b/slang/tests/P_foreach_options/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_foreach_options/stderr.txt.expect
diff --git a/slang/tests/P_foreach_options/stdout.txt.expect b/slang/tests/P_foreach_options/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_foreach_options/stdout.txt.expect
diff --git a/slang/tests/P_fp16/fp16.rs b/slang/tests/P_fp16/fp16.rs new file mode 100644 index 0000000..074c988 --- /dev/null +++ b/slang/tests/P_fp16/fp16.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +__fp16 RS_KERNEL foo(__fp16 a) { + return (a+1); +}
diff --git a/slang/tests/P_fp16/stderr.txt.expect b/slang/tests/P_fp16/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_fp16/stderr.txt.expect
diff --git a/slang/tests/P_fp16/stdout.txt.expect b/slang/tests/P_fp16/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_fp16/stdout.txt.expect
diff --git a/slang/tests/P_fs_kernel/fs_kernel.fs b/slang/tests/P_fs_kernel/fs_kernel.fs new file mode 100644 index 0000000..fbf9285 --- /dev/null +++ b/slang/tests/P_fs_kernel/fs_kernel.fs
@@ -0,0 +1,18 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL root(uint32_t ain) { + return 0; +} + +void RS_KERNEL in_only(uint32_t ain) { +} + +int RS_KERNEL out_only() { + return 0; +} + +int RS_KERNEL everything(uint32_t ain, uint32_t x, uint32_t y) { + return 0; +} +
diff --git a/slang/tests/P_fs_kernel/stderr.txt.expect b/slang/tests/P_fs_kernel/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_fs_kernel/stderr.txt.expect
diff --git a/slang/tests/P_fs_kernel/stdout.txt.expect b/slang/tests/P_fs_kernel/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_fs_kernel/stdout.txt.expect
diff --git a/slang/tests/P_ignore_warnings/ignore_warnings.rs b/slang/tests/P_ignore_warnings/ignore_warnings.rs new file mode 100644 index 0000000..76704d6 --- /dev/null +++ b/slang/tests/P_ignore_warnings/ignore_warnings.rs
@@ -0,0 +1,7 @@ +// -w +#pragma version(1) +#pragma rs java_package_name(foo) + +static int foo() { +} +
diff --git a/slang/tests/P_ignore_warnings/stderr.txt.expect b/slang/tests/P_ignore_warnings/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_ignore_warnings/stderr.txt.expect
diff --git a/slang/tests/P_ignore_warnings/stdout.txt.expect b/slang/tests/P_ignore_warnings/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_ignore_warnings/stdout.txt.expect
diff --git a/slang/tests/P_invoke_half_parameter/invoke_half_parameter.rs b/slang/tests/P_invoke_half_parameter/invoke_half_parameter.rs new file mode 100644 index 0000000..f68f742 --- /dev/null +++ b/slang/tests/P_invoke_half_parameter/invoke_half_parameter.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void test(half h, half2 h2, half3 h3, half4 h4) { +}
diff --git a/slang/tests/P_invoke_half_parameter/stderr.txt.expect b/slang/tests/P_invoke_half_parameter/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_invoke_half_parameter/stderr.txt.expect
diff --git a/slang/tests/P_invoke_half_parameter/stdout.txt.expect b/slang/tests/P_invoke_half_parameter/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_invoke_half_parameter/stdout.txt.expect
diff --git a/slang/tests/P_kernel/kernel.rs b/slang/tests/P_kernel/kernel.rs new file mode 100644 index 0000000..fa962dd --- /dev/null +++ b/slang/tests/P_kernel/kernel.rs
@@ -0,0 +1,7 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL add_foreach(int a, int b) { + return a + b; +}
diff --git a/slang/tests/P_kernel/stderr.txt.expect b/slang/tests/P_kernel/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel/stderr.txt.expect
diff --git a/slang/tests/P_kernel/stdout.txt.expect b/slang/tests/P_kernel/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel/stdout.txt.expect
diff --git a/slang/tests/P_kernel_cpp/kernel_cpp.rs b/slang/tests/P_kernel_cpp/kernel_cpp.rs new file mode 100644 index 0000000..9e582b3 --- /dev/null +++ b/slang/tests/P_kernel_cpp/kernel_cpp.rs
@@ -0,0 +1,33 @@ +// -reflect-c++ +#pragma version(1) +#pragma rs java_package_name(foo) + +//int2 i2; + +int i1 = 5; +bool bt = true; +bool bf = false; +int2 i2 = 2; +int3 i3 = {1, 2, 3}; + +rs_allocation alloc; +rs_element elem; +rs_type type; +rs_script script; +rs_sampler sampler; + +int RS_KERNEL root(uint32_t ain) { + return 0; +} + +void RS_KERNEL in_only(uint32_t ain) { +} + +int RS_KERNEL out_only() { + return 0; +} + +int RS_KERNEL everything(uint32_t ain, uint32_t x, uint32_t y) { + return 0; +} +
diff --git a/slang/tests/P_kernel_cpp/stderr.txt.expect b/slang/tests/P_kernel_cpp/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_cpp/stderr.txt.expect
diff --git a/slang/tests/P_kernel_cpp/stdout.txt.expect b/slang/tests/P_kernel_cpp/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_cpp/stdout.txt.expect
diff --git a/slang/tests/P_kernel_multi_in/kernel_multi_in.rs b/slang/tests/P_kernel_multi_in/kernel_multi_in.rs new file mode 100644 index 0000000..f38757b --- /dev/null +++ b/slang/tests/P_kernel_multi_in/kernel_multi_in.rs
@@ -0,0 +1,7 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL multi_in(uint32_t in0, uint32_t in1) { + return 0; +}
diff --git a/slang/tests/P_kernel_multi_in/stderr.txt.expect b/slang/tests/P_kernel_multi_in/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_multi_in/stderr.txt.expect
diff --git a/slang/tests/P_kernel_multi_in/stdout.txt.expect b/slang/tests/P_kernel_multi_in/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_multi_in/stdout.txt.expect
diff --git a/slang/tests/P_kernel_noalloc/kernel_noalloc.rs b/slang/tests/P_kernel_noalloc/kernel_noalloc.rs new file mode 100644 index 0000000..ab64847 --- /dev/null +++ b/slang/tests/P_kernel_noalloc/kernel_noalloc.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void RS_KERNEL root(uint32_t x) { +} +
diff --git a/slang/tests/P_kernel_noalloc/stderr.txt.expect b/slang/tests/P_kernel_noalloc/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_noalloc/stderr.txt.expect
diff --git a/slang/tests/P_kernel_noalloc/stdout.txt.expect b/slang/tests/P_kernel_noalloc/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_noalloc/stdout.txt.expect
diff --git a/slang/tests/P_kernel_noalloc_noarg/kernel_noalloc_noarg.rs b/slang/tests/P_kernel_noalloc_noarg/kernel_noalloc_noarg.rs new file mode 100644 index 0000000..e1ccb09 --- /dev/null +++ b/slang/tests/P_kernel_noalloc_noarg/kernel_noalloc_noarg.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void RS_KERNEL root() { +} +
diff --git a/slang/tests/P_kernel_noalloc_noarg/stderr.txt.expect b/slang/tests/P_kernel_noalloc_noarg/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_noalloc_noarg/stderr.txt.expect
diff --git a/slang/tests/P_kernel_noalloc_noarg/stdout.txt.expect b/slang/tests/P_kernel_noalloc_noarg/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_kernel_noalloc_noarg/stdout.txt.expect
diff --git a/slang/tests/P_license/license.rs b/slang/tests/P_license/license.rs new file mode 100644 index 0000000..0ee1ae6 --- /dev/null +++ b/slang/tests/P_license/license.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) +#pragma rs set_reflect_license("/* this is a test license */") + +float f; +
diff --git a/slang/tests/P_license/stderr.txt.expect b/slang/tests/P_license/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_license/stderr.txt.expect
diff --git a/slang/tests/P_license/stdout.txt.expect b/slang/tests/P_license/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_license/stdout.txt.expect
diff --git a/slang/tests/P_local_ref_after_return/local_ref_after_return.rs b/slang/tests/P_local_ref_after_return/local_ref_after_return.rs new file mode 100644 index 0000000..977fab7 --- /dev/null +++ b/slang/tests/P_local_ref_after_return/local_ref_after_return.rs
@@ -0,0 +1,12 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +bool init = false; + +void foo() { + if (!init) + return; + rs_allocation a, b; + rsAllocationGetDimX(a); + return; +}
diff --git a/slang/tests/P_local_ref_after_return/stderr.txt.expect b/slang/tests/P_local_ref_after_return/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_local_ref_after_return/stderr.txt.expect
diff --git a/slang/tests/P_local_ref_after_return/stdout.txt.expect b/slang/tests/P_local_ref_after_return/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_local_ref_after_return/stdout.txt.expect
diff --git a/slang/tests/P_long64/long64.rs b/slang/tests/P_long64/long64.rs new file mode 100644 index 0000000..f530aa0 --- /dev/null +++ b/slang/tests/P_long64/long64.rs
@@ -0,0 +1,4 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +long l = 1L << 32;
diff --git a/slang/tests/P_long64/stderr.txt.expect b/slang/tests/P_long64/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_long64/stderr.txt.expect
diff --git a/slang/tests/P_long64/stdout.txt.expect b/slang/tests/P_long64/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_long64/stdout.txt.expect
diff --git a/slang/tests/P_math_fp/math_fp.rs b/slang/tests/P_math_fp/math_fp.rs new file mode 100644 index 0000000..0bedd6e --- /dev/null +++ b/slang/tests/P_math_fp/math_fp.rs
@@ -0,0 +1,146 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int i; +int2 i2; +int3 i3; +int4 i4; + +float f; +float2 f2; +float3 f3; +float4 f4; + +#define TEST_FUNC_1(fnc) \ + f = fnc(f); \ + f2 = fnc(f2); \ + f3 = fnc(f3); \ + f4 = fnc(f4); + +#define TEST_FUNC_1_RI(fnc) \ + i = fnc(f); \ + i2 = fnc(f2); \ + i3 = fnc(f3); \ + i4 = fnc(f4); + +#define TEST_FUNC_2(fnc) \ + f = fnc(f, f); \ + f2 = fnc(f2, f2); \ + f3 = fnc(f3, f3); \ + f4 = fnc(f4, f4); + +#define TEST_FUNC_2P(fnc) \ + f = fnc(f, &f); \ + f2 = fnc(f2, &f2); \ + f3 = fnc(f3, &f3); \ + f4 = fnc(f4, &f4); + +#define TEST_FUNC_2PI(fnc) \ + f = fnc(f, &i); \ + f2 = fnc(f2, &i2); \ + f3 = fnc(f3, &i3); \ + f4 = fnc(f4, &i4); + +#define TEST_FUNC_2F(fnc) \ + f = fnc(f, f); \ + f2 = fnc(f2, f2); \ + f3 = fnc(f3, f3); \ + f4 = fnc(f4, f4); + +#define TEST_FUNC_2I(fnc) \ + f = fnc(f, i); \ + f2 = fnc(f2, i); \ + f3 = fnc(f3, i); \ + f4 = fnc(f4, i); + +#define TEST_FUNC_2IN(fnc) \ + f = fnc(f, i); \ + f2 = fnc(f2, i2); \ + f3 = fnc(f3, i3); \ + f4 = fnc(f4, i4); + +#define TEST_FUNC_3(fnc) \ + f = fnc(f, f, f); \ + f2 = fnc(f2, f2, f2); \ + f3 = fnc(f3, f3, f3); \ + f4 = fnc(f4, f4, f4); + +#define TEST_FUNC_3PI(fnc) \ + f = fnc(f, f, &i); \ + f2 = fnc(f2, f2, &i2); \ + f3 = fnc(f3, f3, &i3); \ + f4 = fnc(f4, f4, &i4); + +void compile_all_math_fp_ops() { + TEST_FUNC_1(acos); + TEST_FUNC_1(acosh); + TEST_FUNC_1(acospi); + TEST_FUNC_1(asin); + TEST_FUNC_1(asinh); + TEST_FUNC_1(asinpi); + TEST_FUNC_1(atan); + TEST_FUNC_2(atan2); + TEST_FUNC_1(atanh); + TEST_FUNC_1(atanpi); + TEST_FUNC_2(atan2pi); + TEST_FUNC_1(cbrt); + TEST_FUNC_1(ceil); + TEST_FUNC_2(copysign); + TEST_FUNC_1(cos); + TEST_FUNC_1(cosh); + TEST_FUNC_1(cospi); + TEST_FUNC_1(erfc); + TEST_FUNC_1(erf); + TEST_FUNC_1(exp); + TEST_FUNC_1(exp2); + TEST_FUNC_1(exp10); + TEST_FUNC_1(expm1); + TEST_FUNC_1(fabs); + TEST_FUNC_2(fdim); + TEST_FUNC_1(floor); + TEST_FUNC_3(fma); + TEST_FUNC_2(fmax); + TEST_FUNC_2F(fmax); + TEST_FUNC_2(fmin); + TEST_FUNC_2F(fmin); + TEST_FUNC_2(fmod); + TEST_FUNC_2P(fract); + TEST_FUNC_2PI(frexp); + TEST_FUNC_2(hypot); + TEST_FUNC_1_RI(ilogb); + TEST_FUNC_2IN(ldexp); + TEST_FUNC_2I(ldexp); + TEST_FUNC_1(lgamma); + TEST_FUNC_2PI(lgamma); + TEST_FUNC_1(log); + TEST_FUNC_1(log2); + TEST_FUNC_1(log10); + TEST_FUNC_1(log1p); + TEST_FUNC_1(logb); + TEST_FUNC_3(mad); + TEST_FUNC_2P(modf); + //TEST_FUNC_1(nan); + TEST_FUNC_2(nextafter); + TEST_FUNC_2(pow); + TEST_FUNC_2I(pown); + TEST_FUNC_2(powr); + TEST_FUNC_2(remainder); + TEST_FUNC_3PI(remquo); + TEST_FUNC_1(rint); + TEST_FUNC_2I(rootn); + TEST_FUNC_1(round); + TEST_FUNC_1(rsqrt); + TEST_FUNC_1(sin); + TEST_FUNC_2P(sincos); + TEST_FUNC_1(sinh); + TEST_FUNC_1(sinpi); + TEST_FUNC_1(sqrt); + TEST_FUNC_1(tan); + TEST_FUNC_1(tanh); + TEST_FUNC_1(tanpi); + TEST_FUNC_1(tgamma); + TEST_FUNC_1(trunc); + + return; +} +
diff --git a/slang/tests/P_math_fp/stderr.txt.expect b/slang/tests/P_math_fp/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_math_fp/stderr.txt.expect
diff --git a/slang/tests/P_math_fp/stdout.txt.expect b/slang/tests/P_math_fp/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_math_fp/stdout.txt.expect
diff --git a/slang/tests/P_math_int/math_int.rs b/slang/tests/P_math_int/math_int.rs new file mode 100644 index 0000000..59ef57f --- /dev/null +++ b/slang/tests/P_math_int/math_int.rs
@@ -0,0 +1,89 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +uchar uc; +uchar2 uc2; +uchar3 uc3; +uchar4 uc4; + +ushort us; +ushort2 us2; +ushort3 us3; +ushort4 us4; + +uint ui; +uint2 ui2; +uint3 ui3; +uint4 ui4; + +char c; +char2 c2; +char3 c3; +char4 c4; + +short s; +short2 s2; +short3 s3; +short4 s4; + +int i; +int2 i2; +int3 i3; +int4 i4; + +float f; +float2 f2; +float3 f3; +float4 f4; + +#define TEST4_1(ret, typ, fnc) \ + ret = fnc(typ); \ + ret##2 = fnc(typ##2); \ + ret##3 = fnc(typ##3); \ + ret##4 = fnc(typ##4); + +#define TEST4_2(typ, fnc) \ + typ = fnc(typ, typ); \ + typ##2 = fnc(typ##2, typ##2); \ + typ##3 = fnc(typ##3, typ##3); \ + typ##4 = fnc(typ##4, typ##4); + +#define TEST4_2S(typ, fnc) \ + typ = fnc(typ, typ); \ + typ##2 = fnc(typ##2, typ); \ + typ##3 = fnc(typ##3, typ); \ + typ##4 = fnc(typ##4, typ); + +#define TEST_UIFUNC_1(fnc) \ + TEST4_1(uc, c, fnc); \ + TEST4_1(us, s, fnc); \ + TEST4_1(ui, i, fnc); + +#define TEST_IFUNC_1(fnc) \ + TEST4_1(uc, uc, fnc); \ + TEST4_1(c, c, fnc); \ + TEST4_1(us, us, fnc); \ + TEST4_1(s, s, fnc); \ + TEST4_1(ui, ui, fnc); \ + TEST4_1(i, i, fnc); + +#define TEST_IFUNC_2(fnc) \ + TEST4_2(uc, fnc); \ + TEST4_2(c, fnc); \ + TEST4_2(us, fnc); \ + TEST4_2(s, fnc); \ + TEST4_2(ui, fnc); \ + TEST4_2(f, fnc); \ + + +void compile_all_math_int_ops() { + TEST_UIFUNC_1(abs); + TEST_IFUNC_1(clz); + TEST_IFUNC_2(min); + TEST_IFUNC_2(max); + TEST4_2S(f, min); + TEST4_2S(f, max); + + return; +} +
diff --git a/slang/tests/P_math_int/stderr.txt.expect b/slang/tests/P_math_int/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_math_int/stderr.txt.expect
diff --git a/slang/tests/P_math_int/stdout.txt.expect b/slang/tests/P_math_int/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_math_int/stdout.txt.expect
diff --git a/slang/tests/P_matrix_cpp/matrix.rs b/slang/tests/P_matrix_cpp/matrix.rs new file mode 100644 index 0000000..4847b54 --- /dev/null +++ b/slang/tests/P_matrix_cpp/matrix.rs
@@ -0,0 +1,5 @@ +// -reflect-c++ +#pragma version(1) +#pragma rs java_package_name(foo) + +rs_matrix4x4 mat;
diff --git a/slang/tests/P_matrix_cpp/stderr.txt.expect b/slang/tests/P_matrix_cpp/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_matrix_cpp/stderr.txt.expect
diff --git a/slang/tests/P_matrix_cpp/stdout.txt.expect b/slang/tests/P_matrix_cpp/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_matrix_cpp/stdout.txt.expect
diff --git a/slang/tests/P_multi_in_target_version/multi_in_target_version.rs b/slang/tests/P_multi_in_target_version/multi_in_target_version.rs new file mode 100644 index 0000000..2128778 --- /dev/null +++ b/slang/tests/P_multi_in_target_version/multi_in_target_version.rs
@@ -0,0 +1,8 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(foo) + +int RS_KERNEL root(uint32_t in0, uint32_t in1, int x, int y) { + return 0; +} +
diff --git a/slang/tests/P_multi_in_target_version/stderr.txt.expect b/slang/tests/P_multi_in_target_version/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_multi_in_target_version/stderr.txt.expect
diff --git a/slang/tests/P_multi_in_target_version/stdout.txt.expect b/slang/tests/P_multi_in_target_version/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_multi_in_target_version/stdout.txt.expect
diff --git a/slang/tests/P_odr_array/def1.rs b/slang/tests/P_odr_array/def1.rs new file mode 100644 index 0000000..501a96b --- /dev/null +++ b/slang/tests/P_odr_array/def1.rs
@@ -0,0 +1,3 @@ +#include "inc.rsh" + +SameDefinition1 o1;
diff --git a/slang/tests/P_odr_array/def2.rs b/slang/tests/P_odr_array/def2.rs new file mode 100644 index 0000000..501a96b --- /dev/null +++ b/slang/tests/P_odr_array/def2.rs
@@ -0,0 +1,3 @@ +#include "inc.rsh" + +SameDefinition1 o1;
diff --git a/slang/tests/P_odr_array/inc.rsh b/slang/tests/P_odr_array/inc.rsh new file mode 100644 index 0000000..6374850 --- /dev/null +++ b/slang/tests/P_odr_array/inc.rsh
@@ -0,0 +1,7 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef struct SameDefinition1{ + int i[2]; +} SameDefinition1; +
diff --git a/slang/tests/P_odr_array/stderr.txt.expect b/slang/tests/P_odr_array/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_odr_array/stderr.txt.expect
diff --git a/slang/tests/P_odr_array/stdout.txt.expect b/slang/tests/P_odr_array/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_odr_array/stdout.txt.expect
diff --git a/slang/tests/P_one_definition_rule/def1.rs b/slang/tests/P_one_definition_rule/def1.rs new file mode 100644 index 0000000..1e0cebe --- /dev/null +++ b/slang/tests/P_one_definition_rule/def1.rs
@@ -0,0 +1,16 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef struct SameDefinition1{ + int member1; + float member2; + int member3; + int member4; + float member5; + float member6; + int member7; + int member8; + int member9; +} SameDefinition1; + +SameDefinition1 o1;
diff --git a/slang/tests/P_one_definition_rule/def2.rs b/slang/tests/P_one_definition_rule/def2.rs new file mode 100644 index 0000000..1e0cebe --- /dev/null +++ b/slang/tests/P_one_definition_rule/def2.rs
@@ -0,0 +1,16 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef struct SameDefinition1{ + int member1; + float member2; + int member3; + int member4; + float member5; + float member6; + int member7; + int member8; + int member9; +} SameDefinition1; + +SameDefinition1 o1;
diff --git a/slang/tests/P_one_definition_rule/stderr.txt.expect b/slang/tests/P_one_definition_rule/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_one_definition_rule/stderr.txt.expect
diff --git a/slang/tests/P_one_definition_rule/stdout.txt.expect b/slang/tests/P_one_definition_rule/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_one_definition_rule/stdout.txt.expect
diff --git a/slang/tests/P_ooo_compute/ooo_compute.rs b/slang/tests/P_ooo_compute/ooo_compute.rs new file mode 100644 index 0000000..961bcd2 --- /dev/null +++ b/slang/tests/P_ooo_compute/ooo_compute.rs
@@ -0,0 +1,13 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void bar(int i, float f) { +} + +void foo (int *p) { +} + +void root(const int *ain, int *aout, const void *usrData, + uint32_t x, uint32_t y) { +} +
diff --git a/slang/tests/P_ooo_compute/stderr.txt.expect b/slang/tests/P_ooo_compute/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_ooo_compute/stderr.txt.expect
diff --git a/slang/tests/P_ooo_compute/stdout.txt.expect b/slang/tests/P_ooo_compute/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_ooo_compute/stdout.txt.expect
diff --git a/slang/tests/P_overload/overload.rs b/slang/tests/P_overload/overload.rs new file mode 100644 index 0000000..ba3be6e --- /dev/null +++ b/slang/tests/P_overload/overload.rs
@@ -0,0 +1,9 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void __attribute__((overloadable)) foo(int i) { +} + +void __attribute__((overloadable)) foo(float f) { +} +
diff --git a/slang/tests/P_overload/stderr.txt.expect b/slang/tests/P_overload/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_overload/stderr.txt.expect
diff --git a/slang/tests/P_overload/stdout.txt.expect b/slang/tests/P_overload/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_overload/stdout.txt.expect
diff --git a/slang/tests/P_redefine_RS_VERSION/redefine_RS_VERSION.rs b/slang/tests/P_redefine_RS_VERSION/redefine_RS_VERSION.rs new file mode 100644 index 0000000..08f96ab --- /dev/null +++ b/slang/tests/P_redefine_RS_VERSION/redefine_RS_VERSION.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +#define RS_VERSION 1 +
diff --git a/slang/tests/P_redefine_RS_VERSION/stderr.txt.expect b/slang/tests/P_redefine_RS_VERSION/stderr.txt.expect new file mode 100644 index 0000000..7af3b00 --- /dev/null +++ b/slang/tests/P_redefine_RS_VERSION/stderr.txt.expect
@@ -0,0 +1,2 @@ +redefine_RS_VERSION.rs:4:9: warning: 'RS_VERSION' macro redefined +<built-in>:1:9: note: previous definition is here
diff --git a/slang/tests/P_redefine_RS_VERSION/stdout.txt.expect b/slang/tests/P_redefine_RS_VERSION/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_redefine_RS_VERSION/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_accumulator/ScriptC_reduce_general_accumulator.java.expect b/slang/tests/P_reduce_general_accumulator/ScriptC_reduce_general_accumulator.java.expect new file mode 100644 index 0000000..c39ce7c --- /dev/null +++ b/slang/tests/P_reduce_general_accumulator/ScriptC_reduce_general_accumulator.java.expect
@@ -0,0 +1,3381 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_accumulator.rs + */ + +package accumulator; + +import android.renderscript.*; +import accumulator.reduce_general_accumulatorBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_accumulator extends ScriptC { + private static final String __rs_resource_name = "reduce_general_accumulator"; + // Constructor + public ScriptC_reduce_general_accumulator(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_accumulatorBitCode.getBitCode32(), + reduce_general_accumulatorBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + } + + private Element __I32; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + private final static int mExportReduceIdx_my_half = 0; + // in1 = "val" + public result_int reduce_my_half(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_half(Allocation ain1) { + return reduce_my_half(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_half(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2 = 1; + // in1 = "val" + public result_int reduce_my_half2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_half2(Allocation ain1) { + return reduce_my_half2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_half2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4 = 2; + // in1 = "val" + public result_int reduce_my_half4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_half4(Allocation ain1) { + return reduce_my_half4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_half4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_half = 3; + // in1 = "val" + public result_int reduce_my_array_half(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_half(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_half(Allocation ain1) { + return reduce_my_array_half(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_half(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_half, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_half2 = 4; + // in1 = "val" + public result_int reduce_my_array_half2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_half2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_half2(Allocation ain1) { + return reduce_my_array_half2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_half2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_half2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_half4 = 5; + // in1 = "val" + public result_int reduce_my_array_half4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_half4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_half4(Allocation ain1) { + return reduce_my_array_half4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_half4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_half4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float = 6; + // in1 = "val" + public result_int reduce_my_float(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_float(Allocation ain1) { + return reduce_my_float(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_float(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2 = 7; + // in1 = "val" + public result_int reduce_my_float2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_float2(Allocation ain1) { + return reduce_my_float2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_float2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4 = 8; + // in1 = "val" + public result_int reduce_my_float4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_float4(Allocation ain1) { + return reduce_my_float4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_float4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_float = 9; + // in1 = "val" + public result_int reduce_my_array_float(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_float(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_float(Allocation ain1) { + return reduce_my_array_float(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_float(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_float, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_float2 = 10; + // in1 = "val" + public result_int reduce_my_array_float2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_float2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_float2(Allocation ain1) { + return reduce_my_array_float2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_float2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_float2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_float4 = 11; + // in1 = "val" + public result_int reduce_my_array_float4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_float4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_float4(Allocation ain1) { + return reduce_my_array_float4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_float4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_float4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double = 12; + // in1 = "val" + public result_int reduce_my_double(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_double(Allocation ain1) { + return reduce_my_double(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_double(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2 = 13; + // in1 = "val" + public result_int reduce_my_double2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_double2(Allocation ain1) { + return reduce_my_double2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_double2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4 = 14; + // in1 = "val" + public result_int reduce_my_double4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_double4(Allocation ain1) { + return reduce_my_double4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_double4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_double = 15; + // in1 = "val" + public result_int reduce_my_array_double(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_double(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_double(Allocation ain1) { + return reduce_my_array_double(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_double(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_double, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_double2 = 16; + // in1 = "val" + public result_int reduce_my_array_double2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_double2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_double2(Allocation ain1) { + return reduce_my_array_double2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_double2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_double2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_double4 = 17; + // in1 = "val" + public result_int reduce_my_array_double4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_double4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_double4(Allocation ain1) { + return reduce_my_array_double4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_double4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_double4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char = 18; + // in1 = "val" + public result_int reduce_my_char(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_char(Allocation ain1) { + return reduce_my_char(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_char(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2 = 19; + // in1 = "val" + public result_int reduce_my_char2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_char2(Allocation ain1) { + return reduce_my_char2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_char2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4 = 20; + // in1 = "val" + public result_int reduce_my_char4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_char4(Allocation ain1) { + return reduce_my_char4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_char4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_char = 21; + // in1 = "val" + public result_int reduce_my_array_char(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_char(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_char(Allocation ain1) { + return reduce_my_array_char(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_char(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_char, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_char2 = 22; + // in1 = "val" + public result_int reduce_my_array_char2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_char2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_char2(Allocation ain1) { + return reduce_my_array_char2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_char2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_char2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_char4 = 23; + // in1 = "val" + public result_int reduce_my_array_char4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_char4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_char4(Allocation ain1) { + return reduce_my_array_char4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_char4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_char4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short = 24; + // in1 = "val" + public result_int reduce_my_short(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_short(Allocation ain1) { + return reduce_my_short(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_short(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2 = 25; + // in1 = "val" + public result_int reduce_my_short2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_short2(Allocation ain1) { + return reduce_my_short2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_short2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4 = 26; + // in1 = "val" + public result_int reduce_my_short4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_short4(Allocation ain1) { + return reduce_my_short4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_short4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_short = 27; + // in1 = "val" + public result_int reduce_my_array_short(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_short(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_short(Allocation ain1) { + return reduce_my_array_short(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_short(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_short, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_short2 = 28; + // in1 = "val" + public result_int reduce_my_array_short2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_short2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_short2(Allocation ain1) { + return reduce_my_array_short2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_short2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_short2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_short4 = 29; + // in1 = "val" + public result_int reduce_my_array_short4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_short4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_short4(Allocation ain1) { + return reduce_my_array_short4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_short4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_short4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int = 30; + // in1 = "val" + public result_int reduce_my_int(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_int(Allocation ain1) { + return reduce_my_int(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_int(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2 = 31; + // in1 = "val" + public result_int reduce_my_int2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_int2(Allocation ain1) { + return reduce_my_int2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_int2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4 = 32; + // in1 = "val" + public result_int reduce_my_int4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_int4(Allocation ain1) { + return reduce_my_int4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_int4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_int = 33; + // in1 = "val" + public result_int reduce_my_array_int(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_int(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_int(Allocation ain1) { + return reduce_my_array_int(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_int(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_int, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_int2 = 34; + // in1 = "val" + public result_int reduce_my_array_int2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_int2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_int2(Allocation ain1) { + return reduce_my_array_int2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_int2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_int2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_int4 = 35; + // in1 = "val" + public result_int reduce_my_array_int4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_int4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_int4(Allocation ain1) { + return reduce_my_array_int4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_int4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_int4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long = 36; + // in1 = "val" + public result_int reduce_my_long(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_long(Allocation ain1) { + return reduce_my_long(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_long(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2 = 37; + // in1 = "val" + public result_int reduce_my_long2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_long2(Allocation ain1) { + return reduce_my_long2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_long2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4 = 38; + // in1 = "val" + public result_int reduce_my_long4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_long4(Allocation ain1) { + return reduce_my_long4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_long4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_long = 39; + // in1 = "val" + public result_int reduce_my_array_long(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_long(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_long(Allocation ain1) { + return reduce_my_array_long(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_long(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_long, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_long2 = 40; + // in1 = "val" + public result_int reduce_my_array_long2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_long2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_long2(Allocation ain1) { + return reduce_my_array_long2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_long2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_long2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_long4 = 41; + // in1 = "val" + public result_int reduce_my_array_long4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_long4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_long4(Allocation ain1) { + return reduce_my_array_long4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_long4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_long4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar = 42; + // in1 = "val" + public result_int reduce_my_uchar(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_uchar(Allocation ain1) { + return reduce_my_uchar(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_uchar(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2 = 43; + // in1 = "val" + public result_int reduce_my_uchar2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_uchar2(Allocation ain1) { + return reduce_my_uchar2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_uchar2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4 = 44; + // in1 = "val" + public result_int reduce_my_uchar4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_uchar4(Allocation ain1) { + return reduce_my_uchar4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_uchar4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_uchar = 45; + // in1 = "val" + public result_int reduce_my_array_uchar(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_uchar(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_uchar(Allocation ain1) { + return reduce_my_array_uchar(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_uchar(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uchar, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_uchar2 = 46; + // in1 = "val" + public result_int reduce_my_array_uchar2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_uchar2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_uchar2(Allocation ain1) { + return reduce_my_array_uchar2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_uchar2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uchar2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_uchar4 = 47; + // in1 = "val" + public result_int reduce_my_array_uchar4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_uchar4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_uchar4(Allocation ain1) { + return reduce_my_array_uchar4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_uchar4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uchar4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort = 48; + // in1 = "val" + public result_int reduce_my_ushort(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_ushort(Allocation ain1) { + return reduce_my_ushort(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_ushort(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2 = 49; + // in1 = "val" + public result_int reduce_my_ushort2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_ushort2(Allocation ain1) { + return reduce_my_ushort2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_ushort2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4 = 50; + // in1 = "val" + public result_int reduce_my_ushort4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_ushort4(Allocation ain1) { + return reduce_my_ushort4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_ushort4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_ushort = 51; + // in1 = "val" + public result_int reduce_my_array_ushort(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_ushort(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_ushort(Allocation ain1) { + return reduce_my_array_ushort(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_ushort(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ushort, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_ushort2 = 52; + // in1 = "val" + public result_int reduce_my_array_ushort2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_ushort2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_ushort2(Allocation ain1) { + return reduce_my_array_ushort2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_ushort2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ushort2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_ushort4 = 53; + // in1 = "val" + public result_int reduce_my_array_ushort4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_ushort4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_ushort4(Allocation ain1) { + return reduce_my_array_ushort4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_ushort4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ushort4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint = 54; + // in1 = "val" + public result_int reduce_my_uint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_uint(Allocation ain1) { + return reduce_my_uint(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_uint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2 = 55; + // in1 = "val" + public result_int reduce_my_uint2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_uint2(Allocation ain1) { + return reduce_my_uint2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_uint2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4 = 56; + // in1 = "val" + public result_int reduce_my_uint4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_uint4(Allocation ain1) { + return reduce_my_uint4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_uint4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_uint = 57; + // in1 = "val" + public result_int reduce_my_array_uint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_uint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_uint(Allocation ain1) { + return reduce_my_array_uint(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_uint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uint, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_uint2 = 58; + // in1 = "val" + public result_int reduce_my_array_uint2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_uint2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_uint2(Allocation ain1) { + return reduce_my_array_uint2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_uint2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uint2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_uint4 = 59; + // in1 = "val" + public result_int reduce_my_array_uint4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_uint4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_uint4(Allocation ain1) { + return reduce_my_array_uint4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_uint4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uint4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong = 60; + // in1 = "val" + public result_int reduce_my_ulong(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_ulong(Allocation ain1) { + return reduce_my_ulong(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_ulong(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2 = 61; + // in1 = "val" + public result_int reduce_my_ulong2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_ulong2(Allocation ain1) { + return reduce_my_ulong2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_ulong2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4 = 62; + // in1 = "val" + public result_int reduce_my_ulong4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_ulong4(Allocation ain1) { + return reduce_my_ulong4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_ulong4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_ulong = 63; + // in1 = "val" + public result_int reduce_my_array_ulong(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_ulong(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_ulong(Allocation ain1) { + return reduce_my_array_ulong(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_ulong(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ulong, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_ulong2 = 64; + // in1 = "val" + public result_int reduce_my_array_ulong2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_ulong2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_ulong2(Allocation ain1) { + return reduce_my_array_ulong2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_ulong2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ulong2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_ulong4 = 65; + // in1 = "val" + public result_int reduce_my_array_ulong4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_ulong4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_ulong4(Allocation ain1) { + return reduce_my_array_ulong4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_ulong4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ulong4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool = 66; + // in1 = "val" + public result_int reduce_my_bool(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_bool(Allocation ain1) { + return reduce_my_bool(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_bool(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_bool = 67; + // in1 = "val" + public result_int reduce_my_array_bool(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_bool(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_bool(Allocation ain1) { + return reduce_my_array_bool(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_bool(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_bool, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2 = 68; + // in1 = "val" + public result_int reduce_my_rs_matrix2x2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_rs_matrix2x2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_rs_matrix2x2(Allocation ain1) { + return reduce_my_rs_matrix2x2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_rs_matrix2x2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_rs_matrix2x2 = 69; + // in1 = "val" + public result_int reduce_my_array_rs_matrix2x2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_rs_matrix2x2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_matrix2x2(Allocation ain1) { + return reduce_my_array_rs_matrix2x2(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_matrix2x2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_rs_matrix2x2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3 = 70; + // in1 = "val" + public result_int reduce_my_rs_matrix3x3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_rs_matrix3x3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_rs_matrix3x3(Allocation ain1) { + return reduce_my_rs_matrix3x3(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_rs_matrix3x3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_rs_matrix3x3 = 71; + // in1 = "val" + public result_int reduce_my_array_rs_matrix3x3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_rs_matrix3x3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_matrix3x3(Allocation ain1) { + return reduce_my_array_rs_matrix3x3(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_matrix3x3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_rs_matrix3x3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4 = 72; + // in1 = "val" + public result_int reduce_my_rs_matrix4x4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_rs_matrix4x4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_rs_matrix4x4(Allocation ain1) { + return reduce_my_rs_matrix4x4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_rs_matrix4x4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_rs_matrix4x4 = 73; + // in1 = "val" + public result_int reduce_my_array_rs_matrix4x4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_rs_matrix4x4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_matrix4x4(Allocation ain1) { + return reduce_my_array_rs_matrix4x4(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_matrix4x4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_rs_matrix4x4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_for_each_strategy_t = 74; + // in1 = "val" + public result_int reduce_my_rs_for_each_strategy_t(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_rs_for_each_strategy_t(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_rs_for_each_strategy_t(Allocation ain1) { + return reduce_my_rs_for_each_strategy_t(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_rs_for_each_strategy_t(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_for_each_strategy_t, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_rs_for_each_strategy_t = 75; + // in1 = "val" + public result_int reduce_my_array_rs_for_each_strategy_t(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_rs_for_each_strategy_t(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_for_each_strategy_t(Allocation ain1) { + return reduce_my_array_rs_for_each_strategy_t(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_for_each_strategy_t(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_rs_for_each_strategy_t, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_script_call_t = 76; + // in1 = "val" + public result_int reduce_my_rs_script_call_t(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_rs_script_call_t(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_rs_script_call_t(Allocation ain1) { + return reduce_my_rs_script_call_t(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_rs_script_call_t(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_script_call_t, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_rs_script_call_t = 77; + // in1 = "val" + public result_int reduce_my_array_rs_script_call_t(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_rs_script_call_t(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_script_call_t(Allocation ain1) { + return reduce_my_array_rs_script_call_t(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_script_call_t(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_rs_script_call_t, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_time_t = 78; + // in1 = "val" + public result_int reduce_my_rs_time_t(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_rs_time_t(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_rs_time_t(Allocation ain1) { + return reduce_my_rs_time_t(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_rs_time_t(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_time_t, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_rs_time_t = 79; + // in1 = "val" + public result_int reduce_my_array_rs_time_t(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_rs_time_t(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_time_t(Allocation ain1) { + return reduce_my_array_rs_time_t(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_time_t(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_rs_time_t, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_tm = 80; + // in1 = "val" + public result_int reduce_my_rs_tm(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_rs_tm(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_rs_tm(Allocation ain1) { + return reduce_my_rs_tm(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_rs_tm(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_tm, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_rs_tm = 81; + // in1 = "val" + public result_int reduce_my_array_rs_tm(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_rs_tm(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_tm(Allocation ain1) { + return reduce_my_array_rs_tm(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_rs_tm(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_rs_tm, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyEnum = 82; + // in1 = "val" + public result_int reduce_my_MyEnum(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyEnum(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyEnum(Allocation ain1) { + return reduce_my_MyEnum(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyEnum(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyEnum, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyEnum = 83; + // in1 = "val" + public result_int reduce_my_array_MyEnum(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyEnum(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyEnum(Allocation ain1) { + return reduce_my_array_MyEnum(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyEnum(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyEnum, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyPtrArray = 84; + // in1 = "val" + public result_int reduce_my_MyPtrArray(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyPtrArray(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrArray(Allocation ain1) { + return reduce_my_MyPtrArray(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrArray(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyPtrArray, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyPtrArray = 85; + // in1 = "val" + public result_int reduce_my_array_MyPtrArray(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyPtrArray(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrArray(Allocation ain1) { + return reduce_my_array_MyPtrArray(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrArray(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyPtrArray, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyPtrFn = 86; + // in1 = "val" + public result_int reduce_my_MyPtrFn(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyPtrFn(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrFn(Allocation ain1) { + return reduce_my_MyPtrFn(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrFn(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyPtrFn, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyPtrFn = 87; + // in1 = "val" + public result_int reduce_my_array_MyPtrFn(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyPtrFn(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrFn(Allocation ain1) { + return reduce_my_array_MyPtrFn(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrFn(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyPtrFn, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyPtrIncomplete = 88; + // in1 = "val" + public result_int reduce_my_MyPtrIncomplete(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyPtrIncomplete(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrIncomplete(Allocation ain1) { + return reduce_my_MyPtrIncomplete(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrIncomplete(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyPtrIncomplete, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyPtrIncomplete = 89; + // in1 = "val" + public result_int reduce_my_array_MyPtrIncomplete(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyPtrIncomplete(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrIncomplete(Allocation ain1) { + return reduce_my_array_MyPtrIncomplete(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrIncomplete(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyPtrIncomplete, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyPtrShort = 90; + // in1 = "val" + public result_int reduce_my_MyPtrShort(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyPtrShort(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrShort(Allocation ain1) { + return reduce_my_MyPtrShort(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrShort(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyPtrShort, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyPtrShort = 91; + // in1 = "val" + public result_int reduce_my_array_MyPtrShort(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyPtrShort(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrShort(Allocation ain1) { + return reduce_my_array_MyPtrShort(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrShort(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyPtrShort, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyPtrVoid = 92; + // in1 = "val" + public result_int reduce_my_MyPtrVoid(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyPtrVoid(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrVoid(Allocation ain1) { + return reduce_my_MyPtrVoid(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyPtrVoid(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyPtrVoid, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyPtrVoid = 93; + // in1 = "val" + public result_int reduce_my_array_MyPtrVoid(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyPtrVoid(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrVoid(Allocation ain1) { + return reduce_my_array_MyPtrVoid(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyPtrVoid(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyPtrVoid, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct = 94; + // in1 = "val" + public result_int reduce_my_MyStruct(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyStruct(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyStruct(Allocation ain1) { + return reduce_my_MyStruct(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyStruct(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyStruct = 95; + // in1 = "val" + public result_int reduce_my_array_MyStruct(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyStruct(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyStruct(Allocation ain1) { + return reduce_my_array_MyStruct(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyStruct(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyStruct, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyUnion = 96; + // in1 = "val" + public result_int reduce_my_MyUnion(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyUnion(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyUnion(Allocation ain1) { + return reduce_my_MyUnion(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyUnion(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyUnion, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyUnion = 97; + // in1 = "val" + public result_int reduce_my_array_MyUnion(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyUnion(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyUnion(Allocation ain1) { + return reduce_my_array_MyUnion(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyUnion(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyUnion, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyBlob = 98; + // in1 = "val" + public result_int reduce_my_MyBlob(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_MyBlob(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_MyBlob(Allocation ain1) { + return reduce_my_MyBlob(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_MyBlob(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyBlob, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_array_MyBlob = 99; + // in1 = "val" + public result_int reduce_my_array_MyBlob(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_array_MyBlob(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_array_MyBlob(Allocation ain1) { + return reduce_my_array_MyBlob(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_array_MyBlob(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_MyBlob, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_accumulator/gen-accumulator.pl b/slang/tests/P_reduce_general_accumulator/gen-accumulator.pl new file mode 100755 index 0000000..46329e8 --- /dev/null +++ b/slang/tests/P_reduce_general_accumulator/gen-accumulator.pl
@@ -0,0 +1,66 @@ +#!/usr/bin/perl -w + +# Generate trivial test cases to exercise accumulator types. + +use strict; + +my @basicTypesVectorable = ("half", "float", "double", + "char", "short", "int", "long", + "uchar", "ushort", "uint", "ulong"); +my @basicTypesUnvectorable = ("bool", + "rs_matrix2x2", "rs_matrix3x3", "rs_matrix4x4", + "rs_for_each_strategy_t", "rs_script_call_t", "rs_time_t", "rs_tm", + "MyEnum", + "MyPtrArray", "MyPtrFn", "MyPtrIncomplete", "MyPtrShort", "MyPtrVoid", + "MyStruct", "MyUnion", + "MyBlob"); +my @basicTypes = (@basicTypesVectorable, @basicTypesUnvectorable); + +# 1 signifies non-vector +# 3 is not supported for exported types +my @vecLengths = (1, 2, 4); + +print "// -target-api 0 -Wall -Werror\n"; +print "#pragma version(1)\n"; +print "#pragma rs java_package_name(accumulator)\n\n"; +print "// This test case was created by $0.\n"; +print "// It exercises various legal accumulator types, so that we can ensure\n"; +print "// (a) We do not choke when compiling them\n"; +print "// (b) They do not inhibit reflection\n"; +print "\n// One example enum type\n"; +print "typedef enum { E1, E2, E3 } MyEnum;\n"; +print "\n// Example pointer types\n"; +print "typedef float (*MyPtrArray)[3][11];\n"; +print "typedef int (*MyPtrFn)(double);\n"; +print "typedef struct Incomplete *MyPtrIncomplete;\n"; +print "typedef volatile short *MyPtrShort;\n"; +print "typedef const void *MyPtrVoid;\n"; +print "\n// One example struct type\n"; +print "typedef struct { float f; double d; char *c; } MyStruct;\n"; +print "\n// One example union type\n"; +print "typedef union { int i; long l; int a[5]; } MyUnion;\n"; +print "\n// One example of a more-complicated type\n"; +print "typedef struct { MyEnum e1, e2; MyPtrIncomplete p; MyStruct s; MyUnion u; } MyBlob;\n"; + +foreach my $basicType (@basicTypes) { + for (my $isArray = 0; $isArray <= 1; ++$isArray) { + foreach my $vecLen (@vecLengths) { + + next if ($vecLen > 1) && !grep(/^${basicType}$/, @basicTypesVectorable); + + my $eltName = $basicType; + $eltName .= $vecLen if ($vecLen > 1); + my $resultName = ($isArray ? "array_${eltName}" : $eltName); + my $reduceName = "my_${resultName}"; + my $accumName = "${reduceName}_accum"; + my $combName = "${reduceName}_comb"; + my $outName = "${reduceName}_out"; + print "\n"; + print "#pragma rs reduce(${reduceName}) accumulator(${accumName}) combiner(${combName}) outconverter(${outName})\n"; + print "typedef ${eltName} ${resultName}[7];\n" if ($isArray); + print "static void ${accumName}(${resultName} *accum, int val) { }\n"; + print "static void ${combName}(${resultName} *accum, const ${resultName} *other) { }\n"; + print "static void ${outName}(int *out, const ${resultName} *accum) { }\n"; + } + } +}
diff --git a/slang/tests/P_reduce_general_accumulator/reduce_general_accumulator.rs b/slang/tests/P_reduce_general_accumulator/reduce_general_accumulator.rs new file mode 100644 index 0000000..cec196d --- /dev/null +++ b/slang/tests/P_reduce_general_accumulator/reduce_general_accumulator.rs
@@ -0,0 +1,577 @@ +// -target-api 0 -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(accumulator) + +// This test case was created by ./gen-accumulator.pl. +// It exercises various legal accumulator types, so that we can ensure +// (a) We do not choke when compiling them +// (b) They do not inhibit reflection + +// One example enum type +typedef enum { E1, E2, E3 } MyEnum; + +// Example pointer types +typedef float (*MyPtrArray)[3][11]; +typedef int (*MyPtrFn)(double); +typedef struct Incomplete *MyPtrIncomplete; +typedef volatile short *MyPtrShort; +typedef const void *MyPtrVoid; + +// One example struct type +typedef struct { float f; double d; char *c; } MyStruct; + +// One example union type +typedef union { int i; long l; int a[5]; } MyUnion; + +// One example of a more-complicated type +typedef struct { MyEnum e1, e2; MyPtrIncomplete p; MyStruct s; MyUnion u; } MyBlob; + +#pragma rs reduce(my_half) accumulator(my_half_accum) combiner(my_half_comb) outconverter(my_half_out) +static void my_half_accum(half *accum, int val) { } +static void my_half_comb(half *accum, const half *other) { } +static void my_half_out(int *out, const half *accum) { } + +#pragma rs reduce(my_half2) accumulator(my_half2_accum) combiner(my_half2_comb) outconverter(my_half2_out) +static void my_half2_accum(half2 *accum, int val) { } +static void my_half2_comb(half2 *accum, const half2 *other) { } +static void my_half2_out(int *out, const half2 *accum) { } + +#pragma rs reduce(my_half4) accumulator(my_half4_accum) combiner(my_half4_comb) outconverter(my_half4_out) +static void my_half4_accum(half4 *accum, int val) { } +static void my_half4_comb(half4 *accum, const half4 *other) { } +static void my_half4_out(int *out, const half4 *accum) { } + +#pragma rs reduce(my_array_half) accumulator(my_array_half_accum) combiner(my_array_half_comb) outconverter(my_array_half_out) +typedef half array_half[7]; +static void my_array_half_accum(array_half *accum, int val) { } +static void my_array_half_comb(array_half *accum, const array_half *other) { } +static void my_array_half_out(int *out, const array_half *accum) { } + +#pragma rs reduce(my_array_half2) accumulator(my_array_half2_accum) combiner(my_array_half2_comb) outconverter(my_array_half2_out) +typedef half2 array_half2[7]; +static void my_array_half2_accum(array_half2 *accum, int val) { } +static void my_array_half2_comb(array_half2 *accum, const array_half2 *other) { } +static void my_array_half2_out(int *out, const array_half2 *accum) { } + +#pragma rs reduce(my_array_half4) accumulator(my_array_half4_accum) combiner(my_array_half4_comb) outconverter(my_array_half4_out) +typedef half4 array_half4[7]; +static void my_array_half4_accum(array_half4 *accum, int val) { } +static void my_array_half4_comb(array_half4 *accum, const array_half4 *other) { } +static void my_array_half4_out(int *out, const array_half4 *accum) { } + +#pragma rs reduce(my_float) accumulator(my_float_accum) combiner(my_float_comb) outconverter(my_float_out) +static void my_float_accum(float *accum, int val) { } +static void my_float_comb(float *accum, const float *other) { } +static void my_float_out(int *out, const float *accum) { } + +#pragma rs reduce(my_float2) accumulator(my_float2_accum) combiner(my_float2_comb) outconverter(my_float2_out) +static void my_float2_accum(float2 *accum, int val) { } +static void my_float2_comb(float2 *accum, const float2 *other) { } +static void my_float2_out(int *out, const float2 *accum) { } + +#pragma rs reduce(my_float4) accumulator(my_float4_accum) combiner(my_float4_comb) outconverter(my_float4_out) +static void my_float4_accum(float4 *accum, int val) { } +static void my_float4_comb(float4 *accum, const float4 *other) { } +static void my_float4_out(int *out, const float4 *accum) { } + +#pragma rs reduce(my_array_float) accumulator(my_array_float_accum) combiner(my_array_float_comb) outconverter(my_array_float_out) +typedef float array_float[7]; +static void my_array_float_accum(array_float *accum, int val) { } +static void my_array_float_comb(array_float *accum, const array_float *other) { } +static void my_array_float_out(int *out, const array_float *accum) { } + +#pragma rs reduce(my_array_float2) accumulator(my_array_float2_accum) combiner(my_array_float2_comb) outconverter(my_array_float2_out) +typedef float2 array_float2[7]; +static void my_array_float2_accum(array_float2 *accum, int val) { } +static void my_array_float2_comb(array_float2 *accum, const array_float2 *other) { } +static void my_array_float2_out(int *out, const array_float2 *accum) { } + +#pragma rs reduce(my_array_float4) accumulator(my_array_float4_accum) combiner(my_array_float4_comb) outconverter(my_array_float4_out) +typedef float4 array_float4[7]; +static void my_array_float4_accum(array_float4 *accum, int val) { } +static void my_array_float4_comb(array_float4 *accum, const array_float4 *other) { } +static void my_array_float4_out(int *out, const array_float4 *accum) { } + +#pragma rs reduce(my_double) accumulator(my_double_accum) combiner(my_double_comb) outconverter(my_double_out) +static void my_double_accum(double *accum, int val) { } +static void my_double_comb(double *accum, const double *other) { } +static void my_double_out(int *out, const double *accum) { } + +#pragma rs reduce(my_double2) accumulator(my_double2_accum) combiner(my_double2_comb) outconverter(my_double2_out) +static void my_double2_accum(double2 *accum, int val) { } +static void my_double2_comb(double2 *accum, const double2 *other) { } +static void my_double2_out(int *out, const double2 *accum) { } + +#pragma rs reduce(my_double4) accumulator(my_double4_accum) combiner(my_double4_comb) outconverter(my_double4_out) +static void my_double4_accum(double4 *accum, int val) { } +static void my_double4_comb(double4 *accum, const double4 *other) { } +static void my_double4_out(int *out, const double4 *accum) { } + +#pragma rs reduce(my_array_double) accumulator(my_array_double_accum) combiner(my_array_double_comb) outconverter(my_array_double_out) +typedef double array_double[7]; +static void my_array_double_accum(array_double *accum, int val) { } +static void my_array_double_comb(array_double *accum, const array_double *other) { } +static void my_array_double_out(int *out, const array_double *accum) { } + +#pragma rs reduce(my_array_double2) accumulator(my_array_double2_accum) combiner(my_array_double2_comb) outconverter(my_array_double2_out) +typedef double2 array_double2[7]; +static void my_array_double2_accum(array_double2 *accum, int val) { } +static void my_array_double2_comb(array_double2 *accum, const array_double2 *other) { } +static void my_array_double2_out(int *out, const array_double2 *accum) { } + +#pragma rs reduce(my_array_double4) accumulator(my_array_double4_accum) combiner(my_array_double4_comb) outconverter(my_array_double4_out) +typedef double4 array_double4[7]; +static void my_array_double4_accum(array_double4 *accum, int val) { } +static void my_array_double4_comb(array_double4 *accum, const array_double4 *other) { } +static void my_array_double4_out(int *out, const array_double4 *accum) { } + +#pragma rs reduce(my_char) accumulator(my_char_accum) combiner(my_char_comb) outconverter(my_char_out) +static void my_char_accum(char *accum, int val) { } +static void my_char_comb(char *accum, const char *other) { } +static void my_char_out(int *out, const char *accum) { } + +#pragma rs reduce(my_char2) accumulator(my_char2_accum) combiner(my_char2_comb) outconverter(my_char2_out) +static void my_char2_accum(char2 *accum, int val) { } +static void my_char2_comb(char2 *accum, const char2 *other) { } +static void my_char2_out(int *out, const char2 *accum) { } + +#pragma rs reduce(my_char4) accumulator(my_char4_accum) combiner(my_char4_comb) outconverter(my_char4_out) +static void my_char4_accum(char4 *accum, int val) { } +static void my_char4_comb(char4 *accum, const char4 *other) { } +static void my_char4_out(int *out, const char4 *accum) { } + +#pragma rs reduce(my_array_char) accumulator(my_array_char_accum) combiner(my_array_char_comb) outconverter(my_array_char_out) +typedef char array_char[7]; +static void my_array_char_accum(array_char *accum, int val) { } +static void my_array_char_comb(array_char *accum, const array_char *other) { } +static void my_array_char_out(int *out, const array_char *accum) { } + +#pragma rs reduce(my_array_char2) accumulator(my_array_char2_accum) combiner(my_array_char2_comb) outconverter(my_array_char2_out) +typedef char2 array_char2[7]; +static void my_array_char2_accum(array_char2 *accum, int val) { } +static void my_array_char2_comb(array_char2 *accum, const array_char2 *other) { } +static void my_array_char2_out(int *out, const array_char2 *accum) { } + +#pragma rs reduce(my_array_char4) accumulator(my_array_char4_accum) combiner(my_array_char4_comb) outconverter(my_array_char4_out) +typedef char4 array_char4[7]; +static void my_array_char4_accum(array_char4 *accum, int val) { } +static void my_array_char4_comb(array_char4 *accum, const array_char4 *other) { } +static void my_array_char4_out(int *out, const array_char4 *accum) { } + +#pragma rs reduce(my_short) accumulator(my_short_accum) combiner(my_short_comb) outconverter(my_short_out) +static void my_short_accum(short *accum, int val) { } +static void my_short_comb(short *accum, const short *other) { } +static void my_short_out(int *out, const short *accum) { } + +#pragma rs reduce(my_short2) accumulator(my_short2_accum) combiner(my_short2_comb) outconverter(my_short2_out) +static void my_short2_accum(short2 *accum, int val) { } +static void my_short2_comb(short2 *accum, const short2 *other) { } +static void my_short2_out(int *out, const short2 *accum) { } + +#pragma rs reduce(my_short4) accumulator(my_short4_accum) combiner(my_short4_comb) outconverter(my_short4_out) +static void my_short4_accum(short4 *accum, int val) { } +static void my_short4_comb(short4 *accum, const short4 *other) { } +static void my_short4_out(int *out, const short4 *accum) { } + +#pragma rs reduce(my_array_short) accumulator(my_array_short_accum) combiner(my_array_short_comb) outconverter(my_array_short_out) +typedef short array_short[7]; +static void my_array_short_accum(array_short *accum, int val) { } +static void my_array_short_comb(array_short *accum, const array_short *other) { } +static void my_array_short_out(int *out, const array_short *accum) { } + +#pragma rs reduce(my_array_short2) accumulator(my_array_short2_accum) combiner(my_array_short2_comb) outconverter(my_array_short2_out) +typedef short2 array_short2[7]; +static void my_array_short2_accum(array_short2 *accum, int val) { } +static void my_array_short2_comb(array_short2 *accum, const array_short2 *other) { } +static void my_array_short2_out(int *out, const array_short2 *accum) { } + +#pragma rs reduce(my_array_short4) accumulator(my_array_short4_accum) combiner(my_array_short4_comb) outconverter(my_array_short4_out) +typedef short4 array_short4[7]; +static void my_array_short4_accum(array_short4 *accum, int val) { } +static void my_array_short4_comb(array_short4 *accum, const array_short4 *other) { } +static void my_array_short4_out(int *out, const array_short4 *accum) { } + +#pragma rs reduce(my_int) accumulator(my_int_accum) combiner(my_int_comb) outconverter(my_int_out) +static void my_int_accum(int *accum, int val) { } +static void my_int_comb(int *accum, const int *other) { } +static void my_int_out(int *out, const int *accum) { } + +#pragma rs reduce(my_int2) accumulator(my_int2_accum) combiner(my_int2_comb) outconverter(my_int2_out) +static void my_int2_accum(int2 *accum, int val) { } +static void my_int2_comb(int2 *accum, const int2 *other) { } +static void my_int2_out(int *out, const int2 *accum) { } + +#pragma rs reduce(my_int4) accumulator(my_int4_accum) combiner(my_int4_comb) outconverter(my_int4_out) +static void my_int4_accum(int4 *accum, int val) { } +static void my_int4_comb(int4 *accum, const int4 *other) { } +static void my_int4_out(int *out, const int4 *accum) { } + +#pragma rs reduce(my_array_int) accumulator(my_array_int_accum) combiner(my_array_int_comb) outconverter(my_array_int_out) +typedef int array_int[7]; +static void my_array_int_accum(array_int *accum, int val) { } +static void my_array_int_comb(array_int *accum, const array_int *other) { } +static void my_array_int_out(int *out, const array_int *accum) { } + +#pragma rs reduce(my_array_int2) accumulator(my_array_int2_accum) combiner(my_array_int2_comb) outconverter(my_array_int2_out) +typedef int2 array_int2[7]; +static void my_array_int2_accum(array_int2 *accum, int val) { } +static void my_array_int2_comb(array_int2 *accum, const array_int2 *other) { } +static void my_array_int2_out(int *out, const array_int2 *accum) { } + +#pragma rs reduce(my_array_int4) accumulator(my_array_int4_accum) combiner(my_array_int4_comb) outconverter(my_array_int4_out) +typedef int4 array_int4[7]; +static void my_array_int4_accum(array_int4 *accum, int val) { } +static void my_array_int4_comb(array_int4 *accum, const array_int4 *other) { } +static void my_array_int4_out(int *out, const array_int4 *accum) { } + +#pragma rs reduce(my_long) accumulator(my_long_accum) combiner(my_long_comb) outconverter(my_long_out) +static void my_long_accum(long *accum, int val) { } +static void my_long_comb(long *accum, const long *other) { } +static void my_long_out(int *out, const long *accum) { } + +#pragma rs reduce(my_long2) accumulator(my_long2_accum) combiner(my_long2_comb) outconverter(my_long2_out) +static void my_long2_accum(long2 *accum, int val) { } +static void my_long2_comb(long2 *accum, const long2 *other) { } +static void my_long2_out(int *out, const long2 *accum) { } + +#pragma rs reduce(my_long4) accumulator(my_long4_accum) combiner(my_long4_comb) outconverter(my_long4_out) +static void my_long4_accum(long4 *accum, int val) { } +static void my_long4_comb(long4 *accum, const long4 *other) { } +static void my_long4_out(int *out, const long4 *accum) { } + +#pragma rs reduce(my_array_long) accumulator(my_array_long_accum) combiner(my_array_long_comb) outconverter(my_array_long_out) +typedef long array_long[7]; +static void my_array_long_accum(array_long *accum, int val) { } +static void my_array_long_comb(array_long *accum, const array_long *other) { } +static void my_array_long_out(int *out, const array_long *accum) { } + +#pragma rs reduce(my_array_long2) accumulator(my_array_long2_accum) combiner(my_array_long2_comb) outconverter(my_array_long2_out) +typedef long2 array_long2[7]; +static void my_array_long2_accum(array_long2 *accum, int val) { } +static void my_array_long2_comb(array_long2 *accum, const array_long2 *other) { } +static void my_array_long2_out(int *out, const array_long2 *accum) { } + +#pragma rs reduce(my_array_long4) accumulator(my_array_long4_accum) combiner(my_array_long4_comb) outconverter(my_array_long4_out) +typedef long4 array_long4[7]; +static void my_array_long4_accum(array_long4 *accum, int val) { } +static void my_array_long4_comb(array_long4 *accum, const array_long4 *other) { } +static void my_array_long4_out(int *out, const array_long4 *accum) { } + +#pragma rs reduce(my_uchar) accumulator(my_uchar_accum) combiner(my_uchar_comb) outconverter(my_uchar_out) +static void my_uchar_accum(uchar *accum, int val) { } +static void my_uchar_comb(uchar *accum, const uchar *other) { } +static void my_uchar_out(int *out, const uchar *accum) { } + +#pragma rs reduce(my_uchar2) accumulator(my_uchar2_accum) combiner(my_uchar2_comb) outconverter(my_uchar2_out) +static void my_uchar2_accum(uchar2 *accum, int val) { } +static void my_uchar2_comb(uchar2 *accum, const uchar2 *other) { } +static void my_uchar2_out(int *out, const uchar2 *accum) { } + +#pragma rs reduce(my_uchar4) accumulator(my_uchar4_accum) combiner(my_uchar4_comb) outconverter(my_uchar4_out) +static void my_uchar4_accum(uchar4 *accum, int val) { } +static void my_uchar4_comb(uchar4 *accum, const uchar4 *other) { } +static void my_uchar4_out(int *out, const uchar4 *accum) { } + +#pragma rs reduce(my_array_uchar) accumulator(my_array_uchar_accum) combiner(my_array_uchar_comb) outconverter(my_array_uchar_out) +typedef uchar array_uchar[7]; +static void my_array_uchar_accum(array_uchar *accum, int val) { } +static void my_array_uchar_comb(array_uchar *accum, const array_uchar *other) { } +static void my_array_uchar_out(int *out, const array_uchar *accum) { } + +#pragma rs reduce(my_array_uchar2) accumulator(my_array_uchar2_accum) combiner(my_array_uchar2_comb) outconverter(my_array_uchar2_out) +typedef uchar2 array_uchar2[7]; +static void my_array_uchar2_accum(array_uchar2 *accum, int val) { } +static void my_array_uchar2_comb(array_uchar2 *accum, const array_uchar2 *other) { } +static void my_array_uchar2_out(int *out, const array_uchar2 *accum) { } + +#pragma rs reduce(my_array_uchar4) accumulator(my_array_uchar4_accum) combiner(my_array_uchar4_comb) outconverter(my_array_uchar4_out) +typedef uchar4 array_uchar4[7]; +static void my_array_uchar4_accum(array_uchar4 *accum, int val) { } +static void my_array_uchar4_comb(array_uchar4 *accum, const array_uchar4 *other) { } +static void my_array_uchar4_out(int *out, const array_uchar4 *accum) { } + +#pragma rs reduce(my_ushort) accumulator(my_ushort_accum) combiner(my_ushort_comb) outconverter(my_ushort_out) +static void my_ushort_accum(ushort *accum, int val) { } +static void my_ushort_comb(ushort *accum, const ushort *other) { } +static void my_ushort_out(int *out, const ushort *accum) { } + +#pragma rs reduce(my_ushort2) accumulator(my_ushort2_accum) combiner(my_ushort2_comb) outconverter(my_ushort2_out) +static void my_ushort2_accum(ushort2 *accum, int val) { } +static void my_ushort2_comb(ushort2 *accum, const ushort2 *other) { } +static void my_ushort2_out(int *out, const ushort2 *accum) { } + +#pragma rs reduce(my_ushort4) accumulator(my_ushort4_accum) combiner(my_ushort4_comb) outconverter(my_ushort4_out) +static void my_ushort4_accum(ushort4 *accum, int val) { } +static void my_ushort4_comb(ushort4 *accum, const ushort4 *other) { } +static void my_ushort4_out(int *out, const ushort4 *accum) { } + +#pragma rs reduce(my_array_ushort) accumulator(my_array_ushort_accum) combiner(my_array_ushort_comb) outconverter(my_array_ushort_out) +typedef ushort array_ushort[7]; +static void my_array_ushort_accum(array_ushort *accum, int val) { } +static void my_array_ushort_comb(array_ushort *accum, const array_ushort *other) { } +static void my_array_ushort_out(int *out, const array_ushort *accum) { } + +#pragma rs reduce(my_array_ushort2) accumulator(my_array_ushort2_accum) combiner(my_array_ushort2_comb) outconverter(my_array_ushort2_out) +typedef ushort2 array_ushort2[7]; +static void my_array_ushort2_accum(array_ushort2 *accum, int val) { } +static void my_array_ushort2_comb(array_ushort2 *accum, const array_ushort2 *other) { } +static void my_array_ushort2_out(int *out, const array_ushort2 *accum) { } + +#pragma rs reduce(my_array_ushort4) accumulator(my_array_ushort4_accum) combiner(my_array_ushort4_comb) outconverter(my_array_ushort4_out) +typedef ushort4 array_ushort4[7]; +static void my_array_ushort4_accum(array_ushort4 *accum, int val) { } +static void my_array_ushort4_comb(array_ushort4 *accum, const array_ushort4 *other) { } +static void my_array_ushort4_out(int *out, const array_ushort4 *accum) { } + +#pragma rs reduce(my_uint) accumulator(my_uint_accum) combiner(my_uint_comb) outconverter(my_uint_out) +static void my_uint_accum(uint *accum, int val) { } +static void my_uint_comb(uint *accum, const uint *other) { } +static void my_uint_out(int *out, const uint *accum) { } + +#pragma rs reduce(my_uint2) accumulator(my_uint2_accum) combiner(my_uint2_comb) outconverter(my_uint2_out) +static void my_uint2_accum(uint2 *accum, int val) { } +static void my_uint2_comb(uint2 *accum, const uint2 *other) { } +static void my_uint2_out(int *out, const uint2 *accum) { } + +#pragma rs reduce(my_uint4) accumulator(my_uint4_accum) combiner(my_uint4_comb) outconverter(my_uint4_out) +static void my_uint4_accum(uint4 *accum, int val) { } +static void my_uint4_comb(uint4 *accum, const uint4 *other) { } +static void my_uint4_out(int *out, const uint4 *accum) { } + +#pragma rs reduce(my_array_uint) accumulator(my_array_uint_accum) combiner(my_array_uint_comb) outconverter(my_array_uint_out) +typedef uint array_uint[7]; +static void my_array_uint_accum(array_uint *accum, int val) { } +static void my_array_uint_comb(array_uint *accum, const array_uint *other) { } +static void my_array_uint_out(int *out, const array_uint *accum) { } + +#pragma rs reduce(my_array_uint2) accumulator(my_array_uint2_accum) combiner(my_array_uint2_comb) outconverter(my_array_uint2_out) +typedef uint2 array_uint2[7]; +static void my_array_uint2_accum(array_uint2 *accum, int val) { } +static void my_array_uint2_comb(array_uint2 *accum, const array_uint2 *other) { } +static void my_array_uint2_out(int *out, const array_uint2 *accum) { } + +#pragma rs reduce(my_array_uint4) accumulator(my_array_uint4_accum) combiner(my_array_uint4_comb) outconverter(my_array_uint4_out) +typedef uint4 array_uint4[7]; +static void my_array_uint4_accum(array_uint4 *accum, int val) { } +static void my_array_uint4_comb(array_uint4 *accum, const array_uint4 *other) { } +static void my_array_uint4_out(int *out, const array_uint4 *accum) { } + +#pragma rs reduce(my_ulong) accumulator(my_ulong_accum) combiner(my_ulong_comb) outconverter(my_ulong_out) +static void my_ulong_accum(ulong *accum, int val) { } +static void my_ulong_comb(ulong *accum, const ulong *other) { } +static void my_ulong_out(int *out, const ulong *accum) { } + +#pragma rs reduce(my_ulong2) accumulator(my_ulong2_accum) combiner(my_ulong2_comb) outconverter(my_ulong2_out) +static void my_ulong2_accum(ulong2 *accum, int val) { } +static void my_ulong2_comb(ulong2 *accum, const ulong2 *other) { } +static void my_ulong2_out(int *out, const ulong2 *accum) { } + +#pragma rs reduce(my_ulong4) accumulator(my_ulong4_accum) combiner(my_ulong4_comb) outconverter(my_ulong4_out) +static void my_ulong4_accum(ulong4 *accum, int val) { } +static void my_ulong4_comb(ulong4 *accum, const ulong4 *other) { } +static void my_ulong4_out(int *out, const ulong4 *accum) { } + +#pragma rs reduce(my_array_ulong) accumulator(my_array_ulong_accum) combiner(my_array_ulong_comb) outconverter(my_array_ulong_out) +typedef ulong array_ulong[7]; +static void my_array_ulong_accum(array_ulong *accum, int val) { } +static void my_array_ulong_comb(array_ulong *accum, const array_ulong *other) { } +static void my_array_ulong_out(int *out, const array_ulong *accum) { } + +#pragma rs reduce(my_array_ulong2) accumulator(my_array_ulong2_accum) combiner(my_array_ulong2_comb) outconverter(my_array_ulong2_out) +typedef ulong2 array_ulong2[7]; +static void my_array_ulong2_accum(array_ulong2 *accum, int val) { } +static void my_array_ulong2_comb(array_ulong2 *accum, const array_ulong2 *other) { } +static void my_array_ulong2_out(int *out, const array_ulong2 *accum) { } + +#pragma rs reduce(my_array_ulong4) accumulator(my_array_ulong4_accum) combiner(my_array_ulong4_comb) outconverter(my_array_ulong4_out) +typedef ulong4 array_ulong4[7]; +static void my_array_ulong4_accum(array_ulong4 *accum, int val) { } +static void my_array_ulong4_comb(array_ulong4 *accum, const array_ulong4 *other) { } +static void my_array_ulong4_out(int *out, const array_ulong4 *accum) { } + +#pragma rs reduce(my_bool) accumulator(my_bool_accum) combiner(my_bool_comb) outconverter(my_bool_out) +static void my_bool_accum(bool *accum, int val) { } +static void my_bool_comb(bool *accum, const bool *other) { } +static void my_bool_out(int *out, const bool *accum) { } + +#pragma rs reduce(my_array_bool) accumulator(my_array_bool_accum) combiner(my_array_bool_comb) outconverter(my_array_bool_out) +typedef bool array_bool[7]; +static void my_array_bool_accum(array_bool *accum, int val) { } +static void my_array_bool_comb(array_bool *accum, const array_bool *other) { } +static void my_array_bool_out(int *out, const array_bool *accum) { } + +#pragma rs reduce(my_rs_matrix2x2) accumulator(my_rs_matrix2x2_accum) combiner(my_rs_matrix2x2_comb) outconverter(my_rs_matrix2x2_out) +static void my_rs_matrix2x2_accum(rs_matrix2x2 *accum, int val) { } +static void my_rs_matrix2x2_comb(rs_matrix2x2 *accum, const rs_matrix2x2 *other) { } +static void my_rs_matrix2x2_out(int *out, const rs_matrix2x2 *accum) { } + +#pragma rs reduce(my_array_rs_matrix2x2) accumulator(my_array_rs_matrix2x2_accum) combiner(my_array_rs_matrix2x2_comb) outconverter(my_array_rs_matrix2x2_out) +typedef rs_matrix2x2 array_rs_matrix2x2[7]; +static void my_array_rs_matrix2x2_accum(array_rs_matrix2x2 *accum, int val) { } +static void my_array_rs_matrix2x2_comb(array_rs_matrix2x2 *accum, const array_rs_matrix2x2 *other) { } +static void my_array_rs_matrix2x2_out(int *out, const array_rs_matrix2x2 *accum) { } + +#pragma rs reduce(my_rs_matrix3x3) accumulator(my_rs_matrix3x3_accum) combiner(my_rs_matrix3x3_comb) outconverter(my_rs_matrix3x3_out) +static void my_rs_matrix3x3_accum(rs_matrix3x3 *accum, int val) { } +static void my_rs_matrix3x3_comb(rs_matrix3x3 *accum, const rs_matrix3x3 *other) { } +static void my_rs_matrix3x3_out(int *out, const rs_matrix3x3 *accum) { } + +#pragma rs reduce(my_array_rs_matrix3x3) accumulator(my_array_rs_matrix3x3_accum) combiner(my_array_rs_matrix3x3_comb) outconverter(my_array_rs_matrix3x3_out) +typedef rs_matrix3x3 array_rs_matrix3x3[7]; +static void my_array_rs_matrix3x3_accum(array_rs_matrix3x3 *accum, int val) { } +static void my_array_rs_matrix3x3_comb(array_rs_matrix3x3 *accum, const array_rs_matrix3x3 *other) { } +static void my_array_rs_matrix3x3_out(int *out, const array_rs_matrix3x3 *accum) { } + +#pragma rs reduce(my_rs_matrix4x4) accumulator(my_rs_matrix4x4_accum) combiner(my_rs_matrix4x4_comb) outconverter(my_rs_matrix4x4_out) +static void my_rs_matrix4x4_accum(rs_matrix4x4 *accum, int val) { } +static void my_rs_matrix4x4_comb(rs_matrix4x4 *accum, const rs_matrix4x4 *other) { } +static void my_rs_matrix4x4_out(int *out, const rs_matrix4x4 *accum) { } + +#pragma rs reduce(my_array_rs_matrix4x4) accumulator(my_array_rs_matrix4x4_accum) combiner(my_array_rs_matrix4x4_comb) outconverter(my_array_rs_matrix4x4_out) +typedef rs_matrix4x4 array_rs_matrix4x4[7]; +static void my_array_rs_matrix4x4_accum(array_rs_matrix4x4 *accum, int val) { } +static void my_array_rs_matrix4x4_comb(array_rs_matrix4x4 *accum, const array_rs_matrix4x4 *other) { } +static void my_array_rs_matrix4x4_out(int *out, const array_rs_matrix4x4 *accum) { } + +#pragma rs reduce(my_rs_for_each_strategy_t) accumulator(my_rs_for_each_strategy_t_accum) combiner(my_rs_for_each_strategy_t_comb) outconverter(my_rs_for_each_strategy_t_out) +static void my_rs_for_each_strategy_t_accum(rs_for_each_strategy_t *accum, int val) { } +static void my_rs_for_each_strategy_t_comb(rs_for_each_strategy_t *accum, const rs_for_each_strategy_t *other) { } +static void my_rs_for_each_strategy_t_out(int *out, const rs_for_each_strategy_t *accum) { } + +#pragma rs reduce(my_array_rs_for_each_strategy_t) accumulator(my_array_rs_for_each_strategy_t_accum) combiner(my_array_rs_for_each_strategy_t_comb) outconverter(my_array_rs_for_each_strategy_t_out) +typedef rs_for_each_strategy_t array_rs_for_each_strategy_t[7]; +static void my_array_rs_for_each_strategy_t_accum(array_rs_for_each_strategy_t *accum, int val) { } +static void my_array_rs_for_each_strategy_t_comb(array_rs_for_each_strategy_t *accum, const array_rs_for_each_strategy_t *other) { } +static void my_array_rs_for_each_strategy_t_out(int *out, const array_rs_for_each_strategy_t *accum) { } + +#pragma rs reduce(my_rs_script_call_t) accumulator(my_rs_script_call_t_accum) combiner(my_rs_script_call_t_comb) outconverter(my_rs_script_call_t_out) +static void my_rs_script_call_t_accum(rs_script_call_t *accum, int val) { } +static void my_rs_script_call_t_comb(rs_script_call_t *accum, const rs_script_call_t *other) { } +static void my_rs_script_call_t_out(int *out, const rs_script_call_t *accum) { } + +#pragma rs reduce(my_array_rs_script_call_t) accumulator(my_array_rs_script_call_t_accum) combiner(my_array_rs_script_call_t_comb) outconverter(my_array_rs_script_call_t_out) +typedef rs_script_call_t array_rs_script_call_t[7]; +static void my_array_rs_script_call_t_accum(array_rs_script_call_t *accum, int val) { } +static void my_array_rs_script_call_t_comb(array_rs_script_call_t *accum, const array_rs_script_call_t *other) { } +static void my_array_rs_script_call_t_out(int *out, const array_rs_script_call_t *accum) { } + +#pragma rs reduce(my_rs_time_t) accumulator(my_rs_time_t_accum) combiner(my_rs_time_t_comb) outconverter(my_rs_time_t_out) +static void my_rs_time_t_accum(rs_time_t *accum, int val) { } +static void my_rs_time_t_comb(rs_time_t *accum, const rs_time_t *other) { } +static void my_rs_time_t_out(int *out, const rs_time_t *accum) { } + +#pragma rs reduce(my_array_rs_time_t) accumulator(my_array_rs_time_t_accum) combiner(my_array_rs_time_t_comb) outconverter(my_array_rs_time_t_out) +typedef rs_time_t array_rs_time_t[7]; +static void my_array_rs_time_t_accum(array_rs_time_t *accum, int val) { } +static void my_array_rs_time_t_comb(array_rs_time_t *accum, const array_rs_time_t *other) { } +static void my_array_rs_time_t_out(int *out, const array_rs_time_t *accum) { } + +#pragma rs reduce(my_rs_tm) accumulator(my_rs_tm_accum) combiner(my_rs_tm_comb) outconverter(my_rs_tm_out) +static void my_rs_tm_accum(rs_tm *accum, int val) { } +static void my_rs_tm_comb(rs_tm *accum, const rs_tm *other) { } +static void my_rs_tm_out(int *out, const rs_tm *accum) { } + +#pragma rs reduce(my_array_rs_tm) accumulator(my_array_rs_tm_accum) combiner(my_array_rs_tm_comb) outconverter(my_array_rs_tm_out) +typedef rs_tm array_rs_tm[7]; +static void my_array_rs_tm_accum(array_rs_tm *accum, int val) { } +static void my_array_rs_tm_comb(array_rs_tm *accum, const array_rs_tm *other) { } +static void my_array_rs_tm_out(int *out, const array_rs_tm *accum) { } + +#pragma rs reduce(my_MyEnum) accumulator(my_MyEnum_accum) combiner(my_MyEnum_comb) outconverter(my_MyEnum_out) +static void my_MyEnum_accum(MyEnum *accum, int val) { } +static void my_MyEnum_comb(MyEnum *accum, const MyEnum *other) { } +static void my_MyEnum_out(int *out, const MyEnum *accum) { } + +#pragma rs reduce(my_array_MyEnum) accumulator(my_array_MyEnum_accum) combiner(my_array_MyEnum_comb) outconverter(my_array_MyEnum_out) +typedef MyEnum array_MyEnum[7]; +static void my_array_MyEnum_accum(array_MyEnum *accum, int val) { } +static void my_array_MyEnum_comb(array_MyEnum *accum, const array_MyEnum *other) { } +static void my_array_MyEnum_out(int *out, const array_MyEnum *accum) { } + +#pragma rs reduce(my_MyPtrArray) accumulator(my_MyPtrArray_accum) combiner(my_MyPtrArray_comb) outconverter(my_MyPtrArray_out) +static void my_MyPtrArray_accum(MyPtrArray *accum, int val) { } +static void my_MyPtrArray_comb(MyPtrArray *accum, const MyPtrArray *other) { } +static void my_MyPtrArray_out(int *out, const MyPtrArray *accum) { } + +#pragma rs reduce(my_array_MyPtrArray) accumulator(my_array_MyPtrArray_accum) combiner(my_array_MyPtrArray_comb) outconverter(my_array_MyPtrArray_out) +typedef MyPtrArray array_MyPtrArray[7]; +static void my_array_MyPtrArray_accum(array_MyPtrArray *accum, int val) { } +static void my_array_MyPtrArray_comb(array_MyPtrArray *accum, const array_MyPtrArray *other) { } +static void my_array_MyPtrArray_out(int *out, const array_MyPtrArray *accum) { } + +#pragma rs reduce(my_MyPtrFn) accumulator(my_MyPtrFn_accum) combiner(my_MyPtrFn_comb) outconverter(my_MyPtrFn_out) +static void my_MyPtrFn_accum(MyPtrFn *accum, int val) { } +static void my_MyPtrFn_comb(MyPtrFn *accum, const MyPtrFn *other) { } +static void my_MyPtrFn_out(int *out, const MyPtrFn *accum) { } + +#pragma rs reduce(my_array_MyPtrFn) accumulator(my_array_MyPtrFn_accum) combiner(my_array_MyPtrFn_comb) outconverter(my_array_MyPtrFn_out) +typedef MyPtrFn array_MyPtrFn[7]; +static void my_array_MyPtrFn_accum(array_MyPtrFn *accum, int val) { } +static void my_array_MyPtrFn_comb(array_MyPtrFn *accum, const array_MyPtrFn *other) { } +static void my_array_MyPtrFn_out(int *out, const array_MyPtrFn *accum) { } + +#pragma rs reduce(my_MyPtrIncomplete) accumulator(my_MyPtrIncomplete_accum) combiner(my_MyPtrIncomplete_comb) outconverter(my_MyPtrIncomplete_out) +static void my_MyPtrIncomplete_accum(MyPtrIncomplete *accum, int val) { } +static void my_MyPtrIncomplete_comb(MyPtrIncomplete *accum, const MyPtrIncomplete *other) { } +static void my_MyPtrIncomplete_out(int *out, const MyPtrIncomplete *accum) { } + +#pragma rs reduce(my_array_MyPtrIncomplete) accumulator(my_array_MyPtrIncomplete_accum) combiner(my_array_MyPtrIncomplete_comb) outconverter(my_array_MyPtrIncomplete_out) +typedef MyPtrIncomplete array_MyPtrIncomplete[7]; +static void my_array_MyPtrIncomplete_accum(array_MyPtrIncomplete *accum, int val) { } +static void my_array_MyPtrIncomplete_comb(array_MyPtrIncomplete *accum, const array_MyPtrIncomplete *other) { } +static void my_array_MyPtrIncomplete_out(int *out, const array_MyPtrIncomplete *accum) { } + +#pragma rs reduce(my_MyPtrShort) accumulator(my_MyPtrShort_accum) combiner(my_MyPtrShort_comb) outconverter(my_MyPtrShort_out) +static void my_MyPtrShort_accum(MyPtrShort *accum, int val) { } +static void my_MyPtrShort_comb(MyPtrShort *accum, const MyPtrShort *other) { } +static void my_MyPtrShort_out(int *out, const MyPtrShort *accum) { } + +#pragma rs reduce(my_array_MyPtrShort) accumulator(my_array_MyPtrShort_accum) combiner(my_array_MyPtrShort_comb) outconverter(my_array_MyPtrShort_out) +typedef MyPtrShort array_MyPtrShort[7]; +static void my_array_MyPtrShort_accum(array_MyPtrShort *accum, int val) { } +static void my_array_MyPtrShort_comb(array_MyPtrShort *accum, const array_MyPtrShort *other) { } +static void my_array_MyPtrShort_out(int *out, const array_MyPtrShort *accum) { } + +#pragma rs reduce(my_MyPtrVoid) accumulator(my_MyPtrVoid_accum) combiner(my_MyPtrVoid_comb) outconverter(my_MyPtrVoid_out) +static void my_MyPtrVoid_accum(MyPtrVoid *accum, int val) { } +static void my_MyPtrVoid_comb(MyPtrVoid *accum, const MyPtrVoid *other) { } +static void my_MyPtrVoid_out(int *out, const MyPtrVoid *accum) { } + +#pragma rs reduce(my_array_MyPtrVoid) accumulator(my_array_MyPtrVoid_accum) combiner(my_array_MyPtrVoid_comb) outconverter(my_array_MyPtrVoid_out) +typedef MyPtrVoid array_MyPtrVoid[7]; +static void my_array_MyPtrVoid_accum(array_MyPtrVoid *accum, int val) { } +static void my_array_MyPtrVoid_comb(array_MyPtrVoid *accum, const array_MyPtrVoid *other) { } +static void my_array_MyPtrVoid_out(int *out, const array_MyPtrVoid *accum) { } + +#pragma rs reduce(my_MyStruct) accumulator(my_MyStruct_accum) combiner(my_MyStruct_comb) outconverter(my_MyStruct_out) +static void my_MyStruct_accum(MyStruct *accum, int val) { } +static void my_MyStruct_comb(MyStruct *accum, const MyStruct *other) { } +static void my_MyStruct_out(int *out, const MyStruct *accum) { } + +#pragma rs reduce(my_array_MyStruct) accumulator(my_array_MyStruct_accum) combiner(my_array_MyStruct_comb) outconverter(my_array_MyStruct_out) +typedef MyStruct array_MyStruct[7]; +static void my_array_MyStruct_accum(array_MyStruct *accum, int val) { } +static void my_array_MyStruct_comb(array_MyStruct *accum, const array_MyStruct *other) { } +static void my_array_MyStruct_out(int *out, const array_MyStruct *accum) { } + +#pragma rs reduce(my_MyUnion) accumulator(my_MyUnion_accum) combiner(my_MyUnion_comb) outconverter(my_MyUnion_out) +static void my_MyUnion_accum(MyUnion *accum, int val) { } +static void my_MyUnion_comb(MyUnion *accum, const MyUnion *other) { } +static void my_MyUnion_out(int *out, const MyUnion *accum) { } + +#pragma rs reduce(my_array_MyUnion) accumulator(my_array_MyUnion_accum) combiner(my_array_MyUnion_comb) outconverter(my_array_MyUnion_out) +typedef MyUnion array_MyUnion[7]; +static void my_array_MyUnion_accum(array_MyUnion *accum, int val) { } +static void my_array_MyUnion_comb(array_MyUnion *accum, const array_MyUnion *other) { } +static void my_array_MyUnion_out(int *out, const array_MyUnion *accum) { } + +#pragma rs reduce(my_MyBlob) accumulator(my_MyBlob_accum) combiner(my_MyBlob_comb) outconverter(my_MyBlob_out) +static void my_MyBlob_accum(MyBlob *accum, int val) { } +static void my_MyBlob_comb(MyBlob *accum, const MyBlob *other) { } +static void my_MyBlob_out(int *out, const MyBlob *accum) { } + +#pragma rs reduce(my_array_MyBlob) accumulator(my_array_MyBlob_accum) combiner(my_array_MyBlob_comb) outconverter(my_array_MyBlob_out) +typedef MyBlob array_MyBlob[7]; +static void my_array_MyBlob_accum(array_MyBlob *accum, int val) { } +static void my_array_MyBlob_comb(array_MyBlob *accum, const array_MyBlob *other) { } +static void my_array_MyBlob_out(int *out, const array_MyBlob *accum) { }
diff --git a/slang/tests/P_reduce_general_accumulator/stderr.txt.expect b/slang/tests/P_reduce_general_accumulator/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_accumulator/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_accumulator/stdout.txt.expect b/slang/tests/P_reduce_general_accumulator/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_accumulator/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_duplicate_array/ScriptC_reduce_general_duplicate_array.java.expect b/slang/tests/P_reduce_general_duplicate_array/ScriptC_reduce_general_duplicate_array.java.expect new file mode 100644 index 0000000..c4d88ab --- /dev/null +++ b/slang/tests/P_reduce_general_duplicate_array/ScriptC_reduce_general_duplicate_array.java.expect
@@ -0,0 +1,147 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_duplicate_array.rs + */ + +package array; + +import android.renderscript.*; +import array.reduce_general_duplicate_arrayBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_duplicate_array extends ScriptC { + private static final String __rs_resource_name = "reduce_general_duplicate_array"; + // Constructor + public ScriptC_reduce_general_duplicate_array(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_duplicate_arrayBitCode.getBitCode32(), + reduce_general_duplicate_arrayBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + } + + private Element __I32; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray4_int { + public int[] get() { + if (!mGotResult) { + int[] outArray = new int[4]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray4_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int[] mResult; + } + + private final static int mExportReduceIdx_sumDec = 0; + // in1 = "val" + public resultArray4_int reduce_sumDec(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray4_int result = reduce_sumDec(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public resultArray4_int reduce_sumDec(Allocation ain1) { + return reduce_sumDec(ain1, null); + } + + // ain1 = "int val" + public resultArray4_int reduce_sumDec(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 4); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_sumDec, new Allocation[]{ain1}, aout, sc); + return new resultArray4_int(aout); + } + + private final static int mExportReduceIdx_sumInc = 1; + // in1 = "val" + public resultArray4_int reduce_sumInc(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray4_int result = reduce_sumInc(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public resultArray4_int reduce_sumInc(Allocation ain1) { + return reduce_sumInc(ain1, null); + } + + // ain1 = "int val" + public resultArray4_int reduce_sumInc(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 4); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_sumInc, new Allocation[]{ain1}, aout, sc); + return new resultArray4_int(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_duplicate_array/reduce_general_duplicate_array.rs b/slang/tests/P_reduce_general_duplicate_array/reduce_general_duplicate_array.rs new file mode 100644 index 0000000..9c806a6 --- /dev/null +++ b/slang/tests/P_reduce_general_duplicate_array/reduce_general_duplicate_array.rs
@@ -0,0 +1,22 @@ +// -target-api 0 -Wall +#pragma version(1) +#pragma rs java_package_name(array) + +// The two kernels have anonymous result types that are equivalent. +// slang doesn't common them (i.e., each gets its own RSExportType); +// so Java reflection must guard against this to avoid creating two +// copies of the text that defines the reflected class resultArray4_int. + +static void accumFn(int *accumDatum, int val) { *accumDatum += val; } + +#pragma rs reduce(sumDec) accumulator(accumFn) outconverter(outFnDec) +static void outFnDec(int (*out)[4], const int *accumDatum) { + for (int i = 0; i < 4; ++i) + (*out)[i] = (*accumDatum)/(i+1); +} + +#pragma rs reduce(sumInc) accumulator(accumFn) outconverter(outFnInc) +static void outFnInc(int (*out)[4], const int *accumDatum) { + for (int i = 0; i < 4; ++i) + (*out)[i] = (*accumDatum)/(4-i); +}
diff --git a/slang/tests/P_reduce_general_duplicate_array/stderr.txt.expect b/slang/tests/P_reduce_general_duplicate_array/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_duplicate_array/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_duplicate_array/stdout.txt.expect b/slang/tests/P_reduce_general_duplicate_array/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_duplicate_array/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_examples/ScriptC_reduce_general_examples.java.expect b/slang/tests/P_reduce_general_examples/ScriptC_reduce_general_examples.java.expect new file mode 100644 index 0000000..74b295e --- /dev/null +++ b/slang/tests/P_reduce_general_examples/ScriptC_reduce_general_examples.java.expect
@@ -0,0 +1,497 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_examples.rs + */ + +package examples; + +import android.renderscript.*; +import examples.reduce_general_examplesBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_examples extends ScriptC { + private static final String __rs_resource_name = "reduce_general_examples"; + // Constructor + public ScriptC_reduce_general_examples(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_examplesBitCode.getBitCode32(), + reduce_general_examplesBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + __F32 = Element.F32(rs); + __I32_2 = Element.I32_2(rs); + __U32 = Element.U32(rs); + __U8 = Element.U8(rs); + } + + private Element __F32; + private Element __I32; + private Element __I32_2; + private Element __U32; + private Element __U8; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray256_uint { + public long[] get() { + if (!mGotResult) { + int[] outArray = new int[256]; + mOut.copyTo(outArray); + long[] result = new long[256]; + for (int Idx = 0; Idx < 256; ++Idx) { + result[Idx] = ((long) ((outArray[Idx]) & 0xffffffffL)); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray256_uint(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_float { + public float get() { + if (!mGotResult) { + float[] outArray = new float[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_float(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private float mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int2 { + public Int2 get() { + if (!mGotResult) { + int[] outArray = new int[2]; + mOut.copyTo(outArray); + mResult = new Int2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int2 mResult; + } + + private final static int mExportReduceIdx_addint = 0; + // in1 = "val" + public result_int reduce_addint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_addint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_addint(Allocation ain1) { + return reduce_addint(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_addint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_addint, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_mpyint = 1; + // in1 = "val" + public result_int reduce_mpyint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_mpyint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_mpyint(Allocation ain1) { + return reduce_mpyint(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_mpyint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_mpyint, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_dp = 2; + // in1 = "in1" + // in2 = "in2" + public result_float reduce_dp(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_float result = reduce_dp(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float in1" + // ain2 = "float in2" + public result_float reduce_dp(Allocation ain1, Allocation ain2) { + return reduce_dp(ain1, ain2, null); + } + + // ain1 = "float in1" + // ain2 = "float in2" + public result_float reduce_dp(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __F32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_dp, new Allocation[]{ain1, ain2}, aout, sc); + return new result_float(aout); + } + + private final static int mExportReduceIdx_findMinAndMax = 3; + // in1 = "in" + public result_int2 reduce_findMinAndMax(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_findMinAndMax(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int2 reduce_findMinAndMax(Allocation ain1) { + return reduce_findMinAndMax(ain1, null); + } + + // ain1 = "float in" + public result_int2 reduce_findMinAndMax(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_findMinAndMax, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + + private final static int mExportReduceIdx_fz = 4; + // in1 = "inVal" + public result_int reduce_fz(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_fz(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int inVal" + public result_int reduce_fz(Allocation ain1) { + return reduce_fz(ain1, null); + } + + // ain1 = "int inVal" + public result_int reduce_fz(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_fz, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_fz2 = 5; + // in1 = "inVal" + public result_int2 reduce_fz2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_fz2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int inVal" + public result_int2 reduce_fz2(Allocation ain1) { + return reduce_fz2(ain1, null); + } + + // ain1 = "int inVal" + public result_int2 reduce_fz2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_fz2, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + + private final static int mExportReduceIdx_histogram = 6; + // in1 = "in" + public resultArray256_uint reduce_histogram(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray256_uint result = reduce_histogram(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public resultArray256_uint reduce_histogram(Allocation ain1) { + return reduce_histogram(ain1, null); + } + + // ain1 = "uchar in" + public resultArray256_uint reduce_histogram(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32, 256); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_histogram, new Allocation[]{ain1}, aout, sc); + return new resultArray256_uint(aout); + } + + private final static int mExportReduceIdx_mode = 7; + // in1 = "in" + public result_int2 reduce_mode(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_mode(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int2 reduce_mode(Allocation ain1) { + return reduce_mode(ain1, null); + } + + // ain1 = "uchar in" + public result_int2 reduce_mode(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_mode, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_examples/reduce_general_examples.rs b/slang/tests/P_reduce_general_examples/reduce_general_examples.rs new file mode 100644 index 0000000..17b6a27 --- /dev/null +++ b/slang/tests/P_reduce_general_examples/reduce_general_examples.rs
@@ -0,0 +1,148 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(examples) + +// Same as reduce_general_examples_backward.rs, except this test case +// places the pragmas before the functions (forward reference), and +// the other test case places the pragmas after the functions +// (backward reference). + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(addint) \ + accumulator(aiAccum) + +static void aiAccum(int *accum, int val) { *accum += val; } + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(mpyint) \ + initializer(mpyInit) accumulator(mpyAccum) + +static void mpyInit(int *accum) { *accum = 1; } + +static void mpyAccum(int *accum, int val) { *accum *= val; } + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(dp) \ + accumulator(dpAccum) combiner(dpSum) + +static void dpAccum(float *accum, float in1, float in2) { + *accum += in1*in2; +} + +// combiner function +static void dpSum(float *accum, const float *val) { *accum += *val; } + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(findMinAndMax) \ + initializer(fMMInit) accumulator(fMMAccumulator) \ + combiner(fMMCombiner) outconverter(fMMOutConverter) + +// this is just a compilation test +#define INFINITY 0.0f + +typedef struct { + float val; + int idx; +} IndexedVal; + +typedef struct { + IndexedVal min, max; +} MinAndMax; + +static void fMMInit(MinAndMax *accum) { + static const MinAndMax r = { { INFINITY, -1 }, { -INFINITY, -1 } }; + *accum = r; +} + +static void fMMAccumulator(MinAndMax *accum, float in, int x) { + IndexedVal me; + me.val = in; + me.idx = x; + + if (me.val < accum->min.val) + accum->min = me; + if (me.val > accum->max.val) + accum->max = me; +} + +static void fMMCombiner(MinAndMax *accum, + const MinAndMax *val) { + fMMAccumulator(accum, val->min.val, val->min.idx); + fMMAccumulator(accum, val->max.val, val->max.idx); +} + +static void fMMOutConverter(int2 *result, + const MinAndMax *val) { + result->x = val->min.idx; + result->y = val->max.idx; +} + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(fz) \ + initializer(fzInit) \ + accumulator(fzAccum) combiner(fzCombine) + +static void fzInit(int *accumIdx) { *accumIdx = -1; } + +static void fzAccum(int *accumIdx, + int inVal, int x /* special arg */) { + if (inVal==0) *accumIdx = x; +} + +static void fzCombine(int *accumIdx, const int *accumIdx2) { + if (*accumIdx2 >= 0) *accumIdx = *accumIdx2; +} + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(fz2) \ + initializer(fz2Init) \ + accumulator(fz2Accum) combiner(fz2Combine) + +static void fz2Init(int2 *accum) { accum->x = accum->y = -1; } + +static void fz2Accum(int2 *accum, + int inVal, + int x /* special arg */, + int y /* special arg */) { + if (inVal==0) { + accum->x = x; + accum->y = y; + } +} + +static void fz2Combine(int2 *accum, const int2 *accum2) { + if (accum2->x >= 0) *accum = *accum2; +} + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(histogram) \ + accumulator(hsgAccum) combiner(hsgCombine) + +#define BUCKETS 256 +typedef uint32_t Histogram[BUCKETS]; + +static void hsgAccum(Histogram *h, uchar in) { ++(*h)[in]; } + +static void hsgCombine(Histogram *accum, const Histogram *addend) { + for (int i = 0; i < BUCKETS; ++i) + (*accum)[i] += (*addend)[i]; +} + +#pragma rs reduce(mode) \ + accumulator(hsgAccum) combiner(hsgCombine) \ + outconverter(modeOutConvert) + +static void modeOutConvert(int2 *result, const Histogram *h) { + uint32_t mode = 0; + for (int i = 1; i < BUCKETS; ++i) + if ((*h)[i] > (*h)[mode]) mode = i; + result->x = mode; + result->y = (*h)[mode]; +}
diff --git a/slang/tests/P_reduce_general_examples/stderr.txt.expect b/slang/tests/P_reduce_general_examples/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_examples/stdout.txt.expect b/slang/tests/P_reduce_general_examples/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_examples_backward/ScriptC_reduce_general_examples_backward.java.expect b/slang/tests/P_reduce_general_examples_backward/ScriptC_reduce_general_examples_backward.java.expect new file mode 100644 index 0000000..50437f3 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_backward/ScriptC_reduce_general_examples_backward.java.expect
@@ -0,0 +1,497 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_examples_backward.rs + */ + +package examples; + +import android.renderscript.*; +import examples.reduce_general_examples_backwardBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_examples_backward extends ScriptC { + private static final String __rs_resource_name = "reduce_general_examples_backward"; + // Constructor + public ScriptC_reduce_general_examples_backward(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_examples_backwardBitCode.getBitCode32(), + reduce_general_examples_backwardBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + __F32 = Element.F32(rs); + __I32_2 = Element.I32_2(rs); + __U32 = Element.U32(rs); + __U8 = Element.U8(rs); + } + + private Element __F32; + private Element __I32; + private Element __I32_2; + private Element __U32; + private Element __U8; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray256_uint { + public long[] get() { + if (!mGotResult) { + int[] outArray = new int[256]; + mOut.copyTo(outArray); + long[] result = new long[256]; + for (int Idx = 0; Idx < 256; ++Idx) { + result[Idx] = ((long) ((outArray[Idx]) & 0xffffffffL)); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray256_uint(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_float { + public float get() { + if (!mGotResult) { + float[] outArray = new float[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_float(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private float mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int2 { + public Int2 get() { + if (!mGotResult) { + int[] outArray = new int[2]; + mOut.copyTo(outArray); + mResult = new Int2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int2 mResult; + } + + private final static int mExportReduceIdx_addint = 0; + // in1 = "val" + public result_int reduce_addint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_addint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_addint(Allocation ain1) { + return reduce_addint(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_addint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_addint, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_mpyint = 1; + // in1 = "val" + public result_int reduce_mpyint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_mpyint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_mpyint(Allocation ain1) { + return reduce_mpyint(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_mpyint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_mpyint, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_dp = 2; + // in1 = "in1" + // in2 = "in2" + public result_float reduce_dp(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_float result = reduce_dp(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float in1" + // ain2 = "float in2" + public result_float reduce_dp(Allocation ain1, Allocation ain2) { + return reduce_dp(ain1, ain2, null); + } + + // ain1 = "float in1" + // ain2 = "float in2" + public result_float reduce_dp(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __F32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_dp, new Allocation[]{ain1, ain2}, aout, sc); + return new result_float(aout); + } + + private final static int mExportReduceIdx_findMinAndMax = 3; + // in1 = "in" + public result_int2 reduce_findMinAndMax(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_findMinAndMax(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int2 reduce_findMinAndMax(Allocation ain1) { + return reduce_findMinAndMax(ain1, null); + } + + // ain1 = "float in" + public result_int2 reduce_findMinAndMax(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_findMinAndMax, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + + private final static int mExportReduceIdx_fz = 4; + // in1 = "inVal" + public result_int reduce_fz(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_fz(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int inVal" + public result_int reduce_fz(Allocation ain1) { + return reduce_fz(ain1, null); + } + + // ain1 = "int inVal" + public result_int reduce_fz(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_fz, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_fz2 = 5; + // in1 = "inVal" + public result_int2 reduce_fz2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_fz2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int inVal" + public result_int2 reduce_fz2(Allocation ain1) { + return reduce_fz2(ain1, null); + } + + // ain1 = "int inVal" + public result_int2 reduce_fz2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_fz2, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + + private final static int mExportReduceIdx_histogram = 6; + // in1 = "in" + public resultArray256_uint reduce_histogram(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray256_uint result = reduce_histogram(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public resultArray256_uint reduce_histogram(Allocation ain1) { + return reduce_histogram(ain1, null); + } + + // ain1 = "uchar in" + public resultArray256_uint reduce_histogram(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32, 256); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_histogram, new Allocation[]{ain1}, aout, sc); + return new resultArray256_uint(aout); + } + + private final static int mExportReduceIdx_mode = 7; + // in1 = "in" + public result_int2 reduce_mode(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_mode(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int2 reduce_mode(Allocation ain1) { + return reduce_mode(ain1, null); + } + + // ain1 = "uchar in" + public result_int2 reduce_mode(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_mode, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_examples_backward/reduce_general_examples_backward.rs b/slang/tests/P_reduce_general_examples_backward/reduce_general_examples_backward.rs new file mode 100644 index 0000000..00d3323 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_backward/reduce_general_examples_backward.rs
@@ -0,0 +1,148 @@ +// -target-api 0 -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(examples) + +// Same as reduce_general_examples.rs, except this test case places +// the pragmas after the functions (backward reference), and the other +// test case places the pragmas before the functions (forward +// reference). + +///////////////////////////////////////////////////////////////////////// + +static void aiAccum(int *accum, int val) { *accum += val; } + +#pragma rs reduce(addint) \ + accumulator(aiAccum) + +///////////////////////////////////////////////////////////////////////// + +static void mpyInit(int *accum) { *accum = 1; } + +static void mpyAccum(int *accum, int val) { *accum *= val; } + +#pragma rs reduce(mpyint) \ + initializer(mpyInit) accumulator(mpyAccum) + +///////////////////////////////////////////////////////////////////////// + +static void dpAccum(float *accum, float in1, float in2) { + *accum += in1*in2; +} + +// combiner function +static void dpSum(float *accum, const float *val) { *accum += *val; } + +#pragma rs reduce(dp) \ + accumulator(dpAccum) combiner(dpSum) + +///////////////////////////////////////////////////////////////////////// + +// this is just a compilation test +#define INFINITY 0.0f + +typedef struct { + float val; + int idx; +} IndexedVal; + +typedef struct { + IndexedVal min, max; +} MinAndMax; + +static void fMMInit(MinAndMax *accum) { + static const MinAndMax r = { { INFINITY, -1 }, { -INFINITY, -1 } }; + *accum = r; +} + +static void fMMAccumulator(MinAndMax *accum, float in, int x) { + IndexedVal me; + me.val = in; + me.idx = x; + + if (me.val < accum->min.val) + accum->min = me; + if (me.val > accum->max.val) + accum->max = me; +} + +static void fMMCombiner(MinAndMax *accum, + const MinAndMax *val) { + fMMAccumulator(accum, val->min.val, val->min.idx); + fMMAccumulator(accum, val->max.val, val->max.idx); +} + +static void fMMOutConverter(int2 *result, + const MinAndMax *val) { + result->x = val->min.idx; + result->y = val->max.idx; +} + +#pragma rs reduce(findMinAndMax) \ + initializer(fMMInit) accumulator(fMMAccumulator) \ + combiner(fMMCombiner) outconverter(fMMOutConverter) + +///////////////////////////////////////////////////////////////////////// + +static void fzInit(int *accumIdx) { *accumIdx = -1; } + +static void fzAccum(int *accumIdx, + int inVal, int x /* special arg */) { + if (inVal==0) *accumIdx = x; +} + +static void fzCombine(int *accumIdx, const int *accumIdx2) { + if (*accumIdx2 >= 0) *accumIdx = *accumIdx2; +} + +#pragma rs reduce(fz) \ + initializer(fzInit) \ + accumulator(fzAccum) combiner(fzCombine) + +///////////////////////////////////////////////////////////////////////// + +static void fz2Init(int2 *accum) { accum->x = accum->y = -1; } + +static void fz2Accum(int2 *accum, + int inVal, + int x /* special arg */, + int y /* special arg */) { + if (inVal==0) { + accum->x = x; + accum->y = y; + } +} + +static void fz2Combine(int2 *accum, const int2 *accum2) { + if (accum2->x >= 0) *accum = *accum2; +} + +#pragma rs reduce(fz2) \ + initializer(fz2Init) \ + accumulator(fz2Accum) combiner(fz2Combine) + +///////////////////////////////////////////////////////////////////////// + +#define BUCKETS 256 +typedef uint32_t Histogram[BUCKETS]; + +static void hsgAccum(Histogram *h, uchar in) { ++(*h)[in]; } + +static void hsgCombine(Histogram *accum, const Histogram *addend) { + for (int i = 0; i < BUCKETS; ++i) + (*accum)[i] += (*addend)[i]; +} + +#pragma rs reduce(histogram) \ + accumulator(hsgAccum) combiner(hsgCombine) + +static void modeOutConvert(int2 *result, const Histogram *h) { + uint32_t mode = 0; + for (int i = 1; i < BUCKETS; ++i) + if ((*h)[i] > (*h)[mode]) mode = i; + result->x = mode; + result->y = (*h)[mode]; +} + +#pragma rs reduce(mode) \ + accumulator(hsgAccum) combiner(hsgCombine) \ + outconverter(modeOutConvert)
diff --git a/slang/tests/P_reduce_general_examples_backward/stderr.txt.expect b/slang/tests/P_reduce_general_examples_backward/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_backward/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_examples_backward/stdout.txt.expect b/slang/tests/P_reduce_general_examples_backward/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_backward/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_examples_explicit/ScriptC_reduce_general_examples_explicit.java.expect b/slang/tests/P_reduce_general_examples_explicit/ScriptC_reduce_general_examples_explicit.java.expect new file mode 100644 index 0000000..013838e --- /dev/null +++ b/slang/tests/P_reduce_general_examples_explicit/ScriptC_reduce_general_examples_explicit.java.expect
@@ -0,0 +1,360 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_examples_explicit.rs + */ + +package examples; + +import android.renderscript.*; +import examples.reduce_general_examples_explicitBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_examples_explicit extends ScriptC { + private static final String __rs_resource_name = "reduce_general_examples_explicit"; + // Constructor + public ScriptC_reduce_general_examples_explicit(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_examples_explicitBitCode.getBitCode32(), + reduce_general_examples_explicitBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + __F32 = Element.F32(rs); + __U32 = Element.U32(rs); + __U8 = Element.U8(rs); + } + + private Element __F32; + private Element __I32; + private Element __U32; + private Element __U8; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray256_uint { + public long[] get() { + if (!mGotResult) { + int[] outArray = new int[256]; + mOut.copyTo(outArray); + long[] result = new long[256]; + for (int Idx = 0; Idx < 256; ++Idx) { + result[Idx] = ((long) ((outArray[Idx]) & 0xffffffffL)); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray256_uint(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_float { + public float get() { + if (!mGotResult) { + float[] outArray = new float[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_float(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private float mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + private final static int mExportReduceIdx_addint_init = 0; + // in1 = "val" + public result_int reduce_addint_init(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_addint_init(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_addint_init(Allocation ain1) { + return reduce_addint_init(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_addint_init(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_addint_init, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_addint_comb = 1; + // in1 = "val" + public result_int reduce_addint_comb(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_addint_comb(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_addint_comb(Allocation ain1) { + return reduce_addint_comb(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_addint_comb(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_addint_comb, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_addint_init_comb = 2; + // in1 = "val" + public result_int reduce_addint_init_comb(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_addint_init_comb(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_addint_init_comb(Allocation ain1) { + return reduce_addint_init_comb(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_addint_init_comb(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_addint_init_comb, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_dp_init = 3; + // in1 = "in1" + // in2 = "in2" + public result_float reduce_dp_init(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_float result = reduce_dp_init(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float in1" + // ain2 = "float in2" + public result_float reduce_dp_init(Allocation ain1, Allocation ain2) { + return reduce_dp_init(ain1, ain2, null); + } + + // ain1 = "float in1" + // ain2 = "float in2" + public result_float reduce_dp_init(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __F32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_dp_init, new Allocation[]{ain1, ain2}, aout, sc); + return new result_float(aout); + } + + private final static int mExportReduceIdx_histogram_init = 4; + // in1 = "in" + public resultArray256_uint reduce_histogram_init(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray256_uint result = reduce_histogram_init(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public resultArray256_uint reduce_histogram_init(Allocation ain1) { + return reduce_histogram_init(ain1, null); + } + + // ain1 = "uchar in" + public resultArray256_uint reduce_histogram_init(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32, 256); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_histogram_init, new Allocation[]{ain1}, aout, sc); + return new resultArray256_uint(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_examples_explicit/reduce_general_examples_explicit.rs b/slang/tests/P_reduce_general_examples_explicit/reduce_general_examples_explicit.rs new file mode 100644 index 0000000..bd76c8e --- /dev/null +++ b/slang/tests/P_reduce_general_examples_explicit/reduce_general_examples_explicit.rs
@@ -0,0 +1,71 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(examples) + +// These are alternative versions of some of the test cases from +// reduce_general_examples.rs, except that this test case contains +// explicit definitions for functions that were omitted from the other +// test case. + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(addint_init) \ + initializer(aiiInit) accumulator(aiiAccum) + +static void aiiInit(int *accum) { *accum = 0; } // unnecessary + +static void aiiAccum(int *accum, int val) { *accum += val; } + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(addint_comb) \ + accumulator(aicAccum) combiner(aicComb) + +static void aicAccum(int *accum, int val) { *accum += val; } + +static void aicComb(int *accum, const int *other) { *accum += *other; } // unnecessary + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(addint_init_comb) \ + initializer(aiicInit) accumulator(aiicAccum) combiner(aiicComb) + +static void aiicInit(int *accum) { *accum = 0; } // unnecessary + +static void aiicAccum(int *accum, int val) { *accum += val; } + +static void aiicComb(int *accum, const int *other) { *accum += *other; } // unnecessary + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(dp_init) \ + initializer(dpiInit) accumulator(dpiAccum) combiner(dpiSum) + +static void dpiInit(float *accum) { *accum = 0.0f; } // unnecessary + +static void dpiAccum(float *accum, float in1, float in2) { + *accum += in1*in2; +} + +// combiner function +static void dpiSum(float *accum, const float *val) { *accum += *val; } + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(histogram_init) \ + initializer(hsgiInit) accumulator(hsgiAccum) combiner(hsgiCombine) + +#define BUCKETS 256 +typedef uint32_t Histogram[BUCKETS]; + +static void hsgiInit(Histogram *h) { + for (int i = 0; i < BUCKETS; ++i) + (*h)[i] = 0; +} + +static void hsgiAccum(Histogram *h, uchar in) { ++(*h)[in]; } + +static void hsgiCombine(Histogram *accum, const Histogram *addend) { + for (int i = 0; i < BUCKETS; ++i) + (*accum)[i] += (*addend)[i]; +}
diff --git a/slang/tests/P_reduce_general_examples_explicit/stderr.txt.expect b/slang/tests/P_reduce_general_examples_explicit/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_explicit/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_examples_explicit/stdout.txt.expect b/slang/tests/P_reduce_general_examples_explicit/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_explicit/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_examples_halter/ScriptC_reduce_general_examples_halter.java.expect b/slang/tests/P_reduce_general_examples_halter/ScriptC_reduce_general_examples_halter.java.expect new file mode 100644 index 0000000..0b2f3da --- /dev/null +++ b/slang/tests/P_reduce_general_examples_halter/ScriptC_reduce_general_examples_halter.java.expect
@@ -0,0 +1,185 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_examples_halter.rs + */ + +package examples; + +import android.renderscript.*; +import examples.reduce_general_examples_halterBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_examples_halter extends ScriptC { + private static final String __rs_resource_name = "reduce_general_examples_halter"; + // Constructor + public ScriptC_reduce_general_examples_halter(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_examples_halterBitCode.getBitCode32(), + reduce_general_examples_halterBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + __I32_2 = Element.I32_2(rs); + } + + private Element __I32; + private Element __I32_2; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int2 { + public Int2 get() { + if (!mGotResult) { + int[] outArray = new int[2]; + mOut.copyTo(outArray); + mResult = new Int2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int2 mResult; + } + + private final static int mExportReduceIdx_fz = 0; + // in1 = "inVal" + public result_int reduce_fz(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_fz(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int inVal" + public result_int reduce_fz(Allocation ain1) { + return reduce_fz(ain1, null); + } + + // ain1 = "int inVal" + public result_int reduce_fz(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_fz, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_fz2 = 1; + // in1 = "inVal" + public result_int2 reduce_fz2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_fz2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int inVal" + public result_int2 reduce_fz2(Allocation ain1) { + return reduce_fz2(ain1, null); + } + + // ain1 = "int inVal" + public result_int2 reduce_fz2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_fz2, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_examples_halter/reduce_general_examples_halter.rs b/slang/tests/P_reduce_general_examples_halter/reduce_general_examples_halter.rs new file mode 100644 index 0000000..8e35fe0 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_halter/reduce_general_examples_halter.rs
@@ -0,0 +1,54 @@ +// -Wall -Werror -target-api 0 +#pragma version(1) +#pragma rs java_package_name(examples) + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(fz) \ + initializer(fzInit) \ + accumulator(fzAccum) combiner(fzCombine) \ + halter(fzFound) + +static void fzInit(int *accumIdx) { *accumIdx = -1; } + +static void fzAccum(int *accumIdx, + int inVal, int x /* special arg */) { + if (inVal==0) *accumIdx = x; +} + +static void fzCombine(int *accumIdx, const int *accumIdx2) { + if (*accumIdx2 >= 0) *accumIdx = *accumIdx2; +} + +// halter function +static bool fzFound(const int *accumIdx) { + return *accumIdx >= 0; +} + +///////////////////////////////////////////////////////////////////////// + +#pragma rs reduce(fz2) \ + initializer(fz2Init) \ + accumulator(fz2Accum) combiner(fz2Combine) \ + halter(fz2Found) + +static void fz2Init(int2 *accum) { accum->x = accum->y = -1; } + +static void fz2Accum(int2 *accum, + int inVal, + int x /* special arg */, + int y /* special arg */) { + if (inVal==0) { + accum->x = x; + accum->y = y; + } +} + +static void fz2Combine(int2 *accum, const int2 *accum2) { + if (accum2->x >= 0) *accum = *accum2; +} + +// halter function +static bool fz2Found(const int2 *accum) { + return accum->x >= 0; +}
diff --git a/slang/tests/P_reduce_general_examples_halter/stderr.txt.expect b/slang/tests/P_reduce_general_examples_halter/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_halter/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_examples_halter/stdout.txt.expect b/slang/tests/P_reduce_general_examples_halter/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_examples_halter/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_input/ScriptC_reduce_general_input.java.expect b/slang/tests/P_reduce_general_input/ScriptC_reduce_general_input.java.expect new file mode 100644 index 0000000..bc151f1 --- /dev/null +++ b/slang/tests/P_reduce_general_input/ScriptC_reduce_general_input.java.expect
@@ -0,0 +1,20517 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_input.rs + */ + +package input; + +import android.renderscript.*; +import input.reduce_general_inputBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_input extends ScriptC { + private static final String __rs_resource_name = "reduce_general_input"; + // Constructor + public ScriptC_reduce_general_input(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_inputBitCode.getBitCode32(), + reduce_general_inputBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + __F16 = Element.F16(rs); + __F16_2 = Element.F16_2(rs); + __F16_4 = Element.F16_4(rs); + __F32 = Element.F32(rs); + __F32_2 = Element.F32_2(rs); + __F32_4 = Element.F32_4(rs); + __F64 = Element.F64(rs); + __F64_2 = Element.F64_2(rs); + __F64_4 = Element.F64_4(rs); + __I8 = Element.I8(rs); + __I8_2 = Element.I8_2(rs); + __I8_4 = Element.I8_4(rs); + __I16 = Element.I16(rs); + __I16_2 = Element.I16_2(rs); + __I16_4 = Element.I16_4(rs); + __I32_2 = Element.I32_2(rs); + __I32_4 = Element.I32_4(rs); + __I64 = Element.I64(rs); + __I64_2 = Element.I64_2(rs); + __I64_4 = Element.I64_4(rs); + __U8 = Element.U8(rs); + __U8_2 = Element.U8_2(rs); + __U8_4 = Element.U8_4(rs); + __U16 = Element.U16(rs); + __U16_2 = Element.U16_2(rs); + __U16_4 = Element.U16_4(rs); + __U32 = Element.U32(rs); + __U32_2 = Element.U32_2(rs); + __U32_4 = Element.U32_4(rs); + __U64 = Element.U64(rs); + __U64_2 = Element.U64_2(rs); + __U64_4 = Element.U64_4(rs); + __BOOLEAN = Element.BOOLEAN(rs); + __ScriptField_MyStruct = ScriptField_MyStruct.createElement(rs); + } + + private Element __BOOLEAN; + private Element __F16; + private Element __F16_2; + private Element __F16_4; + private Element __F32; + private Element __F32_2; + private Element __F32_4; + private Element __F64; + private Element __F64_2; + private Element __F64_4; + private Element __I16; + private Element __I16_2; + private Element __I16_4; + private Element __I32; + private Element __I32_2; + private Element __I32_4; + private Element __I64; + private Element __I64_2; + private Element __I64_4; + private Element __I8; + private Element __I8_2; + private Element __I8_4; + private Element __ScriptField_MyStruct; + private Element __U16; + private Element __U16_2; + private Element __U16_4; + private Element __U32; + private Element __U32_2; + private Element __U32_4; + private Element __U64; + private Element __U64_2; + private Element __U64_4; + private Element __U8; + private Element __U8_2; + private Element __U8_4; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + private final static int mExportReduceIdx_my_half_0 = 0; + // in1 = "in" + public result_int reduce_my_half_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_0(Allocation ain1) { + return reduce_my_half_0(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_1 = 1; + // in1 = "in" + public result_int reduce_my_half_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_1(Allocation ain1) { + return reduce_my_half_1(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_2 = 2; + // in1 = "in" + public result_int reduce_my_half_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_2(Allocation ain1) { + return reduce_my_half_2(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_3 = 3; + // in1 = "in" + public result_int reduce_my_half_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_3(Allocation ain1) { + return reduce_my_half_3(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_4 = 4; + // in1 = "in" + public result_int reduce_my_half_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_4(Allocation ain1) { + return reduce_my_half_4(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_5 = 5; + // in1 = "in" + public result_int reduce_my_half_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_5(Allocation ain1) { + return reduce_my_half_5(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_6 = 6; + // in1 = "in" + public result_int reduce_my_half_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_6(Allocation ain1) { + return reduce_my_half_6(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_7 = 7; + // in1 = "in" + public result_int reduce_my_half_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_7(Allocation ain1) { + return reduce_my_half_7(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_8 = 8; + // in1 = "in" + public result_int reduce_my_half_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_8(Allocation ain1) { + return reduce_my_half_8(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_9 = 9; + // in1 = "in" + public result_int reduce_my_half_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_9(Allocation ain1) { + return reduce_my_half_9(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_10 = 10; + // in1 = "in" + public result_int reduce_my_half_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_10(Allocation ain1) { + return reduce_my_half_10(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_11 = 11; + // in1 = "in" + public result_int reduce_my_half_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_11(Allocation ain1) { + return reduce_my_half_11(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_12 = 12; + // in1 = "in" + public result_int reduce_my_half_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_12(Allocation ain1) { + return reduce_my_half_12(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_13 = 13; + // in1 = "in" + public result_int reduce_my_half_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_13(Allocation ain1) { + return reduce_my_half_13(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_14 = 14; + // in1 = "in" + public result_int reduce_my_half_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_14(Allocation ain1) { + return reduce_my_half_14(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_15 = 15; + // in1 = "in" + public result_int reduce_my_half_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half in" + public result_int reduce_my_half_15(Allocation ain1) { + return reduce_my_half_15(ain1, null); + } + + // ain1 = "half in" + public result_int reduce_my_half_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_0 = 16; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_0(Allocation ain1) { + return reduce_my_half2_0(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_1 = 17; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_1(Allocation ain1) { + return reduce_my_half2_1(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_2 = 18; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_2(Allocation ain1) { + return reduce_my_half2_2(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_3 = 19; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_3(Allocation ain1) { + return reduce_my_half2_3(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_4 = 20; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_4(Allocation ain1) { + return reduce_my_half2_4(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_5 = 21; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_5(Allocation ain1) { + return reduce_my_half2_5(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_6 = 22; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_6(Allocation ain1) { + return reduce_my_half2_6(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_7 = 23; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_7(Allocation ain1) { + return reduce_my_half2_7(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_8 = 24; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_8(Allocation ain1) { + return reduce_my_half2_8(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_9 = 25; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_9(Allocation ain1) { + return reduce_my_half2_9(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_10 = 26; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_10(Allocation ain1) { + return reduce_my_half2_10(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_11 = 27; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_11(Allocation ain1) { + return reduce_my_half2_11(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_12 = 28; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_12(Allocation ain1) { + return reduce_my_half2_12(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_13 = 29; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_13(Allocation ain1) { + return reduce_my_half2_13(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_14 = 30; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_14(Allocation ain1) { + return reduce_my_half2_14(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_15 = 31; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_half2_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_15(Allocation ain1) { + return reduce_my_half2_15(ain1, null); + } + + // ain1 = "half2 in" + public result_int reduce_my_half2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_0 = 32; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_0(Allocation ain1) { + return reduce_my_half4_0(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_1 = 33; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_1(Allocation ain1) { + return reduce_my_half4_1(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_2 = 34; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_2(Allocation ain1) { + return reduce_my_half4_2(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_3 = 35; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_3(Allocation ain1) { + return reduce_my_half4_3(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_4 = 36; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_4(Allocation ain1) { + return reduce_my_half4_4(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_5 = 37; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_5(Allocation ain1) { + return reduce_my_half4_5(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_6 = 38; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_6(Allocation ain1) { + return reduce_my_half4_6(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_7 = 39; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_7(Allocation ain1) { + return reduce_my_half4_7(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_8 = 40; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_8(Allocation ain1) { + return reduce_my_half4_8(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_9 = 41; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_9(Allocation ain1) { + return reduce_my_half4_9(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_10 = 42; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_10(Allocation ain1) { + return reduce_my_half4_10(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_11 = 43; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_11(Allocation ain1) { + return reduce_my_half4_11(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_12 = 44; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_12(Allocation ain1) { + return reduce_my_half4_12(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_13 = 45; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_13(Allocation ain1) { + return reduce_my_half4_13(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_14 = 46; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_14(Allocation ain1) { + return reduce_my_half4_14(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_15 = 47; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_half4_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_half4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_15(Allocation ain1) { + return reduce_my_half4_15(ain1, null); + } + + // ain1 = "half4 in" + public result_int reduce_my_half4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_0 = 48; + // in1 = "in" + public result_int reduce_my_float_0(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_0(Allocation ain1) { + return reduce_my_float_0(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_1 = 49; + // in1 = "in" + public result_int reduce_my_float_1(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_1(Allocation ain1) { + return reduce_my_float_1(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_2 = 50; + // in1 = "in" + public result_int reduce_my_float_2(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_2(Allocation ain1) { + return reduce_my_float_2(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_3 = 51; + // in1 = "in" + public result_int reduce_my_float_3(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_3(Allocation ain1) { + return reduce_my_float_3(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_4 = 52; + // in1 = "in" + public result_int reduce_my_float_4(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_4(Allocation ain1) { + return reduce_my_float_4(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_5 = 53; + // in1 = "in" + public result_int reduce_my_float_5(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_5(Allocation ain1) { + return reduce_my_float_5(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_6 = 54; + // in1 = "in" + public result_int reduce_my_float_6(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_6(Allocation ain1) { + return reduce_my_float_6(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_7 = 55; + // in1 = "in" + public result_int reduce_my_float_7(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_7(Allocation ain1) { + return reduce_my_float_7(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_8 = 56; + // in1 = "in" + public result_int reduce_my_float_8(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_8(Allocation ain1) { + return reduce_my_float_8(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_9 = 57; + // in1 = "in" + public result_int reduce_my_float_9(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_9(Allocation ain1) { + return reduce_my_float_9(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_10 = 58; + // in1 = "in" + public result_int reduce_my_float_10(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_10(Allocation ain1) { + return reduce_my_float_10(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_11 = 59; + // in1 = "in" + public result_int reduce_my_float_11(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_11(Allocation ain1) { + return reduce_my_float_11(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_12 = 60; + // in1 = "in" + public result_int reduce_my_float_12(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_12(Allocation ain1) { + return reduce_my_float_12(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_13 = 61; + // in1 = "in" + public result_int reduce_my_float_13(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_13(Allocation ain1) { + return reduce_my_float_13(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_14 = 62; + // in1 = "in" + public result_int reduce_my_float_14(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_14(Allocation ain1) { + return reduce_my_float_14(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_15 = 63; + // in1 = "in" + public result_int reduce_my_float_15(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float in" + public result_int reduce_my_float_15(Allocation ain1) { + return reduce_my_float_15(ain1, null); + } + + // ain1 = "float in" + public result_int reduce_my_float_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_0 = 64; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_0(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_0(Allocation ain1) { + return reduce_my_float2_0(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_1 = 65; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_1(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_1(Allocation ain1) { + return reduce_my_float2_1(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_2 = 66; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_2(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_2(Allocation ain1) { + return reduce_my_float2_2(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_3 = 67; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_3(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_3(Allocation ain1) { + return reduce_my_float2_3(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_4 = 68; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_4(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_4(Allocation ain1) { + return reduce_my_float2_4(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_5 = 69; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_5(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_5(Allocation ain1) { + return reduce_my_float2_5(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_6 = 70; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_6(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_6(Allocation ain1) { + return reduce_my_float2_6(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_7 = 71; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_7(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_7(Allocation ain1) { + return reduce_my_float2_7(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_8 = 72; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_8(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_8(Allocation ain1) { + return reduce_my_float2_8(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_9 = 73; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_9(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_9(Allocation ain1) { + return reduce_my_float2_9(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_10 = 74; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_10(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_10(Allocation ain1) { + return reduce_my_float2_10(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_11 = 75; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_11(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_11(Allocation ain1) { + return reduce_my_float2_11(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_12 = 76; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_12(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_12(Allocation ain1) { + return reduce_my_float2_12(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_13 = 77; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_13(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_13(Allocation ain1) { + return reduce_my_float2_13(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_14 = 78; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_14(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_14(Allocation ain1) { + return reduce_my_float2_14(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_15 = 79; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_float2_15(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_15(Allocation ain1) { + return reduce_my_float2_15(ain1, null); + } + + // ain1 = "float2 in" + public result_int reduce_my_float2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_0 = 80; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_0(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_0(Allocation ain1) { + return reduce_my_float4_0(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_1 = 81; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_1(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_1(Allocation ain1) { + return reduce_my_float4_1(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_2 = 82; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_2(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_2(Allocation ain1) { + return reduce_my_float4_2(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_3 = 83; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_3(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_3(Allocation ain1) { + return reduce_my_float4_3(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_4 = 84; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_4(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_4(Allocation ain1) { + return reduce_my_float4_4(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_5 = 85; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_5(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_5(Allocation ain1) { + return reduce_my_float4_5(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_6 = 86; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_6(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_6(Allocation ain1) { + return reduce_my_float4_6(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_7 = 87; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_7(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_7(Allocation ain1) { + return reduce_my_float4_7(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_8 = 88; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_8(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_8(Allocation ain1) { + return reduce_my_float4_8(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_9 = 89; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_9(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_9(Allocation ain1) { + return reduce_my_float4_9(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_10 = 90; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_10(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_10(Allocation ain1) { + return reduce_my_float4_10(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_11 = 91; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_11(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_11(Allocation ain1) { + return reduce_my_float4_11(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_12 = 92; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_12(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_12(Allocation ain1) { + return reduce_my_float4_12(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_13 = 93; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_13(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_13(Allocation ain1) { + return reduce_my_float4_13(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_14 = 94; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_14(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_14(Allocation ain1) { + return reduce_my_float4_14(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_15 = 95; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_float4_15(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_float4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_15(Allocation ain1) { + return reduce_my_float4_15(ain1, null); + } + + // ain1 = "float4 in" + public result_int reduce_my_float4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_0 = 96; + // in1 = "in" + public result_int reduce_my_double_0(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_0(Allocation ain1) { + return reduce_my_double_0(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_1 = 97; + // in1 = "in" + public result_int reduce_my_double_1(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_1(Allocation ain1) { + return reduce_my_double_1(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_2 = 98; + // in1 = "in" + public result_int reduce_my_double_2(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_2(Allocation ain1) { + return reduce_my_double_2(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_3 = 99; + // in1 = "in" + public result_int reduce_my_double_3(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_3(Allocation ain1) { + return reduce_my_double_3(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_4 = 100; + // in1 = "in" + public result_int reduce_my_double_4(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_4(Allocation ain1) { + return reduce_my_double_4(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_5 = 101; + // in1 = "in" + public result_int reduce_my_double_5(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_5(Allocation ain1) { + return reduce_my_double_5(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_6 = 102; + // in1 = "in" + public result_int reduce_my_double_6(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_6(Allocation ain1) { + return reduce_my_double_6(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_7 = 103; + // in1 = "in" + public result_int reduce_my_double_7(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_7(Allocation ain1) { + return reduce_my_double_7(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_8 = 104; + // in1 = "in" + public result_int reduce_my_double_8(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_8(Allocation ain1) { + return reduce_my_double_8(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_9 = 105; + // in1 = "in" + public result_int reduce_my_double_9(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_9(Allocation ain1) { + return reduce_my_double_9(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_10 = 106; + // in1 = "in" + public result_int reduce_my_double_10(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_10(Allocation ain1) { + return reduce_my_double_10(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_11 = 107; + // in1 = "in" + public result_int reduce_my_double_11(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_11(Allocation ain1) { + return reduce_my_double_11(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_12 = 108; + // in1 = "in" + public result_int reduce_my_double_12(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_12(Allocation ain1) { + return reduce_my_double_12(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_13 = 109; + // in1 = "in" + public result_int reduce_my_double_13(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_13(Allocation ain1) { + return reduce_my_double_13(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_14 = 110; + // in1 = "in" + public result_int reduce_my_double_14(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_14(Allocation ain1) { + return reduce_my_double_14(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double_15 = 111; + // in1 = "in" + public result_int reduce_my_double_15(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double in" + public result_int reduce_my_double_15(Allocation ain1) { + return reduce_my_double_15(ain1, null); + } + + // ain1 = "double in" + public result_int reduce_my_double_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_0 = 112; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_0(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_0(Allocation ain1) { + return reduce_my_double2_0(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_1 = 113; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_1(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_1(Allocation ain1) { + return reduce_my_double2_1(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_2 = 114; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_2(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_2(Allocation ain1) { + return reduce_my_double2_2(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_3 = 115; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_3(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_3(Allocation ain1) { + return reduce_my_double2_3(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_4 = 116; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_4(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_4(Allocation ain1) { + return reduce_my_double2_4(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_5 = 117; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_5(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_5(Allocation ain1) { + return reduce_my_double2_5(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_6 = 118; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_6(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_6(Allocation ain1) { + return reduce_my_double2_6(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_7 = 119; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_7(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_7(Allocation ain1) { + return reduce_my_double2_7(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_8 = 120; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_8(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_8(Allocation ain1) { + return reduce_my_double2_8(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_9 = 121; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_9(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_9(Allocation ain1) { + return reduce_my_double2_9(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_10 = 122; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_10(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_10(Allocation ain1) { + return reduce_my_double2_10(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_11 = 123; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_11(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_11(Allocation ain1) { + return reduce_my_double2_11(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_12 = 124; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_12(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_12(Allocation ain1) { + return reduce_my_double2_12(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_13 = 125; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_13(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_13(Allocation ain1) { + return reduce_my_double2_13(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_14 = 126; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_14(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_14(Allocation ain1) { + return reduce_my_double2_14(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double2_15 = 127; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_double2_15(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_15(Allocation ain1) { + return reduce_my_double2_15(ain1, null); + } + + // ain1 = "double2 in" + public result_int reduce_my_double2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_0 = 128; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_0(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_0(Allocation ain1) { + return reduce_my_double4_0(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_1 = 129; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_1(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_1(Allocation ain1) { + return reduce_my_double4_1(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_2 = 130; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_2(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_2(Allocation ain1) { + return reduce_my_double4_2(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_3 = 131; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_3(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_3(Allocation ain1) { + return reduce_my_double4_3(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_4 = 132; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_4(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_4(Allocation ain1) { + return reduce_my_double4_4(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_5 = 133; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_5(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_5(Allocation ain1) { + return reduce_my_double4_5(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_6 = 134; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_6(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_6(Allocation ain1) { + return reduce_my_double4_6(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_7 = 135; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_7(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_7(Allocation ain1) { + return reduce_my_double4_7(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_8 = 136; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_8(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_8(Allocation ain1) { + return reduce_my_double4_8(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_9 = 137; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_9(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_9(Allocation ain1) { + return reduce_my_double4_9(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_10 = 138; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_10(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_10(Allocation ain1) { + return reduce_my_double4_10(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_11 = 139; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_11(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_11(Allocation ain1) { + return reduce_my_double4_11(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_12 = 140; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_12(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_12(Allocation ain1) { + return reduce_my_double4_12(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_13 = 141; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_13(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_13(Allocation ain1) { + return reduce_my_double4_13(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_14 = 142; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_14(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_14(Allocation ain1) { + return reduce_my_double4_14(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_double4_15 = 143; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_double4_15(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_double4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_15(Allocation ain1) { + return reduce_my_double4_15(ain1, null); + } + + // ain1 = "double4 in" + public result_int reduce_my_double4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_0 = 144; + // in1 = "in" + public result_int reduce_my_char_0(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_0(Allocation ain1) { + return reduce_my_char_0(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_1 = 145; + // in1 = "in" + public result_int reduce_my_char_1(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_1(Allocation ain1) { + return reduce_my_char_1(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_2 = 146; + // in1 = "in" + public result_int reduce_my_char_2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_2(Allocation ain1) { + return reduce_my_char_2(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_3 = 147; + // in1 = "in" + public result_int reduce_my_char_3(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_3(Allocation ain1) { + return reduce_my_char_3(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_4 = 148; + // in1 = "in" + public result_int reduce_my_char_4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_4(Allocation ain1) { + return reduce_my_char_4(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_5 = 149; + // in1 = "in" + public result_int reduce_my_char_5(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_5(Allocation ain1) { + return reduce_my_char_5(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_6 = 150; + // in1 = "in" + public result_int reduce_my_char_6(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_6(Allocation ain1) { + return reduce_my_char_6(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_7 = 151; + // in1 = "in" + public result_int reduce_my_char_7(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_7(Allocation ain1) { + return reduce_my_char_7(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_8 = 152; + // in1 = "in" + public result_int reduce_my_char_8(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_8(Allocation ain1) { + return reduce_my_char_8(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_9 = 153; + // in1 = "in" + public result_int reduce_my_char_9(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_9(Allocation ain1) { + return reduce_my_char_9(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_10 = 154; + // in1 = "in" + public result_int reduce_my_char_10(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_10(Allocation ain1) { + return reduce_my_char_10(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_11 = 155; + // in1 = "in" + public result_int reduce_my_char_11(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_11(Allocation ain1) { + return reduce_my_char_11(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_12 = 156; + // in1 = "in" + public result_int reduce_my_char_12(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_12(Allocation ain1) { + return reduce_my_char_12(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_13 = 157; + // in1 = "in" + public result_int reduce_my_char_13(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_13(Allocation ain1) { + return reduce_my_char_13(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_14 = 158; + // in1 = "in" + public result_int reduce_my_char_14(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_14(Allocation ain1) { + return reduce_my_char_14(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_15 = 159; + // in1 = "in" + public result_int reduce_my_char_15(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char in" + public result_int reduce_my_char_15(Allocation ain1) { + return reduce_my_char_15(ain1, null); + } + + // ain1 = "char in" + public result_int reduce_my_char_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_0 = 160; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_0(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_0(Allocation ain1) { + return reduce_my_char2_0(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_1 = 161; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_1(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_1(Allocation ain1) { + return reduce_my_char2_1(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_2 = 162; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_2(Allocation ain1) { + return reduce_my_char2_2(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_3 = 163; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_3(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_3(Allocation ain1) { + return reduce_my_char2_3(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_4 = 164; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_4(Allocation ain1) { + return reduce_my_char2_4(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_5 = 165; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_5(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_5(Allocation ain1) { + return reduce_my_char2_5(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_6 = 166; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_6(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_6(Allocation ain1) { + return reduce_my_char2_6(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_7 = 167; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_7(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_7(Allocation ain1) { + return reduce_my_char2_7(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_8 = 168; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_8(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_8(Allocation ain1) { + return reduce_my_char2_8(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_9 = 169; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_9(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_9(Allocation ain1) { + return reduce_my_char2_9(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_10 = 170; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_10(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_10(Allocation ain1) { + return reduce_my_char2_10(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_11 = 171; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_11(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_11(Allocation ain1) { + return reduce_my_char2_11(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_12 = 172; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_12(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_12(Allocation ain1) { + return reduce_my_char2_12(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_13 = 173; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_13(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_13(Allocation ain1) { + return reduce_my_char2_13(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_14 = 174; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_14(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_14(Allocation ain1) { + return reduce_my_char2_14(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_15 = 175; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_char2_15(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_15(Allocation ain1) { + return reduce_my_char2_15(ain1, null); + } + + // ain1 = "char2 in" + public result_int reduce_my_char2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_0 = 176; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_0(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_0(Allocation ain1) { + return reduce_my_char4_0(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_1 = 177; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_1(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_1(Allocation ain1) { + return reduce_my_char4_1(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_2 = 178; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_2(Allocation ain1) { + return reduce_my_char4_2(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_3 = 179; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_3(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_3(Allocation ain1) { + return reduce_my_char4_3(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_4 = 180; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_4(Allocation ain1) { + return reduce_my_char4_4(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_5 = 181; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_5(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_5(Allocation ain1) { + return reduce_my_char4_5(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_6 = 182; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_6(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_6(Allocation ain1) { + return reduce_my_char4_6(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_7 = 183; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_7(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_7(Allocation ain1) { + return reduce_my_char4_7(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_8 = 184; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_8(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_8(Allocation ain1) { + return reduce_my_char4_8(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_9 = 185; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_9(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_9(Allocation ain1) { + return reduce_my_char4_9(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_10 = 186; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_10(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_10(Allocation ain1) { + return reduce_my_char4_10(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_11 = 187; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_11(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_11(Allocation ain1) { + return reduce_my_char4_11(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_12 = 188; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_12(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_12(Allocation ain1) { + return reduce_my_char4_12(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_13 = 189; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_13(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_13(Allocation ain1) { + return reduce_my_char4_13(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_14 = 190; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_14(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_14(Allocation ain1) { + return reduce_my_char4_14(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_15 = 191; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_char4_15(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_char4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_15(Allocation ain1) { + return reduce_my_char4_15(ain1, null); + } + + // ain1 = "char4 in" + public result_int reduce_my_char4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_0 = 192; + // in1 = "in" + public result_int reduce_my_short_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_0(Allocation ain1) { + return reduce_my_short_0(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_1 = 193; + // in1 = "in" + public result_int reduce_my_short_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_1(Allocation ain1) { + return reduce_my_short_1(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_2 = 194; + // in1 = "in" + public result_int reduce_my_short_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_2(Allocation ain1) { + return reduce_my_short_2(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_3 = 195; + // in1 = "in" + public result_int reduce_my_short_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_3(Allocation ain1) { + return reduce_my_short_3(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_4 = 196; + // in1 = "in" + public result_int reduce_my_short_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_4(Allocation ain1) { + return reduce_my_short_4(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_5 = 197; + // in1 = "in" + public result_int reduce_my_short_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_5(Allocation ain1) { + return reduce_my_short_5(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_6 = 198; + // in1 = "in" + public result_int reduce_my_short_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_6(Allocation ain1) { + return reduce_my_short_6(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_7 = 199; + // in1 = "in" + public result_int reduce_my_short_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_7(Allocation ain1) { + return reduce_my_short_7(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_8 = 200; + // in1 = "in" + public result_int reduce_my_short_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_8(Allocation ain1) { + return reduce_my_short_8(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_9 = 201; + // in1 = "in" + public result_int reduce_my_short_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_9(Allocation ain1) { + return reduce_my_short_9(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_10 = 202; + // in1 = "in" + public result_int reduce_my_short_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_10(Allocation ain1) { + return reduce_my_short_10(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_11 = 203; + // in1 = "in" + public result_int reduce_my_short_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_11(Allocation ain1) { + return reduce_my_short_11(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_12 = 204; + // in1 = "in" + public result_int reduce_my_short_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_12(Allocation ain1) { + return reduce_my_short_12(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_13 = 205; + // in1 = "in" + public result_int reduce_my_short_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_13(Allocation ain1) { + return reduce_my_short_13(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_14 = 206; + // in1 = "in" + public result_int reduce_my_short_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_14(Allocation ain1) { + return reduce_my_short_14(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_15 = 207; + // in1 = "in" + public result_int reduce_my_short_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short in" + public result_int reduce_my_short_15(Allocation ain1) { + return reduce_my_short_15(ain1, null); + } + + // ain1 = "short in" + public result_int reduce_my_short_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_0 = 208; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_0(Allocation ain1) { + return reduce_my_short2_0(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_1 = 209; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_1(Allocation ain1) { + return reduce_my_short2_1(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_2 = 210; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_2(Allocation ain1) { + return reduce_my_short2_2(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_3 = 211; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_3(Allocation ain1) { + return reduce_my_short2_3(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_4 = 212; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_4(Allocation ain1) { + return reduce_my_short2_4(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_5 = 213; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_5(Allocation ain1) { + return reduce_my_short2_5(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_6 = 214; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_6(Allocation ain1) { + return reduce_my_short2_6(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_7 = 215; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_7(Allocation ain1) { + return reduce_my_short2_7(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_8 = 216; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_8(Allocation ain1) { + return reduce_my_short2_8(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_9 = 217; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_9(Allocation ain1) { + return reduce_my_short2_9(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_10 = 218; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_10(Allocation ain1) { + return reduce_my_short2_10(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_11 = 219; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_11(Allocation ain1) { + return reduce_my_short2_11(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_12 = 220; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_12(Allocation ain1) { + return reduce_my_short2_12(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_13 = 221; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_13(Allocation ain1) { + return reduce_my_short2_13(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_14 = 222; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_14(Allocation ain1) { + return reduce_my_short2_14(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_15 = 223; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_short2_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_15(Allocation ain1) { + return reduce_my_short2_15(ain1, null); + } + + // ain1 = "short2 in" + public result_int reduce_my_short2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_0 = 224; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_0(Allocation ain1) { + return reduce_my_short4_0(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_1 = 225; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_1(Allocation ain1) { + return reduce_my_short4_1(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_2 = 226; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_2(Allocation ain1) { + return reduce_my_short4_2(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_3 = 227; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_3(Allocation ain1) { + return reduce_my_short4_3(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_4 = 228; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_4(Allocation ain1) { + return reduce_my_short4_4(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_5 = 229; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_5(Allocation ain1) { + return reduce_my_short4_5(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_6 = 230; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_6(Allocation ain1) { + return reduce_my_short4_6(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_7 = 231; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_7(Allocation ain1) { + return reduce_my_short4_7(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_8 = 232; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_8(Allocation ain1) { + return reduce_my_short4_8(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_9 = 233; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_9(Allocation ain1) { + return reduce_my_short4_9(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_10 = 234; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_10(Allocation ain1) { + return reduce_my_short4_10(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_11 = 235; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_11(Allocation ain1) { + return reduce_my_short4_11(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_12 = 236; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_12(Allocation ain1) { + return reduce_my_short4_12(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_13 = 237; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_13(Allocation ain1) { + return reduce_my_short4_13(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_14 = 238; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_14(Allocation ain1) { + return reduce_my_short4_14(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_15 = 239; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_short4_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_short4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_15(Allocation ain1) { + return reduce_my_short4_15(ain1, null); + } + + // ain1 = "short4 in" + public result_int reduce_my_short4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_0 = 240; + // in1 = "in" + public result_int reduce_my_int_0(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_0(Allocation ain1) { + return reduce_my_int_0(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_1 = 241; + // in1 = "in" + public result_int reduce_my_int_1(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_1(Allocation ain1) { + return reduce_my_int_1(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_2 = 242; + // in1 = "in" + public result_int reduce_my_int_2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_2(Allocation ain1) { + return reduce_my_int_2(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_3 = 243; + // in1 = "in" + public result_int reduce_my_int_3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_3(Allocation ain1) { + return reduce_my_int_3(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_4 = 244; + // in1 = "in" + public result_int reduce_my_int_4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_4(Allocation ain1) { + return reduce_my_int_4(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_5 = 245; + // in1 = "in" + public result_int reduce_my_int_5(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_5(Allocation ain1) { + return reduce_my_int_5(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_6 = 246; + // in1 = "in" + public result_int reduce_my_int_6(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_6(Allocation ain1) { + return reduce_my_int_6(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_7 = 247; + // in1 = "in" + public result_int reduce_my_int_7(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_7(Allocation ain1) { + return reduce_my_int_7(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_8 = 248; + // in1 = "in" + public result_int reduce_my_int_8(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_8(Allocation ain1) { + return reduce_my_int_8(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_9 = 249; + // in1 = "in" + public result_int reduce_my_int_9(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_9(Allocation ain1) { + return reduce_my_int_9(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_10 = 250; + // in1 = "in" + public result_int reduce_my_int_10(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_10(Allocation ain1) { + return reduce_my_int_10(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_11 = 251; + // in1 = "in" + public result_int reduce_my_int_11(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_11(Allocation ain1) { + return reduce_my_int_11(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_12 = 252; + // in1 = "in" + public result_int reduce_my_int_12(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_12(Allocation ain1) { + return reduce_my_int_12(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_13 = 253; + // in1 = "in" + public result_int reduce_my_int_13(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_13(Allocation ain1) { + return reduce_my_int_13(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_14 = 254; + // in1 = "in" + public result_int reduce_my_int_14(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_14(Allocation ain1) { + return reduce_my_int_14(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int_15 = 255; + // in1 = "in" + public result_int reduce_my_int_15(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int in" + public result_int reduce_my_int_15(Allocation ain1) { + return reduce_my_int_15(ain1, null); + } + + // ain1 = "int in" + public result_int reduce_my_int_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_0 = 256; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_0(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_0(Allocation ain1) { + return reduce_my_int2_0(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_1 = 257; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_1(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_1(Allocation ain1) { + return reduce_my_int2_1(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_2 = 258; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_2(Allocation ain1) { + return reduce_my_int2_2(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_3 = 259; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_3(Allocation ain1) { + return reduce_my_int2_3(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_4 = 260; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_4(Allocation ain1) { + return reduce_my_int2_4(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_5 = 261; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_5(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_5(Allocation ain1) { + return reduce_my_int2_5(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_6 = 262; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_6(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_6(Allocation ain1) { + return reduce_my_int2_6(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_7 = 263; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_7(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_7(Allocation ain1) { + return reduce_my_int2_7(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_8 = 264; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_8(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_8(Allocation ain1) { + return reduce_my_int2_8(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_9 = 265; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_9(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_9(Allocation ain1) { + return reduce_my_int2_9(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_10 = 266; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_10(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_10(Allocation ain1) { + return reduce_my_int2_10(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_11 = 267; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_11(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_11(Allocation ain1) { + return reduce_my_int2_11(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_12 = 268; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_12(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_12(Allocation ain1) { + return reduce_my_int2_12(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_13 = 269; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_13(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_13(Allocation ain1) { + return reduce_my_int2_13(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_14 = 270; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_14(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_14(Allocation ain1) { + return reduce_my_int2_14(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2_15 = 271; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_int2_15(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_15(Allocation ain1) { + return reduce_my_int2_15(ain1, null); + } + + // ain1 = "int2 in" + public result_int reduce_my_int2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_0 = 272; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_0(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_0(Allocation ain1) { + return reduce_my_int4_0(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_1 = 273; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_1(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_1(Allocation ain1) { + return reduce_my_int4_1(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_2 = 274; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_2(Allocation ain1) { + return reduce_my_int4_2(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_3 = 275; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_3(Allocation ain1) { + return reduce_my_int4_3(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_4 = 276; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_4(Allocation ain1) { + return reduce_my_int4_4(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_5 = 277; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_5(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_5(Allocation ain1) { + return reduce_my_int4_5(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_6 = 278; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_6(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_6(Allocation ain1) { + return reduce_my_int4_6(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_7 = 279; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_7(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_7(Allocation ain1) { + return reduce_my_int4_7(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_8 = 280; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_8(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_8(Allocation ain1) { + return reduce_my_int4_8(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_9 = 281; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_9(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_9(Allocation ain1) { + return reduce_my_int4_9(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_10 = 282; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_10(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_10(Allocation ain1) { + return reduce_my_int4_10(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_11 = 283; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_11(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_11(Allocation ain1) { + return reduce_my_int4_11(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_12 = 284; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_12(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_12(Allocation ain1) { + return reduce_my_int4_12(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_13 = 285; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_13(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_13(Allocation ain1) { + return reduce_my_int4_13(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_14 = 286; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_14(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_14(Allocation ain1) { + return reduce_my_int4_14(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int4_15 = 287; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_int4_15(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_15(Allocation ain1) { + return reduce_my_int4_15(ain1, null); + } + + // ain1 = "int4 in" + public result_int reduce_my_int4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_0 = 288; + // in1 = "in" + public result_int reduce_my_long_0(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_0(Allocation ain1) { + return reduce_my_long_0(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_1 = 289; + // in1 = "in" + public result_int reduce_my_long_1(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_1(Allocation ain1) { + return reduce_my_long_1(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_2 = 290; + // in1 = "in" + public result_int reduce_my_long_2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_2(Allocation ain1) { + return reduce_my_long_2(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_3 = 291; + // in1 = "in" + public result_int reduce_my_long_3(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_3(Allocation ain1) { + return reduce_my_long_3(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_4 = 292; + // in1 = "in" + public result_int reduce_my_long_4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_4(Allocation ain1) { + return reduce_my_long_4(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_5 = 293; + // in1 = "in" + public result_int reduce_my_long_5(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_5(Allocation ain1) { + return reduce_my_long_5(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_6 = 294; + // in1 = "in" + public result_int reduce_my_long_6(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_6(Allocation ain1) { + return reduce_my_long_6(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_7 = 295; + // in1 = "in" + public result_int reduce_my_long_7(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_7(Allocation ain1) { + return reduce_my_long_7(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_8 = 296; + // in1 = "in" + public result_int reduce_my_long_8(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_8(Allocation ain1) { + return reduce_my_long_8(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_9 = 297; + // in1 = "in" + public result_int reduce_my_long_9(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_9(Allocation ain1) { + return reduce_my_long_9(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_10 = 298; + // in1 = "in" + public result_int reduce_my_long_10(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_10(Allocation ain1) { + return reduce_my_long_10(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_11 = 299; + // in1 = "in" + public result_int reduce_my_long_11(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_11(Allocation ain1) { + return reduce_my_long_11(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_12 = 300; + // in1 = "in" + public result_int reduce_my_long_12(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_12(Allocation ain1) { + return reduce_my_long_12(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_13 = 301; + // in1 = "in" + public result_int reduce_my_long_13(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_13(Allocation ain1) { + return reduce_my_long_13(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_14 = 302; + // in1 = "in" + public result_int reduce_my_long_14(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_14(Allocation ain1) { + return reduce_my_long_14(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long_15 = 303; + // in1 = "in" + public result_int reduce_my_long_15(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long in" + public result_int reduce_my_long_15(Allocation ain1) { + return reduce_my_long_15(ain1, null); + } + + // ain1 = "long in" + public result_int reduce_my_long_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_0 = 304; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_0(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_0(Allocation ain1) { + return reduce_my_long2_0(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_1 = 305; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_1(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_1(Allocation ain1) { + return reduce_my_long2_1(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_2 = 306; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_2(Allocation ain1) { + return reduce_my_long2_2(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_3 = 307; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_3(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_3(Allocation ain1) { + return reduce_my_long2_3(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_4 = 308; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_4(Allocation ain1) { + return reduce_my_long2_4(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_5 = 309; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_5(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_5(Allocation ain1) { + return reduce_my_long2_5(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_6 = 310; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_6(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_6(Allocation ain1) { + return reduce_my_long2_6(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_7 = 311; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_7(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_7(Allocation ain1) { + return reduce_my_long2_7(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_8 = 312; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_8(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_8(Allocation ain1) { + return reduce_my_long2_8(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_9 = 313; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_9(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_9(Allocation ain1) { + return reduce_my_long2_9(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_10 = 314; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_10(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_10(Allocation ain1) { + return reduce_my_long2_10(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_11 = 315; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_11(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_11(Allocation ain1) { + return reduce_my_long2_11(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_12 = 316; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_12(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_12(Allocation ain1) { + return reduce_my_long2_12(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_13 = 317; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_13(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_13(Allocation ain1) { + return reduce_my_long2_13(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_14 = 318; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_14(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_14(Allocation ain1) { + return reduce_my_long2_14(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long2_15 = 319; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_long2_15(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_15(Allocation ain1) { + return reduce_my_long2_15(ain1, null); + } + + // ain1 = "long2 in" + public result_int reduce_my_long2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_0 = 320; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_0(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_0(Allocation ain1) { + return reduce_my_long4_0(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_1 = 321; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_1(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_1(Allocation ain1) { + return reduce_my_long4_1(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_2 = 322; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_2(Allocation ain1) { + return reduce_my_long4_2(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_3 = 323; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_3(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_3(Allocation ain1) { + return reduce_my_long4_3(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_4 = 324; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_4(Allocation ain1) { + return reduce_my_long4_4(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_5 = 325; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_5(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_5(Allocation ain1) { + return reduce_my_long4_5(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_6 = 326; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_6(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_6(Allocation ain1) { + return reduce_my_long4_6(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_7 = 327; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_7(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_7(Allocation ain1) { + return reduce_my_long4_7(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_8 = 328; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_8(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_8(Allocation ain1) { + return reduce_my_long4_8(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_9 = 329; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_9(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_9(Allocation ain1) { + return reduce_my_long4_9(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_10 = 330; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_10(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_10(Allocation ain1) { + return reduce_my_long4_10(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_11 = 331; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_11(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_11(Allocation ain1) { + return reduce_my_long4_11(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_12 = 332; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_12(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_12(Allocation ain1) { + return reduce_my_long4_12(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_13 = 333; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_13(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_13(Allocation ain1) { + return reduce_my_long4_13(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_14 = 334; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_14(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_14(Allocation ain1) { + return reduce_my_long4_14(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_long4_15 = 335; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_long4_15(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_long4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_15(Allocation ain1) { + return reduce_my_long4_15(ain1, null); + } + + // ain1 = "long4 in" + public result_int reduce_my_long4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_0 = 336; + // in1 = "in" + public result_int reduce_my_uchar_0(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_0(Allocation ain1) { + return reduce_my_uchar_0(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_1 = 337; + // in1 = "in" + public result_int reduce_my_uchar_1(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_1(Allocation ain1) { + return reduce_my_uchar_1(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_2 = 338; + // in1 = "in" + public result_int reduce_my_uchar_2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_2(Allocation ain1) { + return reduce_my_uchar_2(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_3 = 339; + // in1 = "in" + public result_int reduce_my_uchar_3(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_3(Allocation ain1) { + return reduce_my_uchar_3(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_4 = 340; + // in1 = "in" + public result_int reduce_my_uchar_4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_4(Allocation ain1) { + return reduce_my_uchar_4(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_5 = 341; + // in1 = "in" + public result_int reduce_my_uchar_5(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_5(Allocation ain1) { + return reduce_my_uchar_5(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_6 = 342; + // in1 = "in" + public result_int reduce_my_uchar_6(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_6(Allocation ain1) { + return reduce_my_uchar_6(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_7 = 343; + // in1 = "in" + public result_int reduce_my_uchar_7(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_7(Allocation ain1) { + return reduce_my_uchar_7(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_8 = 344; + // in1 = "in" + public result_int reduce_my_uchar_8(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_8(Allocation ain1) { + return reduce_my_uchar_8(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_9 = 345; + // in1 = "in" + public result_int reduce_my_uchar_9(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_9(Allocation ain1) { + return reduce_my_uchar_9(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_10 = 346; + // in1 = "in" + public result_int reduce_my_uchar_10(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_10(Allocation ain1) { + return reduce_my_uchar_10(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_11 = 347; + // in1 = "in" + public result_int reduce_my_uchar_11(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_11(Allocation ain1) { + return reduce_my_uchar_11(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_12 = 348; + // in1 = "in" + public result_int reduce_my_uchar_12(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_12(Allocation ain1) { + return reduce_my_uchar_12(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_13 = 349; + // in1 = "in" + public result_int reduce_my_uchar_13(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_13(Allocation ain1) { + return reduce_my_uchar_13(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_14 = 350; + // in1 = "in" + public result_int reduce_my_uchar_14(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_14(Allocation ain1) { + return reduce_my_uchar_14(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_15 = 351; + // in1 = "in" + public result_int reduce_my_uchar_15(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_15(Allocation ain1) { + return reduce_my_uchar_15(ain1, null); + } + + // ain1 = "uchar in" + public result_int reduce_my_uchar_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_0 = 352; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_0(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_0(Allocation ain1) { + return reduce_my_uchar2_0(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_1 = 353; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_1(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_1(Allocation ain1) { + return reduce_my_uchar2_1(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_2 = 354; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_2(Allocation ain1) { + return reduce_my_uchar2_2(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_3 = 355; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_3(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_3(Allocation ain1) { + return reduce_my_uchar2_3(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_4 = 356; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_4(Allocation ain1) { + return reduce_my_uchar2_4(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_5 = 357; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_5(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_5(Allocation ain1) { + return reduce_my_uchar2_5(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_6 = 358; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_6(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_6(Allocation ain1) { + return reduce_my_uchar2_6(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_7 = 359; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_7(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_7(Allocation ain1) { + return reduce_my_uchar2_7(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_8 = 360; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_8(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_8(Allocation ain1) { + return reduce_my_uchar2_8(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_9 = 361; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_9(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_9(Allocation ain1) { + return reduce_my_uchar2_9(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_10 = 362; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_10(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_10(Allocation ain1) { + return reduce_my_uchar2_10(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_11 = 363; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_11(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_11(Allocation ain1) { + return reduce_my_uchar2_11(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_12 = 364; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_12(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_12(Allocation ain1) { + return reduce_my_uchar2_12(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_13 = 365; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_13(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_13(Allocation ain1) { + return reduce_my_uchar2_13(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_14 = 366; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_14(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_14(Allocation ain1) { + return reduce_my_uchar2_14(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_15 = 367; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uchar2_15(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_15(Allocation ain1) { + return reduce_my_uchar2_15(ain1, null); + } + + // ain1 = "uchar2 in" + public result_int reduce_my_uchar2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_0 = 368; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_0(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_0(Allocation ain1) { + return reduce_my_uchar4_0(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_1 = 369; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_1(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_1(Allocation ain1) { + return reduce_my_uchar4_1(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_2 = 370; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_2(Allocation ain1) { + return reduce_my_uchar4_2(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_3 = 371; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_3(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_3(Allocation ain1) { + return reduce_my_uchar4_3(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_4 = 372; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_4(Allocation ain1) { + return reduce_my_uchar4_4(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_5 = 373; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_5(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_5(Allocation ain1) { + return reduce_my_uchar4_5(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_6 = 374; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_6(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_6(Allocation ain1) { + return reduce_my_uchar4_6(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_7 = 375; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_7(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_7(Allocation ain1) { + return reduce_my_uchar4_7(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_8 = 376; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_8(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_8(Allocation ain1) { + return reduce_my_uchar4_8(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_9 = 377; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_9(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_9(Allocation ain1) { + return reduce_my_uchar4_9(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_10 = 378; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_10(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_10(Allocation ain1) { + return reduce_my_uchar4_10(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_11 = 379; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_11(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_11(Allocation ain1) { + return reduce_my_uchar4_11(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_12 = 380; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_12(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_12(Allocation ain1) { + return reduce_my_uchar4_12(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_13 = 381; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_13(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_13(Allocation ain1) { + return reduce_my_uchar4_13(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_14 = 382; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_14(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_14(Allocation ain1) { + return reduce_my_uchar4_14(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_15 = 383; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uchar4_15(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uchar4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_15(Allocation ain1) { + return reduce_my_uchar4_15(ain1, null); + } + + // ain1 = "uchar4 in" + public result_int reduce_my_uchar4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_0 = 384; + // in1 = "in" + public result_int reduce_my_ushort_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_0(Allocation ain1) { + return reduce_my_ushort_0(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_1 = 385; + // in1 = "in" + public result_int reduce_my_ushort_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_1(Allocation ain1) { + return reduce_my_ushort_1(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_2 = 386; + // in1 = "in" + public result_int reduce_my_ushort_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_2(Allocation ain1) { + return reduce_my_ushort_2(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_3 = 387; + // in1 = "in" + public result_int reduce_my_ushort_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_3(Allocation ain1) { + return reduce_my_ushort_3(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_4 = 388; + // in1 = "in" + public result_int reduce_my_ushort_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_4(Allocation ain1) { + return reduce_my_ushort_4(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_5 = 389; + // in1 = "in" + public result_int reduce_my_ushort_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_5(Allocation ain1) { + return reduce_my_ushort_5(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_6 = 390; + // in1 = "in" + public result_int reduce_my_ushort_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_6(Allocation ain1) { + return reduce_my_ushort_6(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_7 = 391; + // in1 = "in" + public result_int reduce_my_ushort_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_7(Allocation ain1) { + return reduce_my_ushort_7(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_8 = 392; + // in1 = "in" + public result_int reduce_my_ushort_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_8(Allocation ain1) { + return reduce_my_ushort_8(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_9 = 393; + // in1 = "in" + public result_int reduce_my_ushort_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_9(Allocation ain1) { + return reduce_my_ushort_9(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_10 = 394; + // in1 = "in" + public result_int reduce_my_ushort_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_10(Allocation ain1) { + return reduce_my_ushort_10(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_11 = 395; + // in1 = "in" + public result_int reduce_my_ushort_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_11(Allocation ain1) { + return reduce_my_ushort_11(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_12 = 396; + // in1 = "in" + public result_int reduce_my_ushort_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_12(Allocation ain1) { + return reduce_my_ushort_12(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_13 = 397; + // in1 = "in" + public result_int reduce_my_ushort_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_13(Allocation ain1) { + return reduce_my_ushort_13(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_14 = 398; + // in1 = "in" + public result_int reduce_my_ushort_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_14(Allocation ain1) { + return reduce_my_ushort_14(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_15 = 399; + // in1 = "in" + public result_int reduce_my_ushort_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_15(Allocation ain1) { + return reduce_my_ushort_15(ain1, null); + } + + // ain1 = "ushort in" + public result_int reduce_my_ushort_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_0 = 400; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_0(Allocation ain1) { + return reduce_my_ushort2_0(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_1 = 401; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_1(Allocation ain1) { + return reduce_my_ushort2_1(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_2 = 402; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_2(Allocation ain1) { + return reduce_my_ushort2_2(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_3 = 403; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_3(Allocation ain1) { + return reduce_my_ushort2_3(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_4 = 404; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_4(Allocation ain1) { + return reduce_my_ushort2_4(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_5 = 405; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_5(Allocation ain1) { + return reduce_my_ushort2_5(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_6 = 406; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_6(Allocation ain1) { + return reduce_my_ushort2_6(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_7 = 407; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_7(Allocation ain1) { + return reduce_my_ushort2_7(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_8 = 408; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_8(Allocation ain1) { + return reduce_my_ushort2_8(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_9 = 409; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_9(Allocation ain1) { + return reduce_my_ushort2_9(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_10 = 410; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_10(Allocation ain1) { + return reduce_my_ushort2_10(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_11 = 411; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_11(Allocation ain1) { + return reduce_my_ushort2_11(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_12 = 412; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_12(Allocation ain1) { + return reduce_my_ushort2_12(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_13 = 413; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_13(Allocation ain1) { + return reduce_my_ushort2_13(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_14 = 414; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_14(Allocation ain1) { + return reduce_my_ushort2_14(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_15 = 415; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ushort2_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_15(Allocation ain1) { + return reduce_my_ushort2_15(ain1, null); + } + + // ain1 = "ushort2 in" + public result_int reduce_my_ushort2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_0 = 416; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_0(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_0(Allocation ain1) { + return reduce_my_ushort4_0(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_1 = 417; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_1(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_1(Allocation ain1) { + return reduce_my_ushort4_1(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_2 = 418; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_2(Allocation ain1) { + return reduce_my_ushort4_2(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_3 = 419; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_3(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_3(Allocation ain1) { + return reduce_my_ushort4_3(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_4 = 420; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_4(Allocation ain1) { + return reduce_my_ushort4_4(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_5 = 421; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_5(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_5(Allocation ain1) { + return reduce_my_ushort4_5(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_6 = 422; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_6(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_6(Allocation ain1) { + return reduce_my_ushort4_6(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_7 = 423; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_7(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_7(Allocation ain1) { + return reduce_my_ushort4_7(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_8 = 424; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_8(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_8(Allocation ain1) { + return reduce_my_ushort4_8(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_9 = 425; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_9(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_9(Allocation ain1) { + return reduce_my_ushort4_9(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_10 = 426; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_10(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_10(Allocation ain1) { + return reduce_my_ushort4_10(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_11 = 427; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_11(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_11(Allocation ain1) { + return reduce_my_ushort4_11(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_12 = 428; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_12(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_12(Allocation ain1) { + return reduce_my_ushort4_12(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_13 = 429; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_13(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_13(Allocation ain1) { + return reduce_my_ushort4_13(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_14 = 430; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_14(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_14(Allocation ain1) { + return reduce_my_ushort4_14(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_15 = 431; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ushort4_15(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ushort4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_15(Allocation ain1) { + return reduce_my_ushort4_15(ain1, null); + } + + // ain1 = "ushort4 in" + public result_int reduce_my_ushort4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_0 = 432; + // in1 = "in" + public result_int reduce_my_uint_0(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_0(Allocation ain1) { + return reduce_my_uint_0(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_1 = 433; + // in1 = "in" + public result_int reduce_my_uint_1(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_1(Allocation ain1) { + return reduce_my_uint_1(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_2 = 434; + // in1 = "in" + public result_int reduce_my_uint_2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_2(Allocation ain1) { + return reduce_my_uint_2(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_3 = 435; + // in1 = "in" + public result_int reduce_my_uint_3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_3(Allocation ain1) { + return reduce_my_uint_3(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_4 = 436; + // in1 = "in" + public result_int reduce_my_uint_4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_4(Allocation ain1) { + return reduce_my_uint_4(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_5 = 437; + // in1 = "in" + public result_int reduce_my_uint_5(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_5(Allocation ain1) { + return reduce_my_uint_5(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_6 = 438; + // in1 = "in" + public result_int reduce_my_uint_6(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_6(Allocation ain1) { + return reduce_my_uint_6(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_7 = 439; + // in1 = "in" + public result_int reduce_my_uint_7(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_7(Allocation ain1) { + return reduce_my_uint_7(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_8 = 440; + // in1 = "in" + public result_int reduce_my_uint_8(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_8(Allocation ain1) { + return reduce_my_uint_8(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_9 = 441; + // in1 = "in" + public result_int reduce_my_uint_9(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_9(Allocation ain1) { + return reduce_my_uint_9(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_10 = 442; + // in1 = "in" + public result_int reduce_my_uint_10(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_10(Allocation ain1) { + return reduce_my_uint_10(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_11 = 443; + // in1 = "in" + public result_int reduce_my_uint_11(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_11(Allocation ain1) { + return reduce_my_uint_11(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_12 = 444; + // in1 = "in" + public result_int reduce_my_uint_12(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_12(Allocation ain1) { + return reduce_my_uint_12(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_13 = 445; + // in1 = "in" + public result_int reduce_my_uint_13(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_13(Allocation ain1) { + return reduce_my_uint_13(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_14 = 446; + // in1 = "in" + public result_int reduce_my_uint_14(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_14(Allocation ain1) { + return reduce_my_uint_14(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint_15 = 447; + // in1 = "in" + public result_int reduce_my_uint_15(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint in" + public result_int reduce_my_uint_15(Allocation ain1) { + return reduce_my_uint_15(ain1, null); + } + + // ain1 = "uint in" + public result_int reduce_my_uint_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_0 = 448; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_0(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_0(Allocation ain1) { + return reduce_my_uint2_0(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_1 = 449; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_1(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_1(Allocation ain1) { + return reduce_my_uint2_1(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_2 = 450; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_2(Allocation ain1) { + return reduce_my_uint2_2(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_3 = 451; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_3(Allocation ain1) { + return reduce_my_uint2_3(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_4 = 452; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_4(Allocation ain1) { + return reduce_my_uint2_4(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_5 = 453; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_5(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_5(Allocation ain1) { + return reduce_my_uint2_5(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_6 = 454; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_6(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_6(Allocation ain1) { + return reduce_my_uint2_6(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_7 = 455; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_7(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_7(Allocation ain1) { + return reduce_my_uint2_7(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_8 = 456; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_8(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_8(Allocation ain1) { + return reduce_my_uint2_8(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_9 = 457; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_9(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_9(Allocation ain1) { + return reduce_my_uint2_9(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_10 = 458; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_10(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_10(Allocation ain1) { + return reduce_my_uint2_10(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_11 = 459; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_11(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_11(Allocation ain1) { + return reduce_my_uint2_11(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_12 = 460; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_12(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_12(Allocation ain1) { + return reduce_my_uint2_12(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_13 = 461; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_13(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_13(Allocation ain1) { + return reduce_my_uint2_13(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_14 = 462; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_14(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_14(Allocation ain1) { + return reduce_my_uint2_14(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint2_15 = 463; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_uint2_15(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_15(Allocation ain1) { + return reduce_my_uint2_15(ain1, null); + } + + // ain1 = "uint2 in" + public result_int reduce_my_uint2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_0 = 464; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_0(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_0(Allocation ain1) { + return reduce_my_uint4_0(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_1 = 465; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_1(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_1(Allocation ain1) { + return reduce_my_uint4_1(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_2 = 466; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_2(Allocation ain1) { + return reduce_my_uint4_2(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_3 = 467; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_3(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_3(Allocation ain1) { + return reduce_my_uint4_3(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_4 = 468; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_4(Allocation ain1) { + return reduce_my_uint4_4(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_5 = 469; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_5(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_5(Allocation ain1) { + return reduce_my_uint4_5(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_6 = 470; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_6(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_6(Allocation ain1) { + return reduce_my_uint4_6(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_7 = 471; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_7(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_7(Allocation ain1) { + return reduce_my_uint4_7(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_8 = 472; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_8(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_8(Allocation ain1) { + return reduce_my_uint4_8(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_9 = 473; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_9(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_9(Allocation ain1) { + return reduce_my_uint4_9(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_10 = 474; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_10(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_10(Allocation ain1) { + return reduce_my_uint4_10(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_11 = 475; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_11(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_11(Allocation ain1) { + return reduce_my_uint4_11(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_12 = 476; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_12(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_12(Allocation ain1) { + return reduce_my_uint4_12(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_13 = 477; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_13(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_13(Allocation ain1) { + return reduce_my_uint4_13(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_14 = 478; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_14(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_14(Allocation ain1) { + return reduce_my_uint4_14(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uint4_15 = 479; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_uint4_15(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_uint4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_15(Allocation ain1) { + return reduce_my_uint4_15(ain1, null); + } + + // ain1 = "uint4 in" + public result_int reduce_my_uint4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_0 = 480; + // in1 = "in" + public result_int reduce_my_ulong_0(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_0(Allocation ain1) { + return reduce_my_ulong_0(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_1 = 481; + // in1 = "in" + public result_int reduce_my_ulong_1(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_1(Allocation ain1) { + return reduce_my_ulong_1(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_2 = 482; + // in1 = "in" + public result_int reduce_my_ulong_2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_2(Allocation ain1) { + return reduce_my_ulong_2(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_3 = 483; + // in1 = "in" + public result_int reduce_my_ulong_3(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_3(Allocation ain1) { + return reduce_my_ulong_3(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_4 = 484; + // in1 = "in" + public result_int reduce_my_ulong_4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_4(Allocation ain1) { + return reduce_my_ulong_4(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_5 = 485; + // in1 = "in" + public result_int reduce_my_ulong_5(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_5(Allocation ain1) { + return reduce_my_ulong_5(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_6 = 486; + // in1 = "in" + public result_int reduce_my_ulong_6(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_6(Allocation ain1) { + return reduce_my_ulong_6(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_7 = 487; + // in1 = "in" + public result_int reduce_my_ulong_7(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_7(Allocation ain1) { + return reduce_my_ulong_7(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_8 = 488; + // in1 = "in" + public result_int reduce_my_ulong_8(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_8(Allocation ain1) { + return reduce_my_ulong_8(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_9 = 489; + // in1 = "in" + public result_int reduce_my_ulong_9(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_9(Allocation ain1) { + return reduce_my_ulong_9(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_10 = 490; + // in1 = "in" + public result_int reduce_my_ulong_10(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_10(Allocation ain1) { + return reduce_my_ulong_10(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_11 = 491; + // in1 = "in" + public result_int reduce_my_ulong_11(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_11(Allocation ain1) { + return reduce_my_ulong_11(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_12 = 492; + // in1 = "in" + public result_int reduce_my_ulong_12(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_12(Allocation ain1) { + return reduce_my_ulong_12(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_13 = 493; + // in1 = "in" + public result_int reduce_my_ulong_13(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_13(Allocation ain1) { + return reduce_my_ulong_13(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_14 = 494; + // in1 = "in" + public result_int reduce_my_ulong_14(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_14(Allocation ain1) { + return reduce_my_ulong_14(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong_15 = 495; + // in1 = "in" + public result_int reduce_my_ulong_15(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_15(Allocation ain1) { + return reduce_my_ulong_15(ain1, null); + } + + // ain1 = "ulong in" + public result_int reduce_my_ulong_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_0 = 496; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_0(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_0(Allocation ain1) { + return reduce_my_ulong2_0(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_1 = 497; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_1(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_1(Allocation ain1) { + return reduce_my_ulong2_1(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_2 = 498; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_2(Allocation ain1) { + return reduce_my_ulong2_2(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_3 = 499; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_3(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_3(Allocation ain1) { + return reduce_my_ulong2_3(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_4 = 500; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_4(Allocation ain1) { + return reduce_my_ulong2_4(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_5 = 501; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_5(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_5(Allocation ain1) { + return reduce_my_ulong2_5(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_6 = 502; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_6(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_6(Allocation ain1) { + return reduce_my_ulong2_6(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_7 = 503; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_7(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_7(Allocation ain1) { + return reduce_my_ulong2_7(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_8 = 504; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_8(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_8(Allocation ain1) { + return reduce_my_ulong2_8(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_9 = 505; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_9(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_9(Allocation ain1) { + return reduce_my_ulong2_9(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_10 = 506; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_10(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_10(Allocation ain1) { + return reduce_my_ulong2_10(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_11 = 507; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_11(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_11(Allocation ain1) { + return reduce_my_ulong2_11(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_12 = 508; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_12(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_12(Allocation ain1) { + return reduce_my_ulong2_12(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_13 = 509; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_13(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_13(Allocation ain1) { + return reduce_my_ulong2_13(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_14 = 510; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_14(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_14(Allocation ain1) { + return reduce_my_ulong2_14(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong2_15 = 511; + // in1 = "in", flattened 2-vectors + public result_int reduce_my_ulong2_15(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong2_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_15(Allocation ain1) { + return reduce_my_ulong2_15(ain1, null); + } + + // ain1 = "ulong2 in" + public result_int reduce_my_ulong2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_0 = 512; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_0(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_0(Allocation ain1) { + return reduce_my_ulong4_0(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_1 = 513; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_1(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_1(Allocation ain1) { + return reduce_my_ulong4_1(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_2 = 514; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_2(Allocation ain1) { + return reduce_my_ulong4_2(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_3 = 515; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_3(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_3(Allocation ain1) { + return reduce_my_ulong4_3(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_4 = 516; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_4(Allocation ain1) { + return reduce_my_ulong4_4(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_5 = 517; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_5(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_5(Allocation ain1) { + return reduce_my_ulong4_5(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_6 = 518; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_6(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_6(Allocation ain1) { + return reduce_my_ulong4_6(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_7 = 519; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_7(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_7(Allocation ain1) { + return reduce_my_ulong4_7(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_8 = 520; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_8(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_8(Allocation ain1) { + return reduce_my_ulong4_8(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_9 = 521; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_9(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_9(Allocation ain1) { + return reduce_my_ulong4_9(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_10 = 522; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_10(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_10(Allocation ain1) { + return reduce_my_ulong4_10(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_11 = 523; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_11(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_11(Allocation ain1) { + return reduce_my_ulong4_11(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_12 = 524; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_12(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_12(Allocation ain1) { + return reduce_my_ulong4_12(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_13 = 525; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_13(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_13(Allocation ain1) { + return reduce_my_ulong4_13(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_14 = 526; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_14(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_14(Allocation ain1) { + return reduce_my_ulong4_14(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ulong4_15 = 527; + // in1 = "in", flattened 4-vectors + public result_int reduce_my_ulong4_15(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_ulong4_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_15(Allocation ain1) { + return reduce_my_ulong4_15(ain1, null); + } + + // ain1 = "ulong4 in" + public result_int reduce_my_ulong4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_0 = 528; + // in1 = "in" + public result_int reduce_my_bool_0(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_0(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_0(Allocation ain1) { + return reduce_my_bool_0(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_1 = 529; + // in1 = "in" + public result_int reduce_my_bool_1(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_1(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_1(Allocation ain1) { + return reduce_my_bool_1(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_2 = 530; + // in1 = "in" + public result_int reduce_my_bool_2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_2(Allocation ain1) { + return reduce_my_bool_2(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_3 = 531; + // in1 = "in" + public result_int reduce_my_bool_3(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_3(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_3(Allocation ain1) { + return reduce_my_bool_3(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_4 = 532; + // in1 = "in" + public result_int reduce_my_bool_4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_4(Allocation ain1) { + return reduce_my_bool_4(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_5 = 533; + // in1 = "in" + public result_int reduce_my_bool_5(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_5(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_5(Allocation ain1) { + return reduce_my_bool_5(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_6 = 534; + // in1 = "in" + public result_int reduce_my_bool_6(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_6(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_6(Allocation ain1) { + return reduce_my_bool_6(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_7 = 535; + // in1 = "in" + public result_int reduce_my_bool_7(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_7(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_7(Allocation ain1) { + return reduce_my_bool_7(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_8 = 536; + // in1 = "in" + public result_int reduce_my_bool_8(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_8(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_8(Allocation ain1) { + return reduce_my_bool_8(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_9 = 537; + // in1 = "in" + public result_int reduce_my_bool_9(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_9(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_9(Allocation ain1) { + return reduce_my_bool_9(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_10 = 538; + // in1 = "in" + public result_int reduce_my_bool_10(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_10(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_10(Allocation ain1) { + return reduce_my_bool_10(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_11 = 539; + // in1 = "in" + public result_int reduce_my_bool_11(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_11(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_11(Allocation ain1) { + return reduce_my_bool_11(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_12 = 540; + // in1 = "in" + public result_int reduce_my_bool_12(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_12(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_12(Allocation ain1) { + return reduce_my_bool_12(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_13 = 541; + // in1 = "in" + public result_int reduce_my_bool_13(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_13(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_13(Allocation ain1) { + return reduce_my_bool_13(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_14 = 542; + // in1 = "in" + public result_int reduce_my_bool_14(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_14(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_14(Allocation ain1) { + return reduce_my_bool_14(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_15 = 543; + // in1 = "in" + public result_int reduce_my_bool_15(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_bool_15(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool in" + public result_int reduce_my_bool_15(Allocation ain1) { + return reduce_my_bool_15(ain1, null); + } + + // ain1 = "bool in" + public result_int reduce_my_bool_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_0 = 544; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_0(Allocation ain1) { + return reduce_my_rs_matrix2x2_0(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_1 = 545; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_1(Allocation ain1) { + return reduce_my_rs_matrix2x2_1(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_2 = 546; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_2(Allocation ain1) { + return reduce_my_rs_matrix2x2_2(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_3 = 547; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_3(Allocation ain1) { + return reduce_my_rs_matrix2x2_3(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_4 = 548; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_4(Allocation ain1) { + return reduce_my_rs_matrix2x2_4(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_5 = 549; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_5(Allocation ain1) { + return reduce_my_rs_matrix2x2_5(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_6 = 550; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_6(Allocation ain1) { + return reduce_my_rs_matrix2x2_6(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_7 = 551; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_7(Allocation ain1) { + return reduce_my_rs_matrix2x2_7(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_8 = 552; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_8(Allocation ain1) { + return reduce_my_rs_matrix2x2_8(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_9 = 553; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_9(Allocation ain1) { + return reduce_my_rs_matrix2x2_9(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_10 = 554; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_10(Allocation ain1) { + return reduce_my_rs_matrix2x2_10(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_11 = 555; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_11(Allocation ain1) { + return reduce_my_rs_matrix2x2_11(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_12 = 556; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_12(Allocation ain1) { + return reduce_my_rs_matrix2x2_12(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_13 = 557; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_13(Allocation ain1) { + return reduce_my_rs_matrix2x2_13(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_14 = 558; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_14(Allocation ain1) { + return reduce_my_rs_matrix2x2_14(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_15 = 559; + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_15(Allocation ain1) { + return reduce_my_rs_matrix2x2_15(ain1, null); + } + + // ain1 = "rs_matrix2x2 in" + public result_int reduce_my_rs_matrix2x2_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_0 = 560; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_0(Allocation ain1) { + return reduce_my_rs_matrix3x3_0(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_1 = 561; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_1(Allocation ain1) { + return reduce_my_rs_matrix3x3_1(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_2 = 562; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_2(Allocation ain1) { + return reduce_my_rs_matrix3x3_2(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_3 = 563; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_3(Allocation ain1) { + return reduce_my_rs_matrix3x3_3(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_4 = 564; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_4(Allocation ain1) { + return reduce_my_rs_matrix3x3_4(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_5 = 565; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_5(Allocation ain1) { + return reduce_my_rs_matrix3x3_5(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_6 = 566; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_6(Allocation ain1) { + return reduce_my_rs_matrix3x3_6(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_7 = 567; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_7(Allocation ain1) { + return reduce_my_rs_matrix3x3_7(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_8 = 568; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_8(Allocation ain1) { + return reduce_my_rs_matrix3x3_8(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_9 = 569; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_9(Allocation ain1) { + return reduce_my_rs_matrix3x3_9(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_10 = 570; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_10(Allocation ain1) { + return reduce_my_rs_matrix3x3_10(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_11 = 571; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_11(Allocation ain1) { + return reduce_my_rs_matrix3x3_11(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_12 = 572; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_12(Allocation ain1) { + return reduce_my_rs_matrix3x3_12(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_13 = 573; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_13(Allocation ain1) { + return reduce_my_rs_matrix3x3_13(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_14 = 574; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_14(Allocation ain1) { + return reduce_my_rs_matrix3x3_14(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix3x3_15 = 575; + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_15(Allocation ain1) { + return reduce_my_rs_matrix3x3_15(ain1, null); + } + + // ain1 = "rs_matrix3x3 in" + public result_int reduce_my_rs_matrix3x3_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix3x3_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_0 = 576; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_0(Allocation ain1) { + return reduce_my_rs_matrix4x4_0(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_1 = 577; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_1(Allocation ain1) { + return reduce_my_rs_matrix4x4_1(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_2 = 578; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_2(Allocation ain1) { + return reduce_my_rs_matrix4x4_2(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_3 = 579; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_3(Allocation ain1) { + return reduce_my_rs_matrix4x4_3(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_4 = 580; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_4(Allocation ain1) { + return reduce_my_rs_matrix4x4_4(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_5 = 581; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_5(Allocation ain1) { + return reduce_my_rs_matrix4x4_5(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_6 = 582; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_6(Allocation ain1) { + return reduce_my_rs_matrix4x4_6(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_7 = 583; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_7(Allocation ain1) { + return reduce_my_rs_matrix4x4_7(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_8 = 584; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_8(Allocation ain1) { + return reduce_my_rs_matrix4x4_8(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_9 = 585; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_9(Allocation ain1) { + return reduce_my_rs_matrix4x4_9(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_10 = 586; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_10(Allocation ain1) { + return reduce_my_rs_matrix4x4_10(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_11 = 587; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_11(Allocation ain1) { + return reduce_my_rs_matrix4x4_11(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_12 = 588; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_12(Allocation ain1) { + return reduce_my_rs_matrix4x4_12(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_13 = 589; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_13(Allocation ain1) { + return reduce_my_rs_matrix4x4_13(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_14 = 590; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_14(Allocation ain1) { + return reduce_my_rs_matrix4x4_14(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix4x4_15 = 591; + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_15(Allocation ain1) { + return reduce_my_rs_matrix4x4_15(ain1, null); + } + + // ain1 = "rs_matrix4x4 in" + public result_int reduce_my_rs_matrix4x4_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix4x4_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_0 = 592; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_0(Allocation ain1) { + return reduce_my_MyStruct_0(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_0(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_0, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_1 = 593; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_1(Allocation ain1) { + return reduce_my_MyStruct_1(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_1(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_1, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_2 = 594; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_2(Allocation ain1) { + return reduce_my_MyStruct_2(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_2, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_3 = 595; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_3(Allocation ain1) { + return reduce_my_MyStruct_3(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_3(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_3, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_4 = 596; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_4(Allocation ain1) { + return reduce_my_MyStruct_4(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_4, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_5 = 597; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_5(Allocation ain1) { + return reduce_my_MyStruct_5(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_5(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_5, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_6 = 598; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_6(Allocation ain1) { + return reduce_my_MyStruct_6(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_6(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_6, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_7 = 599; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_7(Allocation ain1) { + return reduce_my_MyStruct_7(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_7(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_7, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_8 = 600; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_8(Allocation ain1) { + return reduce_my_MyStruct_8(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_8(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_8, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_9 = 601; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_9(Allocation ain1) { + return reduce_my_MyStruct_9(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_9(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_9, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_10 = 602; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_10(Allocation ain1) { + return reduce_my_MyStruct_10(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_10(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_10, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_11 = 603; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_11(Allocation ain1) { + return reduce_my_MyStruct_11(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_11(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_11, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_12 = 604; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_12(Allocation ain1) { + return reduce_my_MyStruct_12(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_12(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_12, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_13 = 605; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_13(Allocation ain1) { + return reduce_my_MyStruct_13(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_13(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_13, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_14 = 606; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_14(Allocation ain1) { + return reduce_my_MyStruct_14(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_14(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_14, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_15 = 607; + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_15(Allocation ain1) { + return reduce_my_MyStruct_15(ain1, null); + } + + // ain1 = "/* struct <> */ in" + public result_int reduce_my_MyStruct_15(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_15, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_input/ScriptField_MyStruct.java.expect b/slang/tests/P_reduce_general_input/ScriptField_MyStruct.java.expect new file mode 100644 index 0000000..ec10677 --- /dev/null +++ b/slang/tests/P_reduce_general_input/ScriptField_MyStruct.java.expect
@@ -0,0 +1,200 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_input.rs + */ + +package input; + +import android.renderscript.*; +import input.reduce_general_inputBitCode; + +/** + * @hide + */ +public class ScriptField_MyStruct extends android.renderscript.Script.FieldBase { + static public class Item { + + float f; + double d; + + Item() { + } + + } + + private Item mItemArray[]; + private FieldPacker mIOBuffer; + private static java.lang.ref.WeakReference<Element> mElementCache = new java.lang.ref.WeakReference<Element>(null); + public static Element createElement(RenderScript rs) { + Element.Builder eb = new Element.Builder(rs); + eb.add(Element.F32(rs), "f"); + eb.add(Element.U32(rs), "#rs_padding_1"); + eb.add(Element.F64(rs), "d"); + return eb.create(); + } + + private ScriptField_MyStruct(RenderScript rs) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + } + + public ScriptField_MyStruct(RenderScript rs, int count) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + init(rs, count); + } + + public ScriptField_MyStruct(RenderScript rs, int count, int usages) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + init(rs, count, usages); + } + + public static ScriptField_MyStruct create1D(RenderScript rs, int dimX, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + obj.mAllocation = Allocation.createSized(rs, obj.mElement, dimX, usages); + return obj; + } + + public static ScriptField_MyStruct create1D(RenderScript rs, int dimX) { + return create1D(rs, dimX, Allocation.USAGE_SCRIPT); + } + + public static ScriptField_MyStruct create2D(RenderScript rs, int dimX, int dimY) { + return create2D(rs, dimX, dimY, Allocation.USAGE_SCRIPT); + } + + public static ScriptField_MyStruct create2D(RenderScript rs, int dimX, int dimY, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + Type.Builder b = new Type.Builder(rs, obj.mElement); + b.setX(dimX); + b.setY(dimY); + Type t = b.create(); + obj.mAllocation = Allocation.createTyped(rs, t, usages); + return obj; + } + + public static Type.Builder createTypeBuilder(RenderScript rs) { + Element e = createElement(rs); + return new Type.Builder(rs, e); + } + + public static ScriptField_MyStruct createCustom(RenderScript rs, Type.Builder tb, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + Type t = tb.create(); + if (t.getElement() != obj.mElement) { + throw new RSIllegalArgumentException("Type.Builder did not match expected element type."); + } + obj.mAllocation = Allocation.createTyped(rs, t, usages); + return obj; + } + + private void copyToArrayLocal(Item i, FieldPacker fp) { + fp.addF32(i.f); + fp.skip(4); + fp.addF64(i.d); + } + + private void copyToArray(Item i, int index) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + mIOBuffer.reset(index * mElement.getBytesSize()); + copyToArrayLocal(i, mIOBuffer); + } + + public synchronized void set(Item i, int index, boolean copyNow) { + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + mItemArray[index] = i; + if (copyNow) { + copyToArray(i, index); + FieldPacker fp = new FieldPacker(mElement.getBytesSize()); + copyToArrayLocal(i, fp); + mAllocation.setFromFieldPacker(index, fp); + } + + } + + public synchronized Item get(int index) { + if (mItemArray == null) return null; + return mItemArray[index]; + } + + public synchronized void set_f(int index, float v, boolean copyNow) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + if (mItemArray[index] == null) mItemArray[index] = new Item(); + mItemArray[index].f = v; + if (copyNow) { + mIOBuffer.reset(index * mElement.getBytesSize()); + mIOBuffer.addF32(v); + FieldPacker fp = new FieldPacker(4); + fp.addF32(v); + mAllocation.setFromFieldPacker(index, 0, fp); + } + + } + + public synchronized void set_d(int index, double v, boolean copyNow) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + if (mItemArray[index] == null) mItemArray[index] = new Item(); + mItemArray[index].d = v; + if (copyNow) { + mIOBuffer.reset(index * mElement.getBytesSize() + 8); + mIOBuffer.addF64(v); + FieldPacker fp = new FieldPacker(8); + fp.addF64(v); + mAllocation.setFromFieldPacker(index, 2, fp); + } + + } + + public synchronized float get_f(int index) { + if (mItemArray == null) return 0; + return mItemArray[index].f; + } + + public synchronized double get_d(int index) { + if (mItemArray == null) return 0; + return mItemArray[index].d; + } + + public synchronized void copyAll() { + for (int ct = 0; ct < mItemArray.length; ct++) copyToArray(mItemArray[ct], ct); + mAllocation.setFromFieldPacker(0, mIOBuffer); + } + + public synchronized void resize(int newSize) { + if (mItemArray != null) { + int oldSize = mItemArray.length; + int copySize = Math.min(oldSize, newSize); + if (newSize == oldSize) return; + Item ni[] = new Item[newSize]; + System.arraycopy(mItemArray, 0, ni, 0, copySize); + mItemArray = ni; + } + + mAllocation.resize(newSize); + if (mIOBuffer != null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + } + +} +
diff --git a/slang/tests/P_reduce_general_input/gen-input.pl b/slang/tests/P_reduce_general_input/gen-input.pl new file mode 100755 index 0000000..4be2e83 --- /dev/null +++ b/slang/tests/P_reduce_general_input/gen-input.pl
@@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +# Generate trivial test cases to exercise input types. + +use strict; + +my @basicTypes = ("half", "float", "double", + "char", "short", "int", "long", + "uchar", "ushort", "uint", "ulong", + "bool", + "rs_matrix2x2", "rs_matrix3x3", "rs_matrix4x4", + "MyStruct"); + +my @specialParameters = ("context", "x", "y", "z"); +my $specialParameterPowerSetCardinality = 2 ** (1 + $#specialParameters); + +# 1 signifies non-vector +# 3 is not supported for exported types +my @vecLengths = (1, 2, 4); + +print "// -Wall -Werror\n"; +print "#pragma version(1)\n"; +print "#pragma rs java_package_name(input)\n\n"; +print "// This test case was created by $0.\n"; +print "// It exercises various legal combinations of inputs and special parameters,\n"; +print "// so that we can ensure\n"; +print "// (a) We do not choke when compiling them\n"; +print "// (b) We reflect them correctly\n\n"; +print "// One example struct type\n"; +print "typedef struct MyStruct { float f; double d; } MyStruct;\n\n"; +print "// Trivial combiner shared by all test cases\n"; +print "static void combiner(int *accum, const int *other) { }\n"; + +foreach my $basicType (@basicTypes) { + foreach my $vecLen (@vecLengths) { + + # There are no bool vectors or struct vectors + next if ($vecLen > 1) && (($basicType eq "bool") || ($basicType eq "MyStruct")); + + # There are no matrix or object vectors + next if ($vecLen > 1) && (substr($basicType, 0, 3) eq "rs_"); + + my $eltName = $basicType; + $eltName .= $vecLen if ($vecLen > 1); + + for (my $specials = 0; $specials < $specialParameterPowerSetCardinality; ++$specials) { + my $reduceName = "my_${eltName}_${specials}"; + my $accumName = "${reduceName}_accum"; + print "\n"; + print "#pragma rs reduce(${reduceName}) accumulator(${accumName}) combiner(combiner)\n"; + print "static void ${accumName}(int *accum, ${eltName} in"; + for (my $special = 0; $special <= $#specialParameters; ++$special) { + if ($specials & 2**$special) { + print ", " . ($special ? "uint" : "rs_kernel_context") . " ${specialParameters[$special]}"; + } + } + print ") { }\n"; + } + } +}
diff --git a/slang/tests/P_reduce_general_input/reduce_general_input.rs b/slang/tests/P_reduce_general_input/reduce_general_input.rs new file mode 100644 index 0000000..e0fa90f --- /dev/null +++ b/slang/tests/P_reduce_general_input/reduce_general_input.rs
@@ -0,0 +1,1839 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(input) + +// This test case was created by ./gen-input.pl. +// It exercises various legal combinations of inputs and special parameters, +// so that we can ensure +// (a) We do not choke when compiling them +// (b) We reflect them correctly + +// One example struct type +typedef struct MyStruct { float f; double d; } MyStruct; + +// Trivial combiner shared by all test cases +static void combiner(int *accum, const int *other) { } + +#pragma rs reduce(my_half_0) accumulator(my_half_0_accum) combiner(combiner) +static void my_half_0_accum(int *accum, half in) { } + +#pragma rs reduce(my_half_1) accumulator(my_half_1_accum) combiner(combiner) +static void my_half_1_accum(int *accum, half in, rs_kernel_context context) { } + +#pragma rs reduce(my_half_2) accumulator(my_half_2_accum) combiner(combiner) +static void my_half_2_accum(int *accum, half in, uint x) { } + +#pragma rs reduce(my_half_3) accumulator(my_half_3_accum) combiner(combiner) +static void my_half_3_accum(int *accum, half in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_half_4) accumulator(my_half_4_accum) combiner(combiner) +static void my_half_4_accum(int *accum, half in, uint y) { } + +#pragma rs reduce(my_half_5) accumulator(my_half_5_accum) combiner(combiner) +static void my_half_5_accum(int *accum, half in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_half_6) accumulator(my_half_6_accum) combiner(combiner) +static void my_half_6_accum(int *accum, half in, uint x, uint y) { } + +#pragma rs reduce(my_half_7) accumulator(my_half_7_accum) combiner(combiner) +static void my_half_7_accum(int *accum, half in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_half_8) accumulator(my_half_8_accum) combiner(combiner) +static void my_half_8_accum(int *accum, half in, uint z) { } + +#pragma rs reduce(my_half_9) accumulator(my_half_9_accum) combiner(combiner) +static void my_half_9_accum(int *accum, half in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_half_10) accumulator(my_half_10_accum) combiner(combiner) +static void my_half_10_accum(int *accum, half in, uint x, uint z) { } + +#pragma rs reduce(my_half_11) accumulator(my_half_11_accum) combiner(combiner) +static void my_half_11_accum(int *accum, half in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_half_12) accumulator(my_half_12_accum) combiner(combiner) +static void my_half_12_accum(int *accum, half in, uint y, uint z) { } + +#pragma rs reduce(my_half_13) accumulator(my_half_13_accum) combiner(combiner) +static void my_half_13_accum(int *accum, half in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_half_14) accumulator(my_half_14_accum) combiner(combiner) +static void my_half_14_accum(int *accum, half in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_half_15) accumulator(my_half_15_accum) combiner(combiner) +static void my_half_15_accum(int *accum, half in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_half2_0) accumulator(my_half2_0_accum) combiner(combiner) +static void my_half2_0_accum(int *accum, half2 in) { } + +#pragma rs reduce(my_half2_1) accumulator(my_half2_1_accum) combiner(combiner) +static void my_half2_1_accum(int *accum, half2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_2) accumulator(my_half2_2_accum) combiner(combiner) +static void my_half2_2_accum(int *accum, half2 in, uint x) { } + +#pragma rs reduce(my_half2_3) accumulator(my_half2_3_accum) combiner(combiner) +static void my_half2_3_accum(int *accum, half2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_half2_4) accumulator(my_half2_4_accum) combiner(combiner) +static void my_half2_4_accum(int *accum, half2 in, uint y) { } + +#pragma rs reduce(my_half2_5) accumulator(my_half2_5_accum) combiner(combiner) +static void my_half2_5_accum(int *accum, half2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_half2_6) accumulator(my_half2_6_accum) combiner(combiner) +static void my_half2_6_accum(int *accum, half2 in, uint x, uint y) { } + +#pragma rs reduce(my_half2_7) accumulator(my_half2_7_accum) combiner(combiner) +static void my_half2_7_accum(int *accum, half2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_half2_8) accumulator(my_half2_8_accum) combiner(combiner) +static void my_half2_8_accum(int *accum, half2 in, uint z) { } + +#pragma rs reduce(my_half2_9) accumulator(my_half2_9_accum) combiner(combiner) +static void my_half2_9_accum(int *accum, half2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_half2_10) accumulator(my_half2_10_accum) combiner(combiner) +static void my_half2_10_accum(int *accum, half2 in, uint x, uint z) { } + +#pragma rs reduce(my_half2_11) accumulator(my_half2_11_accum) combiner(combiner) +static void my_half2_11_accum(int *accum, half2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_half2_12) accumulator(my_half2_12_accum) combiner(combiner) +static void my_half2_12_accum(int *accum, half2 in, uint y, uint z) { } + +#pragma rs reduce(my_half2_13) accumulator(my_half2_13_accum) combiner(combiner) +static void my_half2_13_accum(int *accum, half2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_half2_14) accumulator(my_half2_14_accum) combiner(combiner) +static void my_half2_14_accum(int *accum, half2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_half2_15) accumulator(my_half2_15_accum) combiner(combiner) +static void my_half2_15_accum(int *accum, half2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_half4_0) accumulator(my_half4_0_accum) combiner(combiner) +static void my_half4_0_accum(int *accum, half4 in) { } + +#pragma rs reduce(my_half4_1) accumulator(my_half4_1_accum) combiner(combiner) +static void my_half4_1_accum(int *accum, half4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_2) accumulator(my_half4_2_accum) combiner(combiner) +static void my_half4_2_accum(int *accum, half4 in, uint x) { } + +#pragma rs reduce(my_half4_3) accumulator(my_half4_3_accum) combiner(combiner) +static void my_half4_3_accum(int *accum, half4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_half4_4) accumulator(my_half4_4_accum) combiner(combiner) +static void my_half4_4_accum(int *accum, half4 in, uint y) { } + +#pragma rs reduce(my_half4_5) accumulator(my_half4_5_accum) combiner(combiner) +static void my_half4_5_accum(int *accum, half4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_half4_6) accumulator(my_half4_6_accum) combiner(combiner) +static void my_half4_6_accum(int *accum, half4 in, uint x, uint y) { } + +#pragma rs reduce(my_half4_7) accumulator(my_half4_7_accum) combiner(combiner) +static void my_half4_7_accum(int *accum, half4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_half4_8) accumulator(my_half4_8_accum) combiner(combiner) +static void my_half4_8_accum(int *accum, half4 in, uint z) { } + +#pragma rs reduce(my_half4_9) accumulator(my_half4_9_accum) combiner(combiner) +static void my_half4_9_accum(int *accum, half4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_half4_10) accumulator(my_half4_10_accum) combiner(combiner) +static void my_half4_10_accum(int *accum, half4 in, uint x, uint z) { } + +#pragma rs reduce(my_half4_11) accumulator(my_half4_11_accum) combiner(combiner) +static void my_half4_11_accum(int *accum, half4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_half4_12) accumulator(my_half4_12_accum) combiner(combiner) +static void my_half4_12_accum(int *accum, half4 in, uint y, uint z) { } + +#pragma rs reduce(my_half4_13) accumulator(my_half4_13_accum) combiner(combiner) +static void my_half4_13_accum(int *accum, half4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_half4_14) accumulator(my_half4_14_accum) combiner(combiner) +static void my_half4_14_accum(int *accum, half4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_half4_15) accumulator(my_half4_15_accum) combiner(combiner) +static void my_half4_15_accum(int *accum, half4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_float_0) accumulator(my_float_0_accum) combiner(combiner) +static void my_float_0_accum(int *accum, float in) { } + +#pragma rs reduce(my_float_1) accumulator(my_float_1_accum) combiner(combiner) +static void my_float_1_accum(int *accum, float in, rs_kernel_context context) { } + +#pragma rs reduce(my_float_2) accumulator(my_float_2_accum) combiner(combiner) +static void my_float_2_accum(int *accum, float in, uint x) { } + +#pragma rs reduce(my_float_3) accumulator(my_float_3_accum) combiner(combiner) +static void my_float_3_accum(int *accum, float in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_float_4) accumulator(my_float_4_accum) combiner(combiner) +static void my_float_4_accum(int *accum, float in, uint y) { } + +#pragma rs reduce(my_float_5) accumulator(my_float_5_accum) combiner(combiner) +static void my_float_5_accum(int *accum, float in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_float_6) accumulator(my_float_6_accum) combiner(combiner) +static void my_float_6_accum(int *accum, float in, uint x, uint y) { } + +#pragma rs reduce(my_float_7) accumulator(my_float_7_accum) combiner(combiner) +static void my_float_7_accum(int *accum, float in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_float_8) accumulator(my_float_8_accum) combiner(combiner) +static void my_float_8_accum(int *accum, float in, uint z) { } + +#pragma rs reduce(my_float_9) accumulator(my_float_9_accum) combiner(combiner) +static void my_float_9_accum(int *accum, float in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_float_10) accumulator(my_float_10_accum) combiner(combiner) +static void my_float_10_accum(int *accum, float in, uint x, uint z) { } + +#pragma rs reduce(my_float_11) accumulator(my_float_11_accum) combiner(combiner) +static void my_float_11_accum(int *accum, float in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_float_12) accumulator(my_float_12_accum) combiner(combiner) +static void my_float_12_accum(int *accum, float in, uint y, uint z) { } + +#pragma rs reduce(my_float_13) accumulator(my_float_13_accum) combiner(combiner) +static void my_float_13_accum(int *accum, float in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_float_14) accumulator(my_float_14_accum) combiner(combiner) +static void my_float_14_accum(int *accum, float in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_float_15) accumulator(my_float_15_accum) combiner(combiner) +static void my_float_15_accum(int *accum, float in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_float2_0) accumulator(my_float2_0_accum) combiner(combiner) +static void my_float2_0_accum(int *accum, float2 in) { } + +#pragma rs reduce(my_float2_1) accumulator(my_float2_1_accum) combiner(combiner) +static void my_float2_1_accum(int *accum, float2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_2) accumulator(my_float2_2_accum) combiner(combiner) +static void my_float2_2_accum(int *accum, float2 in, uint x) { } + +#pragma rs reduce(my_float2_3) accumulator(my_float2_3_accum) combiner(combiner) +static void my_float2_3_accum(int *accum, float2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_float2_4) accumulator(my_float2_4_accum) combiner(combiner) +static void my_float2_4_accum(int *accum, float2 in, uint y) { } + +#pragma rs reduce(my_float2_5) accumulator(my_float2_5_accum) combiner(combiner) +static void my_float2_5_accum(int *accum, float2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_float2_6) accumulator(my_float2_6_accum) combiner(combiner) +static void my_float2_6_accum(int *accum, float2 in, uint x, uint y) { } + +#pragma rs reduce(my_float2_7) accumulator(my_float2_7_accum) combiner(combiner) +static void my_float2_7_accum(int *accum, float2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_float2_8) accumulator(my_float2_8_accum) combiner(combiner) +static void my_float2_8_accum(int *accum, float2 in, uint z) { } + +#pragma rs reduce(my_float2_9) accumulator(my_float2_9_accum) combiner(combiner) +static void my_float2_9_accum(int *accum, float2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_float2_10) accumulator(my_float2_10_accum) combiner(combiner) +static void my_float2_10_accum(int *accum, float2 in, uint x, uint z) { } + +#pragma rs reduce(my_float2_11) accumulator(my_float2_11_accum) combiner(combiner) +static void my_float2_11_accum(int *accum, float2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_float2_12) accumulator(my_float2_12_accum) combiner(combiner) +static void my_float2_12_accum(int *accum, float2 in, uint y, uint z) { } + +#pragma rs reduce(my_float2_13) accumulator(my_float2_13_accum) combiner(combiner) +static void my_float2_13_accum(int *accum, float2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_float2_14) accumulator(my_float2_14_accum) combiner(combiner) +static void my_float2_14_accum(int *accum, float2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_float2_15) accumulator(my_float2_15_accum) combiner(combiner) +static void my_float2_15_accum(int *accum, float2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_float4_0) accumulator(my_float4_0_accum) combiner(combiner) +static void my_float4_0_accum(int *accum, float4 in) { } + +#pragma rs reduce(my_float4_1) accumulator(my_float4_1_accum) combiner(combiner) +static void my_float4_1_accum(int *accum, float4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_2) accumulator(my_float4_2_accum) combiner(combiner) +static void my_float4_2_accum(int *accum, float4 in, uint x) { } + +#pragma rs reduce(my_float4_3) accumulator(my_float4_3_accum) combiner(combiner) +static void my_float4_3_accum(int *accum, float4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_float4_4) accumulator(my_float4_4_accum) combiner(combiner) +static void my_float4_4_accum(int *accum, float4 in, uint y) { } + +#pragma rs reduce(my_float4_5) accumulator(my_float4_5_accum) combiner(combiner) +static void my_float4_5_accum(int *accum, float4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_float4_6) accumulator(my_float4_6_accum) combiner(combiner) +static void my_float4_6_accum(int *accum, float4 in, uint x, uint y) { } + +#pragma rs reduce(my_float4_7) accumulator(my_float4_7_accum) combiner(combiner) +static void my_float4_7_accum(int *accum, float4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_float4_8) accumulator(my_float4_8_accum) combiner(combiner) +static void my_float4_8_accum(int *accum, float4 in, uint z) { } + +#pragma rs reduce(my_float4_9) accumulator(my_float4_9_accum) combiner(combiner) +static void my_float4_9_accum(int *accum, float4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_float4_10) accumulator(my_float4_10_accum) combiner(combiner) +static void my_float4_10_accum(int *accum, float4 in, uint x, uint z) { } + +#pragma rs reduce(my_float4_11) accumulator(my_float4_11_accum) combiner(combiner) +static void my_float4_11_accum(int *accum, float4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_float4_12) accumulator(my_float4_12_accum) combiner(combiner) +static void my_float4_12_accum(int *accum, float4 in, uint y, uint z) { } + +#pragma rs reduce(my_float4_13) accumulator(my_float4_13_accum) combiner(combiner) +static void my_float4_13_accum(int *accum, float4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_float4_14) accumulator(my_float4_14_accum) combiner(combiner) +static void my_float4_14_accum(int *accum, float4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_float4_15) accumulator(my_float4_15_accum) combiner(combiner) +static void my_float4_15_accum(int *accum, float4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_double_0) accumulator(my_double_0_accum) combiner(combiner) +static void my_double_0_accum(int *accum, double in) { } + +#pragma rs reduce(my_double_1) accumulator(my_double_1_accum) combiner(combiner) +static void my_double_1_accum(int *accum, double in, rs_kernel_context context) { } + +#pragma rs reduce(my_double_2) accumulator(my_double_2_accum) combiner(combiner) +static void my_double_2_accum(int *accum, double in, uint x) { } + +#pragma rs reduce(my_double_3) accumulator(my_double_3_accum) combiner(combiner) +static void my_double_3_accum(int *accum, double in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_double_4) accumulator(my_double_4_accum) combiner(combiner) +static void my_double_4_accum(int *accum, double in, uint y) { } + +#pragma rs reduce(my_double_5) accumulator(my_double_5_accum) combiner(combiner) +static void my_double_5_accum(int *accum, double in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_double_6) accumulator(my_double_6_accum) combiner(combiner) +static void my_double_6_accum(int *accum, double in, uint x, uint y) { } + +#pragma rs reduce(my_double_7) accumulator(my_double_7_accum) combiner(combiner) +static void my_double_7_accum(int *accum, double in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_double_8) accumulator(my_double_8_accum) combiner(combiner) +static void my_double_8_accum(int *accum, double in, uint z) { } + +#pragma rs reduce(my_double_9) accumulator(my_double_9_accum) combiner(combiner) +static void my_double_9_accum(int *accum, double in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_double_10) accumulator(my_double_10_accum) combiner(combiner) +static void my_double_10_accum(int *accum, double in, uint x, uint z) { } + +#pragma rs reduce(my_double_11) accumulator(my_double_11_accum) combiner(combiner) +static void my_double_11_accum(int *accum, double in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_double_12) accumulator(my_double_12_accum) combiner(combiner) +static void my_double_12_accum(int *accum, double in, uint y, uint z) { } + +#pragma rs reduce(my_double_13) accumulator(my_double_13_accum) combiner(combiner) +static void my_double_13_accum(int *accum, double in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_double_14) accumulator(my_double_14_accum) combiner(combiner) +static void my_double_14_accum(int *accum, double in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_double_15) accumulator(my_double_15_accum) combiner(combiner) +static void my_double_15_accum(int *accum, double in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_double2_0) accumulator(my_double2_0_accum) combiner(combiner) +static void my_double2_0_accum(int *accum, double2 in) { } + +#pragma rs reduce(my_double2_1) accumulator(my_double2_1_accum) combiner(combiner) +static void my_double2_1_accum(int *accum, double2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_double2_2) accumulator(my_double2_2_accum) combiner(combiner) +static void my_double2_2_accum(int *accum, double2 in, uint x) { } + +#pragma rs reduce(my_double2_3) accumulator(my_double2_3_accum) combiner(combiner) +static void my_double2_3_accum(int *accum, double2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_double2_4) accumulator(my_double2_4_accum) combiner(combiner) +static void my_double2_4_accum(int *accum, double2 in, uint y) { } + +#pragma rs reduce(my_double2_5) accumulator(my_double2_5_accum) combiner(combiner) +static void my_double2_5_accum(int *accum, double2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_double2_6) accumulator(my_double2_6_accum) combiner(combiner) +static void my_double2_6_accum(int *accum, double2 in, uint x, uint y) { } + +#pragma rs reduce(my_double2_7) accumulator(my_double2_7_accum) combiner(combiner) +static void my_double2_7_accum(int *accum, double2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_double2_8) accumulator(my_double2_8_accum) combiner(combiner) +static void my_double2_8_accum(int *accum, double2 in, uint z) { } + +#pragma rs reduce(my_double2_9) accumulator(my_double2_9_accum) combiner(combiner) +static void my_double2_9_accum(int *accum, double2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_double2_10) accumulator(my_double2_10_accum) combiner(combiner) +static void my_double2_10_accum(int *accum, double2 in, uint x, uint z) { } + +#pragma rs reduce(my_double2_11) accumulator(my_double2_11_accum) combiner(combiner) +static void my_double2_11_accum(int *accum, double2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_double2_12) accumulator(my_double2_12_accum) combiner(combiner) +static void my_double2_12_accum(int *accum, double2 in, uint y, uint z) { } + +#pragma rs reduce(my_double2_13) accumulator(my_double2_13_accum) combiner(combiner) +static void my_double2_13_accum(int *accum, double2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_double2_14) accumulator(my_double2_14_accum) combiner(combiner) +static void my_double2_14_accum(int *accum, double2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_double2_15) accumulator(my_double2_15_accum) combiner(combiner) +static void my_double2_15_accum(int *accum, double2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_double4_0) accumulator(my_double4_0_accum) combiner(combiner) +static void my_double4_0_accum(int *accum, double4 in) { } + +#pragma rs reduce(my_double4_1) accumulator(my_double4_1_accum) combiner(combiner) +static void my_double4_1_accum(int *accum, double4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_double4_2) accumulator(my_double4_2_accum) combiner(combiner) +static void my_double4_2_accum(int *accum, double4 in, uint x) { } + +#pragma rs reduce(my_double4_3) accumulator(my_double4_3_accum) combiner(combiner) +static void my_double4_3_accum(int *accum, double4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_double4_4) accumulator(my_double4_4_accum) combiner(combiner) +static void my_double4_4_accum(int *accum, double4 in, uint y) { } + +#pragma rs reduce(my_double4_5) accumulator(my_double4_5_accum) combiner(combiner) +static void my_double4_5_accum(int *accum, double4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_double4_6) accumulator(my_double4_6_accum) combiner(combiner) +static void my_double4_6_accum(int *accum, double4 in, uint x, uint y) { } + +#pragma rs reduce(my_double4_7) accumulator(my_double4_7_accum) combiner(combiner) +static void my_double4_7_accum(int *accum, double4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_double4_8) accumulator(my_double4_8_accum) combiner(combiner) +static void my_double4_8_accum(int *accum, double4 in, uint z) { } + +#pragma rs reduce(my_double4_9) accumulator(my_double4_9_accum) combiner(combiner) +static void my_double4_9_accum(int *accum, double4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_double4_10) accumulator(my_double4_10_accum) combiner(combiner) +static void my_double4_10_accum(int *accum, double4 in, uint x, uint z) { } + +#pragma rs reduce(my_double4_11) accumulator(my_double4_11_accum) combiner(combiner) +static void my_double4_11_accum(int *accum, double4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_double4_12) accumulator(my_double4_12_accum) combiner(combiner) +static void my_double4_12_accum(int *accum, double4 in, uint y, uint z) { } + +#pragma rs reduce(my_double4_13) accumulator(my_double4_13_accum) combiner(combiner) +static void my_double4_13_accum(int *accum, double4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_double4_14) accumulator(my_double4_14_accum) combiner(combiner) +static void my_double4_14_accum(int *accum, double4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_double4_15) accumulator(my_double4_15_accum) combiner(combiner) +static void my_double4_15_accum(int *accum, double4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_char_0) accumulator(my_char_0_accum) combiner(combiner) +static void my_char_0_accum(int *accum, char in) { } + +#pragma rs reduce(my_char_1) accumulator(my_char_1_accum) combiner(combiner) +static void my_char_1_accum(int *accum, char in, rs_kernel_context context) { } + +#pragma rs reduce(my_char_2) accumulator(my_char_2_accum) combiner(combiner) +static void my_char_2_accum(int *accum, char in, uint x) { } + +#pragma rs reduce(my_char_3) accumulator(my_char_3_accum) combiner(combiner) +static void my_char_3_accum(int *accum, char in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_char_4) accumulator(my_char_4_accum) combiner(combiner) +static void my_char_4_accum(int *accum, char in, uint y) { } + +#pragma rs reduce(my_char_5) accumulator(my_char_5_accum) combiner(combiner) +static void my_char_5_accum(int *accum, char in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_char_6) accumulator(my_char_6_accum) combiner(combiner) +static void my_char_6_accum(int *accum, char in, uint x, uint y) { } + +#pragma rs reduce(my_char_7) accumulator(my_char_7_accum) combiner(combiner) +static void my_char_7_accum(int *accum, char in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_char_8) accumulator(my_char_8_accum) combiner(combiner) +static void my_char_8_accum(int *accum, char in, uint z) { } + +#pragma rs reduce(my_char_9) accumulator(my_char_9_accum) combiner(combiner) +static void my_char_9_accum(int *accum, char in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_char_10) accumulator(my_char_10_accum) combiner(combiner) +static void my_char_10_accum(int *accum, char in, uint x, uint z) { } + +#pragma rs reduce(my_char_11) accumulator(my_char_11_accum) combiner(combiner) +static void my_char_11_accum(int *accum, char in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_char_12) accumulator(my_char_12_accum) combiner(combiner) +static void my_char_12_accum(int *accum, char in, uint y, uint z) { } + +#pragma rs reduce(my_char_13) accumulator(my_char_13_accum) combiner(combiner) +static void my_char_13_accum(int *accum, char in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_char_14) accumulator(my_char_14_accum) combiner(combiner) +static void my_char_14_accum(int *accum, char in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_char_15) accumulator(my_char_15_accum) combiner(combiner) +static void my_char_15_accum(int *accum, char in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_char2_0) accumulator(my_char2_0_accum) combiner(combiner) +static void my_char2_0_accum(int *accum, char2 in) { } + +#pragma rs reduce(my_char2_1) accumulator(my_char2_1_accum) combiner(combiner) +static void my_char2_1_accum(int *accum, char2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_2) accumulator(my_char2_2_accum) combiner(combiner) +static void my_char2_2_accum(int *accum, char2 in, uint x) { } + +#pragma rs reduce(my_char2_3) accumulator(my_char2_3_accum) combiner(combiner) +static void my_char2_3_accum(int *accum, char2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_char2_4) accumulator(my_char2_4_accum) combiner(combiner) +static void my_char2_4_accum(int *accum, char2 in, uint y) { } + +#pragma rs reduce(my_char2_5) accumulator(my_char2_5_accum) combiner(combiner) +static void my_char2_5_accum(int *accum, char2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_char2_6) accumulator(my_char2_6_accum) combiner(combiner) +static void my_char2_6_accum(int *accum, char2 in, uint x, uint y) { } + +#pragma rs reduce(my_char2_7) accumulator(my_char2_7_accum) combiner(combiner) +static void my_char2_7_accum(int *accum, char2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_char2_8) accumulator(my_char2_8_accum) combiner(combiner) +static void my_char2_8_accum(int *accum, char2 in, uint z) { } + +#pragma rs reduce(my_char2_9) accumulator(my_char2_9_accum) combiner(combiner) +static void my_char2_9_accum(int *accum, char2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_char2_10) accumulator(my_char2_10_accum) combiner(combiner) +static void my_char2_10_accum(int *accum, char2 in, uint x, uint z) { } + +#pragma rs reduce(my_char2_11) accumulator(my_char2_11_accum) combiner(combiner) +static void my_char2_11_accum(int *accum, char2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_char2_12) accumulator(my_char2_12_accum) combiner(combiner) +static void my_char2_12_accum(int *accum, char2 in, uint y, uint z) { } + +#pragma rs reduce(my_char2_13) accumulator(my_char2_13_accum) combiner(combiner) +static void my_char2_13_accum(int *accum, char2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_char2_14) accumulator(my_char2_14_accum) combiner(combiner) +static void my_char2_14_accum(int *accum, char2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_char2_15) accumulator(my_char2_15_accum) combiner(combiner) +static void my_char2_15_accum(int *accum, char2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_char4_0) accumulator(my_char4_0_accum) combiner(combiner) +static void my_char4_0_accum(int *accum, char4 in) { } + +#pragma rs reduce(my_char4_1) accumulator(my_char4_1_accum) combiner(combiner) +static void my_char4_1_accum(int *accum, char4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_2) accumulator(my_char4_2_accum) combiner(combiner) +static void my_char4_2_accum(int *accum, char4 in, uint x) { } + +#pragma rs reduce(my_char4_3) accumulator(my_char4_3_accum) combiner(combiner) +static void my_char4_3_accum(int *accum, char4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_char4_4) accumulator(my_char4_4_accum) combiner(combiner) +static void my_char4_4_accum(int *accum, char4 in, uint y) { } + +#pragma rs reduce(my_char4_5) accumulator(my_char4_5_accum) combiner(combiner) +static void my_char4_5_accum(int *accum, char4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_char4_6) accumulator(my_char4_6_accum) combiner(combiner) +static void my_char4_6_accum(int *accum, char4 in, uint x, uint y) { } + +#pragma rs reduce(my_char4_7) accumulator(my_char4_7_accum) combiner(combiner) +static void my_char4_7_accum(int *accum, char4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_char4_8) accumulator(my_char4_8_accum) combiner(combiner) +static void my_char4_8_accum(int *accum, char4 in, uint z) { } + +#pragma rs reduce(my_char4_9) accumulator(my_char4_9_accum) combiner(combiner) +static void my_char4_9_accum(int *accum, char4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_char4_10) accumulator(my_char4_10_accum) combiner(combiner) +static void my_char4_10_accum(int *accum, char4 in, uint x, uint z) { } + +#pragma rs reduce(my_char4_11) accumulator(my_char4_11_accum) combiner(combiner) +static void my_char4_11_accum(int *accum, char4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_char4_12) accumulator(my_char4_12_accum) combiner(combiner) +static void my_char4_12_accum(int *accum, char4 in, uint y, uint z) { } + +#pragma rs reduce(my_char4_13) accumulator(my_char4_13_accum) combiner(combiner) +static void my_char4_13_accum(int *accum, char4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_char4_14) accumulator(my_char4_14_accum) combiner(combiner) +static void my_char4_14_accum(int *accum, char4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_char4_15) accumulator(my_char4_15_accum) combiner(combiner) +static void my_char4_15_accum(int *accum, char4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_short_0) accumulator(my_short_0_accum) combiner(combiner) +static void my_short_0_accum(int *accum, short in) { } + +#pragma rs reduce(my_short_1) accumulator(my_short_1_accum) combiner(combiner) +static void my_short_1_accum(int *accum, short in, rs_kernel_context context) { } + +#pragma rs reduce(my_short_2) accumulator(my_short_2_accum) combiner(combiner) +static void my_short_2_accum(int *accum, short in, uint x) { } + +#pragma rs reduce(my_short_3) accumulator(my_short_3_accum) combiner(combiner) +static void my_short_3_accum(int *accum, short in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_short_4) accumulator(my_short_4_accum) combiner(combiner) +static void my_short_4_accum(int *accum, short in, uint y) { } + +#pragma rs reduce(my_short_5) accumulator(my_short_5_accum) combiner(combiner) +static void my_short_5_accum(int *accum, short in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_short_6) accumulator(my_short_6_accum) combiner(combiner) +static void my_short_6_accum(int *accum, short in, uint x, uint y) { } + +#pragma rs reduce(my_short_7) accumulator(my_short_7_accum) combiner(combiner) +static void my_short_7_accum(int *accum, short in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_short_8) accumulator(my_short_8_accum) combiner(combiner) +static void my_short_8_accum(int *accum, short in, uint z) { } + +#pragma rs reduce(my_short_9) accumulator(my_short_9_accum) combiner(combiner) +static void my_short_9_accum(int *accum, short in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_short_10) accumulator(my_short_10_accum) combiner(combiner) +static void my_short_10_accum(int *accum, short in, uint x, uint z) { } + +#pragma rs reduce(my_short_11) accumulator(my_short_11_accum) combiner(combiner) +static void my_short_11_accum(int *accum, short in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_short_12) accumulator(my_short_12_accum) combiner(combiner) +static void my_short_12_accum(int *accum, short in, uint y, uint z) { } + +#pragma rs reduce(my_short_13) accumulator(my_short_13_accum) combiner(combiner) +static void my_short_13_accum(int *accum, short in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_short_14) accumulator(my_short_14_accum) combiner(combiner) +static void my_short_14_accum(int *accum, short in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_short_15) accumulator(my_short_15_accum) combiner(combiner) +static void my_short_15_accum(int *accum, short in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_short2_0) accumulator(my_short2_0_accum) combiner(combiner) +static void my_short2_0_accum(int *accum, short2 in) { } + +#pragma rs reduce(my_short2_1) accumulator(my_short2_1_accum) combiner(combiner) +static void my_short2_1_accum(int *accum, short2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_2) accumulator(my_short2_2_accum) combiner(combiner) +static void my_short2_2_accum(int *accum, short2 in, uint x) { } + +#pragma rs reduce(my_short2_3) accumulator(my_short2_3_accum) combiner(combiner) +static void my_short2_3_accum(int *accum, short2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_short2_4) accumulator(my_short2_4_accum) combiner(combiner) +static void my_short2_4_accum(int *accum, short2 in, uint y) { } + +#pragma rs reduce(my_short2_5) accumulator(my_short2_5_accum) combiner(combiner) +static void my_short2_5_accum(int *accum, short2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_short2_6) accumulator(my_short2_6_accum) combiner(combiner) +static void my_short2_6_accum(int *accum, short2 in, uint x, uint y) { } + +#pragma rs reduce(my_short2_7) accumulator(my_short2_7_accum) combiner(combiner) +static void my_short2_7_accum(int *accum, short2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_short2_8) accumulator(my_short2_8_accum) combiner(combiner) +static void my_short2_8_accum(int *accum, short2 in, uint z) { } + +#pragma rs reduce(my_short2_9) accumulator(my_short2_9_accum) combiner(combiner) +static void my_short2_9_accum(int *accum, short2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_short2_10) accumulator(my_short2_10_accum) combiner(combiner) +static void my_short2_10_accum(int *accum, short2 in, uint x, uint z) { } + +#pragma rs reduce(my_short2_11) accumulator(my_short2_11_accum) combiner(combiner) +static void my_short2_11_accum(int *accum, short2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_short2_12) accumulator(my_short2_12_accum) combiner(combiner) +static void my_short2_12_accum(int *accum, short2 in, uint y, uint z) { } + +#pragma rs reduce(my_short2_13) accumulator(my_short2_13_accum) combiner(combiner) +static void my_short2_13_accum(int *accum, short2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_short2_14) accumulator(my_short2_14_accum) combiner(combiner) +static void my_short2_14_accum(int *accum, short2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_short2_15) accumulator(my_short2_15_accum) combiner(combiner) +static void my_short2_15_accum(int *accum, short2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_short4_0) accumulator(my_short4_0_accum) combiner(combiner) +static void my_short4_0_accum(int *accum, short4 in) { } + +#pragma rs reduce(my_short4_1) accumulator(my_short4_1_accum) combiner(combiner) +static void my_short4_1_accum(int *accum, short4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_2) accumulator(my_short4_2_accum) combiner(combiner) +static void my_short4_2_accum(int *accum, short4 in, uint x) { } + +#pragma rs reduce(my_short4_3) accumulator(my_short4_3_accum) combiner(combiner) +static void my_short4_3_accum(int *accum, short4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_short4_4) accumulator(my_short4_4_accum) combiner(combiner) +static void my_short4_4_accum(int *accum, short4 in, uint y) { } + +#pragma rs reduce(my_short4_5) accumulator(my_short4_5_accum) combiner(combiner) +static void my_short4_5_accum(int *accum, short4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_short4_6) accumulator(my_short4_6_accum) combiner(combiner) +static void my_short4_6_accum(int *accum, short4 in, uint x, uint y) { } + +#pragma rs reduce(my_short4_7) accumulator(my_short4_7_accum) combiner(combiner) +static void my_short4_7_accum(int *accum, short4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_short4_8) accumulator(my_short4_8_accum) combiner(combiner) +static void my_short4_8_accum(int *accum, short4 in, uint z) { } + +#pragma rs reduce(my_short4_9) accumulator(my_short4_9_accum) combiner(combiner) +static void my_short4_9_accum(int *accum, short4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_short4_10) accumulator(my_short4_10_accum) combiner(combiner) +static void my_short4_10_accum(int *accum, short4 in, uint x, uint z) { } + +#pragma rs reduce(my_short4_11) accumulator(my_short4_11_accum) combiner(combiner) +static void my_short4_11_accum(int *accum, short4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_short4_12) accumulator(my_short4_12_accum) combiner(combiner) +static void my_short4_12_accum(int *accum, short4 in, uint y, uint z) { } + +#pragma rs reduce(my_short4_13) accumulator(my_short4_13_accum) combiner(combiner) +static void my_short4_13_accum(int *accum, short4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_short4_14) accumulator(my_short4_14_accum) combiner(combiner) +static void my_short4_14_accum(int *accum, short4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_short4_15) accumulator(my_short4_15_accum) combiner(combiner) +static void my_short4_15_accum(int *accum, short4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_int_0) accumulator(my_int_0_accum) combiner(combiner) +static void my_int_0_accum(int *accum, int in) { } + +#pragma rs reduce(my_int_1) accumulator(my_int_1_accum) combiner(combiner) +static void my_int_1_accum(int *accum, int in, rs_kernel_context context) { } + +#pragma rs reduce(my_int_2) accumulator(my_int_2_accum) combiner(combiner) +static void my_int_2_accum(int *accum, int in, uint x) { } + +#pragma rs reduce(my_int_3) accumulator(my_int_3_accum) combiner(combiner) +static void my_int_3_accum(int *accum, int in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_int_4) accumulator(my_int_4_accum) combiner(combiner) +static void my_int_4_accum(int *accum, int in, uint y) { } + +#pragma rs reduce(my_int_5) accumulator(my_int_5_accum) combiner(combiner) +static void my_int_5_accum(int *accum, int in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_int_6) accumulator(my_int_6_accum) combiner(combiner) +static void my_int_6_accum(int *accum, int in, uint x, uint y) { } + +#pragma rs reduce(my_int_7) accumulator(my_int_7_accum) combiner(combiner) +static void my_int_7_accum(int *accum, int in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_int_8) accumulator(my_int_8_accum) combiner(combiner) +static void my_int_8_accum(int *accum, int in, uint z) { } + +#pragma rs reduce(my_int_9) accumulator(my_int_9_accum) combiner(combiner) +static void my_int_9_accum(int *accum, int in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_int_10) accumulator(my_int_10_accum) combiner(combiner) +static void my_int_10_accum(int *accum, int in, uint x, uint z) { } + +#pragma rs reduce(my_int_11) accumulator(my_int_11_accum) combiner(combiner) +static void my_int_11_accum(int *accum, int in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_int_12) accumulator(my_int_12_accum) combiner(combiner) +static void my_int_12_accum(int *accum, int in, uint y, uint z) { } + +#pragma rs reduce(my_int_13) accumulator(my_int_13_accum) combiner(combiner) +static void my_int_13_accum(int *accum, int in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_int_14) accumulator(my_int_14_accum) combiner(combiner) +static void my_int_14_accum(int *accum, int in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_int_15) accumulator(my_int_15_accum) combiner(combiner) +static void my_int_15_accum(int *accum, int in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_int2_0) accumulator(my_int2_0_accum) combiner(combiner) +static void my_int2_0_accum(int *accum, int2 in) { } + +#pragma rs reduce(my_int2_1) accumulator(my_int2_1_accum) combiner(combiner) +static void my_int2_1_accum(int *accum, int2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_int2_2) accumulator(my_int2_2_accum) combiner(combiner) +static void my_int2_2_accum(int *accum, int2 in, uint x) { } + +#pragma rs reduce(my_int2_3) accumulator(my_int2_3_accum) combiner(combiner) +static void my_int2_3_accum(int *accum, int2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_int2_4) accumulator(my_int2_4_accum) combiner(combiner) +static void my_int2_4_accum(int *accum, int2 in, uint y) { } + +#pragma rs reduce(my_int2_5) accumulator(my_int2_5_accum) combiner(combiner) +static void my_int2_5_accum(int *accum, int2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_int2_6) accumulator(my_int2_6_accum) combiner(combiner) +static void my_int2_6_accum(int *accum, int2 in, uint x, uint y) { } + +#pragma rs reduce(my_int2_7) accumulator(my_int2_7_accum) combiner(combiner) +static void my_int2_7_accum(int *accum, int2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_int2_8) accumulator(my_int2_8_accum) combiner(combiner) +static void my_int2_8_accum(int *accum, int2 in, uint z) { } + +#pragma rs reduce(my_int2_9) accumulator(my_int2_9_accum) combiner(combiner) +static void my_int2_9_accum(int *accum, int2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_int2_10) accumulator(my_int2_10_accum) combiner(combiner) +static void my_int2_10_accum(int *accum, int2 in, uint x, uint z) { } + +#pragma rs reduce(my_int2_11) accumulator(my_int2_11_accum) combiner(combiner) +static void my_int2_11_accum(int *accum, int2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_int2_12) accumulator(my_int2_12_accum) combiner(combiner) +static void my_int2_12_accum(int *accum, int2 in, uint y, uint z) { } + +#pragma rs reduce(my_int2_13) accumulator(my_int2_13_accum) combiner(combiner) +static void my_int2_13_accum(int *accum, int2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_int2_14) accumulator(my_int2_14_accum) combiner(combiner) +static void my_int2_14_accum(int *accum, int2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_int2_15) accumulator(my_int2_15_accum) combiner(combiner) +static void my_int2_15_accum(int *accum, int2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_int4_0) accumulator(my_int4_0_accum) combiner(combiner) +static void my_int4_0_accum(int *accum, int4 in) { } + +#pragma rs reduce(my_int4_1) accumulator(my_int4_1_accum) combiner(combiner) +static void my_int4_1_accum(int *accum, int4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_int4_2) accumulator(my_int4_2_accum) combiner(combiner) +static void my_int4_2_accum(int *accum, int4 in, uint x) { } + +#pragma rs reduce(my_int4_3) accumulator(my_int4_3_accum) combiner(combiner) +static void my_int4_3_accum(int *accum, int4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_int4_4) accumulator(my_int4_4_accum) combiner(combiner) +static void my_int4_4_accum(int *accum, int4 in, uint y) { } + +#pragma rs reduce(my_int4_5) accumulator(my_int4_5_accum) combiner(combiner) +static void my_int4_5_accum(int *accum, int4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_int4_6) accumulator(my_int4_6_accum) combiner(combiner) +static void my_int4_6_accum(int *accum, int4 in, uint x, uint y) { } + +#pragma rs reduce(my_int4_7) accumulator(my_int4_7_accum) combiner(combiner) +static void my_int4_7_accum(int *accum, int4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_int4_8) accumulator(my_int4_8_accum) combiner(combiner) +static void my_int4_8_accum(int *accum, int4 in, uint z) { } + +#pragma rs reduce(my_int4_9) accumulator(my_int4_9_accum) combiner(combiner) +static void my_int4_9_accum(int *accum, int4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_int4_10) accumulator(my_int4_10_accum) combiner(combiner) +static void my_int4_10_accum(int *accum, int4 in, uint x, uint z) { } + +#pragma rs reduce(my_int4_11) accumulator(my_int4_11_accum) combiner(combiner) +static void my_int4_11_accum(int *accum, int4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_int4_12) accumulator(my_int4_12_accum) combiner(combiner) +static void my_int4_12_accum(int *accum, int4 in, uint y, uint z) { } + +#pragma rs reduce(my_int4_13) accumulator(my_int4_13_accum) combiner(combiner) +static void my_int4_13_accum(int *accum, int4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_int4_14) accumulator(my_int4_14_accum) combiner(combiner) +static void my_int4_14_accum(int *accum, int4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_int4_15) accumulator(my_int4_15_accum) combiner(combiner) +static void my_int4_15_accum(int *accum, int4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_long_0) accumulator(my_long_0_accum) combiner(combiner) +static void my_long_0_accum(int *accum, long in) { } + +#pragma rs reduce(my_long_1) accumulator(my_long_1_accum) combiner(combiner) +static void my_long_1_accum(int *accum, long in, rs_kernel_context context) { } + +#pragma rs reduce(my_long_2) accumulator(my_long_2_accum) combiner(combiner) +static void my_long_2_accum(int *accum, long in, uint x) { } + +#pragma rs reduce(my_long_3) accumulator(my_long_3_accum) combiner(combiner) +static void my_long_3_accum(int *accum, long in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_long_4) accumulator(my_long_4_accum) combiner(combiner) +static void my_long_4_accum(int *accum, long in, uint y) { } + +#pragma rs reduce(my_long_5) accumulator(my_long_5_accum) combiner(combiner) +static void my_long_5_accum(int *accum, long in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_long_6) accumulator(my_long_6_accum) combiner(combiner) +static void my_long_6_accum(int *accum, long in, uint x, uint y) { } + +#pragma rs reduce(my_long_7) accumulator(my_long_7_accum) combiner(combiner) +static void my_long_7_accum(int *accum, long in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_long_8) accumulator(my_long_8_accum) combiner(combiner) +static void my_long_8_accum(int *accum, long in, uint z) { } + +#pragma rs reduce(my_long_9) accumulator(my_long_9_accum) combiner(combiner) +static void my_long_9_accum(int *accum, long in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_long_10) accumulator(my_long_10_accum) combiner(combiner) +static void my_long_10_accum(int *accum, long in, uint x, uint z) { } + +#pragma rs reduce(my_long_11) accumulator(my_long_11_accum) combiner(combiner) +static void my_long_11_accum(int *accum, long in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_long_12) accumulator(my_long_12_accum) combiner(combiner) +static void my_long_12_accum(int *accum, long in, uint y, uint z) { } + +#pragma rs reduce(my_long_13) accumulator(my_long_13_accum) combiner(combiner) +static void my_long_13_accum(int *accum, long in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_long_14) accumulator(my_long_14_accum) combiner(combiner) +static void my_long_14_accum(int *accum, long in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_long_15) accumulator(my_long_15_accum) combiner(combiner) +static void my_long_15_accum(int *accum, long in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_long2_0) accumulator(my_long2_0_accum) combiner(combiner) +static void my_long2_0_accum(int *accum, long2 in) { } + +#pragma rs reduce(my_long2_1) accumulator(my_long2_1_accum) combiner(combiner) +static void my_long2_1_accum(int *accum, long2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_long2_2) accumulator(my_long2_2_accum) combiner(combiner) +static void my_long2_2_accum(int *accum, long2 in, uint x) { } + +#pragma rs reduce(my_long2_3) accumulator(my_long2_3_accum) combiner(combiner) +static void my_long2_3_accum(int *accum, long2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_long2_4) accumulator(my_long2_4_accum) combiner(combiner) +static void my_long2_4_accum(int *accum, long2 in, uint y) { } + +#pragma rs reduce(my_long2_5) accumulator(my_long2_5_accum) combiner(combiner) +static void my_long2_5_accum(int *accum, long2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_long2_6) accumulator(my_long2_6_accum) combiner(combiner) +static void my_long2_6_accum(int *accum, long2 in, uint x, uint y) { } + +#pragma rs reduce(my_long2_7) accumulator(my_long2_7_accum) combiner(combiner) +static void my_long2_7_accum(int *accum, long2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_long2_8) accumulator(my_long2_8_accum) combiner(combiner) +static void my_long2_8_accum(int *accum, long2 in, uint z) { } + +#pragma rs reduce(my_long2_9) accumulator(my_long2_9_accum) combiner(combiner) +static void my_long2_9_accum(int *accum, long2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_long2_10) accumulator(my_long2_10_accum) combiner(combiner) +static void my_long2_10_accum(int *accum, long2 in, uint x, uint z) { } + +#pragma rs reduce(my_long2_11) accumulator(my_long2_11_accum) combiner(combiner) +static void my_long2_11_accum(int *accum, long2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_long2_12) accumulator(my_long2_12_accum) combiner(combiner) +static void my_long2_12_accum(int *accum, long2 in, uint y, uint z) { } + +#pragma rs reduce(my_long2_13) accumulator(my_long2_13_accum) combiner(combiner) +static void my_long2_13_accum(int *accum, long2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_long2_14) accumulator(my_long2_14_accum) combiner(combiner) +static void my_long2_14_accum(int *accum, long2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_long2_15) accumulator(my_long2_15_accum) combiner(combiner) +static void my_long2_15_accum(int *accum, long2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_long4_0) accumulator(my_long4_0_accum) combiner(combiner) +static void my_long4_0_accum(int *accum, long4 in) { } + +#pragma rs reduce(my_long4_1) accumulator(my_long4_1_accum) combiner(combiner) +static void my_long4_1_accum(int *accum, long4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_long4_2) accumulator(my_long4_2_accum) combiner(combiner) +static void my_long4_2_accum(int *accum, long4 in, uint x) { } + +#pragma rs reduce(my_long4_3) accumulator(my_long4_3_accum) combiner(combiner) +static void my_long4_3_accum(int *accum, long4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_long4_4) accumulator(my_long4_4_accum) combiner(combiner) +static void my_long4_4_accum(int *accum, long4 in, uint y) { } + +#pragma rs reduce(my_long4_5) accumulator(my_long4_5_accum) combiner(combiner) +static void my_long4_5_accum(int *accum, long4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_long4_6) accumulator(my_long4_6_accum) combiner(combiner) +static void my_long4_6_accum(int *accum, long4 in, uint x, uint y) { } + +#pragma rs reduce(my_long4_7) accumulator(my_long4_7_accum) combiner(combiner) +static void my_long4_7_accum(int *accum, long4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_long4_8) accumulator(my_long4_8_accum) combiner(combiner) +static void my_long4_8_accum(int *accum, long4 in, uint z) { } + +#pragma rs reduce(my_long4_9) accumulator(my_long4_9_accum) combiner(combiner) +static void my_long4_9_accum(int *accum, long4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_long4_10) accumulator(my_long4_10_accum) combiner(combiner) +static void my_long4_10_accum(int *accum, long4 in, uint x, uint z) { } + +#pragma rs reduce(my_long4_11) accumulator(my_long4_11_accum) combiner(combiner) +static void my_long4_11_accum(int *accum, long4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_long4_12) accumulator(my_long4_12_accum) combiner(combiner) +static void my_long4_12_accum(int *accum, long4 in, uint y, uint z) { } + +#pragma rs reduce(my_long4_13) accumulator(my_long4_13_accum) combiner(combiner) +static void my_long4_13_accum(int *accum, long4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_long4_14) accumulator(my_long4_14_accum) combiner(combiner) +static void my_long4_14_accum(int *accum, long4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_long4_15) accumulator(my_long4_15_accum) combiner(combiner) +static void my_long4_15_accum(int *accum, long4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uchar_0) accumulator(my_uchar_0_accum) combiner(combiner) +static void my_uchar_0_accum(int *accum, uchar in) { } + +#pragma rs reduce(my_uchar_1) accumulator(my_uchar_1_accum) combiner(combiner) +static void my_uchar_1_accum(int *accum, uchar in, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_2) accumulator(my_uchar_2_accum) combiner(combiner) +static void my_uchar_2_accum(int *accum, uchar in, uint x) { } + +#pragma rs reduce(my_uchar_3) accumulator(my_uchar_3_accum) combiner(combiner) +static void my_uchar_3_accum(int *accum, uchar in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_uchar_4) accumulator(my_uchar_4_accum) combiner(combiner) +static void my_uchar_4_accum(int *accum, uchar in, uint y) { } + +#pragma rs reduce(my_uchar_5) accumulator(my_uchar_5_accum) combiner(combiner) +static void my_uchar_5_accum(int *accum, uchar in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_uchar_6) accumulator(my_uchar_6_accum) combiner(combiner) +static void my_uchar_6_accum(int *accum, uchar in, uint x, uint y) { } + +#pragma rs reduce(my_uchar_7) accumulator(my_uchar_7_accum) combiner(combiner) +static void my_uchar_7_accum(int *accum, uchar in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_uchar_8) accumulator(my_uchar_8_accum) combiner(combiner) +static void my_uchar_8_accum(int *accum, uchar in, uint z) { } + +#pragma rs reduce(my_uchar_9) accumulator(my_uchar_9_accum) combiner(combiner) +static void my_uchar_9_accum(int *accum, uchar in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_uchar_10) accumulator(my_uchar_10_accum) combiner(combiner) +static void my_uchar_10_accum(int *accum, uchar in, uint x, uint z) { } + +#pragma rs reduce(my_uchar_11) accumulator(my_uchar_11_accum) combiner(combiner) +static void my_uchar_11_accum(int *accum, uchar in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_uchar_12) accumulator(my_uchar_12_accum) combiner(combiner) +static void my_uchar_12_accum(int *accum, uchar in, uint y, uint z) { } + +#pragma rs reduce(my_uchar_13) accumulator(my_uchar_13_accum) combiner(combiner) +static void my_uchar_13_accum(int *accum, uchar in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_uchar_14) accumulator(my_uchar_14_accum) combiner(combiner) +static void my_uchar_14_accum(int *accum, uchar in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uchar_15) accumulator(my_uchar_15_accum) combiner(combiner) +static void my_uchar_15_accum(int *accum, uchar in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uchar2_0) accumulator(my_uchar2_0_accum) combiner(combiner) +static void my_uchar2_0_accum(int *accum, uchar2 in) { } + +#pragma rs reduce(my_uchar2_1) accumulator(my_uchar2_1_accum) combiner(combiner) +static void my_uchar2_1_accum(int *accum, uchar2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_2) accumulator(my_uchar2_2_accum) combiner(combiner) +static void my_uchar2_2_accum(int *accum, uchar2 in, uint x) { } + +#pragma rs reduce(my_uchar2_3) accumulator(my_uchar2_3_accum) combiner(combiner) +static void my_uchar2_3_accum(int *accum, uchar2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_uchar2_4) accumulator(my_uchar2_4_accum) combiner(combiner) +static void my_uchar2_4_accum(int *accum, uchar2 in, uint y) { } + +#pragma rs reduce(my_uchar2_5) accumulator(my_uchar2_5_accum) combiner(combiner) +static void my_uchar2_5_accum(int *accum, uchar2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_uchar2_6) accumulator(my_uchar2_6_accum) combiner(combiner) +static void my_uchar2_6_accum(int *accum, uchar2 in, uint x, uint y) { } + +#pragma rs reduce(my_uchar2_7) accumulator(my_uchar2_7_accum) combiner(combiner) +static void my_uchar2_7_accum(int *accum, uchar2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_uchar2_8) accumulator(my_uchar2_8_accum) combiner(combiner) +static void my_uchar2_8_accum(int *accum, uchar2 in, uint z) { } + +#pragma rs reduce(my_uchar2_9) accumulator(my_uchar2_9_accum) combiner(combiner) +static void my_uchar2_9_accum(int *accum, uchar2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_uchar2_10) accumulator(my_uchar2_10_accum) combiner(combiner) +static void my_uchar2_10_accum(int *accum, uchar2 in, uint x, uint z) { } + +#pragma rs reduce(my_uchar2_11) accumulator(my_uchar2_11_accum) combiner(combiner) +static void my_uchar2_11_accum(int *accum, uchar2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_uchar2_12) accumulator(my_uchar2_12_accum) combiner(combiner) +static void my_uchar2_12_accum(int *accum, uchar2 in, uint y, uint z) { } + +#pragma rs reduce(my_uchar2_13) accumulator(my_uchar2_13_accum) combiner(combiner) +static void my_uchar2_13_accum(int *accum, uchar2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_uchar2_14) accumulator(my_uchar2_14_accum) combiner(combiner) +static void my_uchar2_14_accum(int *accum, uchar2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uchar2_15) accumulator(my_uchar2_15_accum) combiner(combiner) +static void my_uchar2_15_accum(int *accum, uchar2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uchar4_0) accumulator(my_uchar4_0_accum) combiner(combiner) +static void my_uchar4_0_accum(int *accum, uchar4 in) { } + +#pragma rs reduce(my_uchar4_1) accumulator(my_uchar4_1_accum) combiner(combiner) +static void my_uchar4_1_accum(int *accum, uchar4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_2) accumulator(my_uchar4_2_accum) combiner(combiner) +static void my_uchar4_2_accum(int *accum, uchar4 in, uint x) { } + +#pragma rs reduce(my_uchar4_3) accumulator(my_uchar4_3_accum) combiner(combiner) +static void my_uchar4_3_accum(int *accum, uchar4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_uchar4_4) accumulator(my_uchar4_4_accum) combiner(combiner) +static void my_uchar4_4_accum(int *accum, uchar4 in, uint y) { } + +#pragma rs reduce(my_uchar4_5) accumulator(my_uchar4_5_accum) combiner(combiner) +static void my_uchar4_5_accum(int *accum, uchar4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_uchar4_6) accumulator(my_uchar4_6_accum) combiner(combiner) +static void my_uchar4_6_accum(int *accum, uchar4 in, uint x, uint y) { } + +#pragma rs reduce(my_uchar4_7) accumulator(my_uchar4_7_accum) combiner(combiner) +static void my_uchar4_7_accum(int *accum, uchar4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_uchar4_8) accumulator(my_uchar4_8_accum) combiner(combiner) +static void my_uchar4_8_accum(int *accum, uchar4 in, uint z) { } + +#pragma rs reduce(my_uchar4_9) accumulator(my_uchar4_9_accum) combiner(combiner) +static void my_uchar4_9_accum(int *accum, uchar4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_uchar4_10) accumulator(my_uchar4_10_accum) combiner(combiner) +static void my_uchar4_10_accum(int *accum, uchar4 in, uint x, uint z) { } + +#pragma rs reduce(my_uchar4_11) accumulator(my_uchar4_11_accum) combiner(combiner) +static void my_uchar4_11_accum(int *accum, uchar4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_uchar4_12) accumulator(my_uchar4_12_accum) combiner(combiner) +static void my_uchar4_12_accum(int *accum, uchar4 in, uint y, uint z) { } + +#pragma rs reduce(my_uchar4_13) accumulator(my_uchar4_13_accum) combiner(combiner) +static void my_uchar4_13_accum(int *accum, uchar4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_uchar4_14) accumulator(my_uchar4_14_accum) combiner(combiner) +static void my_uchar4_14_accum(int *accum, uchar4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uchar4_15) accumulator(my_uchar4_15_accum) combiner(combiner) +static void my_uchar4_15_accum(int *accum, uchar4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ushort_0) accumulator(my_ushort_0_accum) combiner(combiner) +static void my_ushort_0_accum(int *accum, ushort in) { } + +#pragma rs reduce(my_ushort_1) accumulator(my_ushort_1_accum) combiner(combiner) +static void my_ushort_1_accum(int *accum, ushort in, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_2) accumulator(my_ushort_2_accum) combiner(combiner) +static void my_ushort_2_accum(int *accum, ushort in, uint x) { } + +#pragma rs reduce(my_ushort_3) accumulator(my_ushort_3_accum) combiner(combiner) +static void my_ushort_3_accum(int *accum, ushort in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_ushort_4) accumulator(my_ushort_4_accum) combiner(combiner) +static void my_ushort_4_accum(int *accum, ushort in, uint y) { } + +#pragma rs reduce(my_ushort_5) accumulator(my_ushort_5_accum) combiner(combiner) +static void my_ushort_5_accum(int *accum, ushort in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_ushort_6) accumulator(my_ushort_6_accum) combiner(combiner) +static void my_ushort_6_accum(int *accum, ushort in, uint x, uint y) { } + +#pragma rs reduce(my_ushort_7) accumulator(my_ushort_7_accum) combiner(combiner) +static void my_ushort_7_accum(int *accum, ushort in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_ushort_8) accumulator(my_ushort_8_accum) combiner(combiner) +static void my_ushort_8_accum(int *accum, ushort in, uint z) { } + +#pragma rs reduce(my_ushort_9) accumulator(my_ushort_9_accum) combiner(combiner) +static void my_ushort_9_accum(int *accum, ushort in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_ushort_10) accumulator(my_ushort_10_accum) combiner(combiner) +static void my_ushort_10_accum(int *accum, ushort in, uint x, uint z) { } + +#pragma rs reduce(my_ushort_11) accumulator(my_ushort_11_accum) combiner(combiner) +static void my_ushort_11_accum(int *accum, ushort in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_ushort_12) accumulator(my_ushort_12_accum) combiner(combiner) +static void my_ushort_12_accum(int *accum, ushort in, uint y, uint z) { } + +#pragma rs reduce(my_ushort_13) accumulator(my_ushort_13_accum) combiner(combiner) +static void my_ushort_13_accum(int *accum, ushort in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_ushort_14) accumulator(my_ushort_14_accum) combiner(combiner) +static void my_ushort_14_accum(int *accum, ushort in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ushort_15) accumulator(my_ushort_15_accum) combiner(combiner) +static void my_ushort_15_accum(int *accum, ushort in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ushort2_0) accumulator(my_ushort2_0_accum) combiner(combiner) +static void my_ushort2_0_accum(int *accum, ushort2 in) { } + +#pragma rs reduce(my_ushort2_1) accumulator(my_ushort2_1_accum) combiner(combiner) +static void my_ushort2_1_accum(int *accum, ushort2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_2) accumulator(my_ushort2_2_accum) combiner(combiner) +static void my_ushort2_2_accum(int *accum, ushort2 in, uint x) { } + +#pragma rs reduce(my_ushort2_3) accumulator(my_ushort2_3_accum) combiner(combiner) +static void my_ushort2_3_accum(int *accum, ushort2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_ushort2_4) accumulator(my_ushort2_4_accum) combiner(combiner) +static void my_ushort2_4_accum(int *accum, ushort2 in, uint y) { } + +#pragma rs reduce(my_ushort2_5) accumulator(my_ushort2_5_accum) combiner(combiner) +static void my_ushort2_5_accum(int *accum, ushort2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_ushort2_6) accumulator(my_ushort2_6_accum) combiner(combiner) +static void my_ushort2_6_accum(int *accum, ushort2 in, uint x, uint y) { } + +#pragma rs reduce(my_ushort2_7) accumulator(my_ushort2_7_accum) combiner(combiner) +static void my_ushort2_7_accum(int *accum, ushort2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_ushort2_8) accumulator(my_ushort2_8_accum) combiner(combiner) +static void my_ushort2_8_accum(int *accum, ushort2 in, uint z) { } + +#pragma rs reduce(my_ushort2_9) accumulator(my_ushort2_9_accum) combiner(combiner) +static void my_ushort2_9_accum(int *accum, ushort2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_ushort2_10) accumulator(my_ushort2_10_accum) combiner(combiner) +static void my_ushort2_10_accum(int *accum, ushort2 in, uint x, uint z) { } + +#pragma rs reduce(my_ushort2_11) accumulator(my_ushort2_11_accum) combiner(combiner) +static void my_ushort2_11_accum(int *accum, ushort2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_ushort2_12) accumulator(my_ushort2_12_accum) combiner(combiner) +static void my_ushort2_12_accum(int *accum, ushort2 in, uint y, uint z) { } + +#pragma rs reduce(my_ushort2_13) accumulator(my_ushort2_13_accum) combiner(combiner) +static void my_ushort2_13_accum(int *accum, ushort2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_ushort2_14) accumulator(my_ushort2_14_accum) combiner(combiner) +static void my_ushort2_14_accum(int *accum, ushort2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ushort2_15) accumulator(my_ushort2_15_accum) combiner(combiner) +static void my_ushort2_15_accum(int *accum, ushort2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ushort4_0) accumulator(my_ushort4_0_accum) combiner(combiner) +static void my_ushort4_0_accum(int *accum, ushort4 in) { } + +#pragma rs reduce(my_ushort4_1) accumulator(my_ushort4_1_accum) combiner(combiner) +static void my_ushort4_1_accum(int *accum, ushort4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_2) accumulator(my_ushort4_2_accum) combiner(combiner) +static void my_ushort4_2_accum(int *accum, ushort4 in, uint x) { } + +#pragma rs reduce(my_ushort4_3) accumulator(my_ushort4_3_accum) combiner(combiner) +static void my_ushort4_3_accum(int *accum, ushort4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_ushort4_4) accumulator(my_ushort4_4_accum) combiner(combiner) +static void my_ushort4_4_accum(int *accum, ushort4 in, uint y) { } + +#pragma rs reduce(my_ushort4_5) accumulator(my_ushort4_5_accum) combiner(combiner) +static void my_ushort4_5_accum(int *accum, ushort4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_ushort4_6) accumulator(my_ushort4_6_accum) combiner(combiner) +static void my_ushort4_6_accum(int *accum, ushort4 in, uint x, uint y) { } + +#pragma rs reduce(my_ushort4_7) accumulator(my_ushort4_7_accum) combiner(combiner) +static void my_ushort4_7_accum(int *accum, ushort4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_ushort4_8) accumulator(my_ushort4_8_accum) combiner(combiner) +static void my_ushort4_8_accum(int *accum, ushort4 in, uint z) { } + +#pragma rs reduce(my_ushort4_9) accumulator(my_ushort4_9_accum) combiner(combiner) +static void my_ushort4_9_accum(int *accum, ushort4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_ushort4_10) accumulator(my_ushort4_10_accum) combiner(combiner) +static void my_ushort4_10_accum(int *accum, ushort4 in, uint x, uint z) { } + +#pragma rs reduce(my_ushort4_11) accumulator(my_ushort4_11_accum) combiner(combiner) +static void my_ushort4_11_accum(int *accum, ushort4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_ushort4_12) accumulator(my_ushort4_12_accum) combiner(combiner) +static void my_ushort4_12_accum(int *accum, ushort4 in, uint y, uint z) { } + +#pragma rs reduce(my_ushort4_13) accumulator(my_ushort4_13_accum) combiner(combiner) +static void my_ushort4_13_accum(int *accum, ushort4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_ushort4_14) accumulator(my_ushort4_14_accum) combiner(combiner) +static void my_ushort4_14_accum(int *accum, ushort4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ushort4_15) accumulator(my_ushort4_15_accum) combiner(combiner) +static void my_ushort4_15_accum(int *accum, ushort4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uint_0) accumulator(my_uint_0_accum) combiner(combiner) +static void my_uint_0_accum(int *accum, uint in) { } + +#pragma rs reduce(my_uint_1) accumulator(my_uint_1_accum) combiner(combiner) +static void my_uint_1_accum(int *accum, uint in, rs_kernel_context context) { } + +#pragma rs reduce(my_uint_2) accumulator(my_uint_2_accum) combiner(combiner) +static void my_uint_2_accum(int *accum, uint in, uint x) { } + +#pragma rs reduce(my_uint_3) accumulator(my_uint_3_accum) combiner(combiner) +static void my_uint_3_accum(int *accum, uint in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_uint_4) accumulator(my_uint_4_accum) combiner(combiner) +static void my_uint_4_accum(int *accum, uint in, uint y) { } + +#pragma rs reduce(my_uint_5) accumulator(my_uint_5_accum) combiner(combiner) +static void my_uint_5_accum(int *accum, uint in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_uint_6) accumulator(my_uint_6_accum) combiner(combiner) +static void my_uint_6_accum(int *accum, uint in, uint x, uint y) { } + +#pragma rs reduce(my_uint_7) accumulator(my_uint_7_accum) combiner(combiner) +static void my_uint_7_accum(int *accum, uint in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_uint_8) accumulator(my_uint_8_accum) combiner(combiner) +static void my_uint_8_accum(int *accum, uint in, uint z) { } + +#pragma rs reduce(my_uint_9) accumulator(my_uint_9_accum) combiner(combiner) +static void my_uint_9_accum(int *accum, uint in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_uint_10) accumulator(my_uint_10_accum) combiner(combiner) +static void my_uint_10_accum(int *accum, uint in, uint x, uint z) { } + +#pragma rs reduce(my_uint_11) accumulator(my_uint_11_accum) combiner(combiner) +static void my_uint_11_accum(int *accum, uint in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_uint_12) accumulator(my_uint_12_accum) combiner(combiner) +static void my_uint_12_accum(int *accum, uint in, uint y, uint z) { } + +#pragma rs reduce(my_uint_13) accumulator(my_uint_13_accum) combiner(combiner) +static void my_uint_13_accum(int *accum, uint in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_uint_14) accumulator(my_uint_14_accum) combiner(combiner) +static void my_uint_14_accum(int *accum, uint in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uint_15) accumulator(my_uint_15_accum) combiner(combiner) +static void my_uint_15_accum(int *accum, uint in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uint2_0) accumulator(my_uint2_0_accum) combiner(combiner) +static void my_uint2_0_accum(int *accum, uint2 in) { } + +#pragma rs reduce(my_uint2_1) accumulator(my_uint2_1_accum) combiner(combiner) +static void my_uint2_1_accum(int *accum, uint2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_uint2_2) accumulator(my_uint2_2_accum) combiner(combiner) +static void my_uint2_2_accum(int *accum, uint2 in, uint x) { } + +#pragma rs reduce(my_uint2_3) accumulator(my_uint2_3_accum) combiner(combiner) +static void my_uint2_3_accum(int *accum, uint2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_uint2_4) accumulator(my_uint2_4_accum) combiner(combiner) +static void my_uint2_4_accum(int *accum, uint2 in, uint y) { } + +#pragma rs reduce(my_uint2_5) accumulator(my_uint2_5_accum) combiner(combiner) +static void my_uint2_5_accum(int *accum, uint2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_uint2_6) accumulator(my_uint2_6_accum) combiner(combiner) +static void my_uint2_6_accum(int *accum, uint2 in, uint x, uint y) { } + +#pragma rs reduce(my_uint2_7) accumulator(my_uint2_7_accum) combiner(combiner) +static void my_uint2_7_accum(int *accum, uint2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_uint2_8) accumulator(my_uint2_8_accum) combiner(combiner) +static void my_uint2_8_accum(int *accum, uint2 in, uint z) { } + +#pragma rs reduce(my_uint2_9) accumulator(my_uint2_9_accum) combiner(combiner) +static void my_uint2_9_accum(int *accum, uint2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_uint2_10) accumulator(my_uint2_10_accum) combiner(combiner) +static void my_uint2_10_accum(int *accum, uint2 in, uint x, uint z) { } + +#pragma rs reduce(my_uint2_11) accumulator(my_uint2_11_accum) combiner(combiner) +static void my_uint2_11_accum(int *accum, uint2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_uint2_12) accumulator(my_uint2_12_accum) combiner(combiner) +static void my_uint2_12_accum(int *accum, uint2 in, uint y, uint z) { } + +#pragma rs reduce(my_uint2_13) accumulator(my_uint2_13_accum) combiner(combiner) +static void my_uint2_13_accum(int *accum, uint2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_uint2_14) accumulator(my_uint2_14_accum) combiner(combiner) +static void my_uint2_14_accum(int *accum, uint2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uint2_15) accumulator(my_uint2_15_accum) combiner(combiner) +static void my_uint2_15_accum(int *accum, uint2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uint4_0) accumulator(my_uint4_0_accum) combiner(combiner) +static void my_uint4_0_accum(int *accum, uint4 in) { } + +#pragma rs reduce(my_uint4_1) accumulator(my_uint4_1_accum) combiner(combiner) +static void my_uint4_1_accum(int *accum, uint4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_uint4_2) accumulator(my_uint4_2_accum) combiner(combiner) +static void my_uint4_2_accum(int *accum, uint4 in, uint x) { } + +#pragma rs reduce(my_uint4_3) accumulator(my_uint4_3_accum) combiner(combiner) +static void my_uint4_3_accum(int *accum, uint4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_uint4_4) accumulator(my_uint4_4_accum) combiner(combiner) +static void my_uint4_4_accum(int *accum, uint4 in, uint y) { } + +#pragma rs reduce(my_uint4_5) accumulator(my_uint4_5_accum) combiner(combiner) +static void my_uint4_5_accum(int *accum, uint4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_uint4_6) accumulator(my_uint4_6_accum) combiner(combiner) +static void my_uint4_6_accum(int *accum, uint4 in, uint x, uint y) { } + +#pragma rs reduce(my_uint4_7) accumulator(my_uint4_7_accum) combiner(combiner) +static void my_uint4_7_accum(int *accum, uint4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_uint4_8) accumulator(my_uint4_8_accum) combiner(combiner) +static void my_uint4_8_accum(int *accum, uint4 in, uint z) { } + +#pragma rs reduce(my_uint4_9) accumulator(my_uint4_9_accum) combiner(combiner) +static void my_uint4_9_accum(int *accum, uint4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_uint4_10) accumulator(my_uint4_10_accum) combiner(combiner) +static void my_uint4_10_accum(int *accum, uint4 in, uint x, uint z) { } + +#pragma rs reduce(my_uint4_11) accumulator(my_uint4_11_accum) combiner(combiner) +static void my_uint4_11_accum(int *accum, uint4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_uint4_12) accumulator(my_uint4_12_accum) combiner(combiner) +static void my_uint4_12_accum(int *accum, uint4 in, uint y, uint z) { } + +#pragma rs reduce(my_uint4_13) accumulator(my_uint4_13_accum) combiner(combiner) +static void my_uint4_13_accum(int *accum, uint4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_uint4_14) accumulator(my_uint4_14_accum) combiner(combiner) +static void my_uint4_14_accum(int *accum, uint4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_uint4_15) accumulator(my_uint4_15_accum) combiner(combiner) +static void my_uint4_15_accum(int *accum, uint4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ulong_0) accumulator(my_ulong_0_accum) combiner(combiner) +static void my_ulong_0_accum(int *accum, ulong in) { } + +#pragma rs reduce(my_ulong_1) accumulator(my_ulong_1_accum) combiner(combiner) +static void my_ulong_1_accum(int *accum, ulong in, rs_kernel_context context) { } + +#pragma rs reduce(my_ulong_2) accumulator(my_ulong_2_accum) combiner(combiner) +static void my_ulong_2_accum(int *accum, ulong in, uint x) { } + +#pragma rs reduce(my_ulong_3) accumulator(my_ulong_3_accum) combiner(combiner) +static void my_ulong_3_accum(int *accum, ulong in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_ulong_4) accumulator(my_ulong_4_accum) combiner(combiner) +static void my_ulong_4_accum(int *accum, ulong in, uint y) { } + +#pragma rs reduce(my_ulong_5) accumulator(my_ulong_5_accum) combiner(combiner) +static void my_ulong_5_accum(int *accum, ulong in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_ulong_6) accumulator(my_ulong_6_accum) combiner(combiner) +static void my_ulong_6_accum(int *accum, ulong in, uint x, uint y) { } + +#pragma rs reduce(my_ulong_7) accumulator(my_ulong_7_accum) combiner(combiner) +static void my_ulong_7_accum(int *accum, ulong in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_ulong_8) accumulator(my_ulong_8_accum) combiner(combiner) +static void my_ulong_8_accum(int *accum, ulong in, uint z) { } + +#pragma rs reduce(my_ulong_9) accumulator(my_ulong_9_accum) combiner(combiner) +static void my_ulong_9_accum(int *accum, ulong in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_ulong_10) accumulator(my_ulong_10_accum) combiner(combiner) +static void my_ulong_10_accum(int *accum, ulong in, uint x, uint z) { } + +#pragma rs reduce(my_ulong_11) accumulator(my_ulong_11_accum) combiner(combiner) +static void my_ulong_11_accum(int *accum, ulong in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_ulong_12) accumulator(my_ulong_12_accum) combiner(combiner) +static void my_ulong_12_accum(int *accum, ulong in, uint y, uint z) { } + +#pragma rs reduce(my_ulong_13) accumulator(my_ulong_13_accum) combiner(combiner) +static void my_ulong_13_accum(int *accum, ulong in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_ulong_14) accumulator(my_ulong_14_accum) combiner(combiner) +static void my_ulong_14_accum(int *accum, ulong in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ulong_15) accumulator(my_ulong_15_accum) combiner(combiner) +static void my_ulong_15_accum(int *accum, ulong in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ulong2_0) accumulator(my_ulong2_0_accum) combiner(combiner) +static void my_ulong2_0_accum(int *accum, ulong2 in) { } + +#pragma rs reduce(my_ulong2_1) accumulator(my_ulong2_1_accum) combiner(combiner) +static void my_ulong2_1_accum(int *accum, ulong2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_ulong2_2) accumulator(my_ulong2_2_accum) combiner(combiner) +static void my_ulong2_2_accum(int *accum, ulong2 in, uint x) { } + +#pragma rs reduce(my_ulong2_3) accumulator(my_ulong2_3_accum) combiner(combiner) +static void my_ulong2_3_accum(int *accum, ulong2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_ulong2_4) accumulator(my_ulong2_4_accum) combiner(combiner) +static void my_ulong2_4_accum(int *accum, ulong2 in, uint y) { } + +#pragma rs reduce(my_ulong2_5) accumulator(my_ulong2_5_accum) combiner(combiner) +static void my_ulong2_5_accum(int *accum, ulong2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_ulong2_6) accumulator(my_ulong2_6_accum) combiner(combiner) +static void my_ulong2_6_accum(int *accum, ulong2 in, uint x, uint y) { } + +#pragma rs reduce(my_ulong2_7) accumulator(my_ulong2_7_accum) combiner(combiner) +static void my_ulong2_7_accum(int *accum, ulong2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_ulong2_8) accumulator(my_ulong2_8_accum) combiner(combiner) +static void my_ulong2_8_accum(int *accum, ulong2 in, uint z) { } + +#pragma rs reduce(my_ulong2_9) accumulator(my_ulong2_9_accum) combiner(combiner) +static void my_ulong2_9_accum(int *accum, ulong2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_ulong2_10) accumulator(my_ulong2_10_accum) combiner(combiner) +static void my_ulong2_10_accum(int *accum, ulong2 in, uint x, uint z) { } + +#pragma rs reduce(my_ulong2_11) accumulator(my_ulong2_11_accum) combiner(combiner) +static void my_ulong2_11_accum(int *accum, ulong2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_ulong2_12) accumulator(my_ulong2_12_accum) combiner(combiner) +static void my_ulong2_12_accum(int *accum, ulong2 in, uint y, uint z) { } + +#pragma rs reduce(my_ulong2_13) accumulator(my_ulong2_13_accum) combiner(combiner) +static void my_ulong2_13_accum(int *accum, ulong2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_ulong2_14) accumulator(my_ulong2_14_accum) combiner(combiner) +static void my_ulong2_14_accum(int *accum, ulong2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ulong2_15) accumulator(my_ulong2_15_accum) combiner(combiner) +static void my_ulong2_15_accum(int *accum, ulong2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ulong4_0) accumulator(my_ulong4_0_accum) combiner(combiner) +static void my_ulong4_0_accum(int *accum, ulong4 in) { } + +#pragma rs reduce(my_ulong4_1) accumulator(my_ulong4_1_accum) combiner(combiner) +static void my_ulong4_1_accum(int *accum, ulong4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_ulong4_2) accumulator(my_ulong4_2_accum) combiner(combiner) +static void my_ulong4_2_accum(int *accum, ulong4 in, uint x) { } + +#pragma rs reduce(my_ulong4_3) accumulator(my_ulong4_3_accum) combiner(combiner) +static void my_ulong4_3_accum(int *accum, ulong4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_ulong4_4) accumulator(my_ulong4_4_accum) combiner(combiner) +static void my_ulong4_4_accum(int *accum, ulong4 in, uint y) { } + +#pragma rs reduce(my_ulong4_5) accumulator(my_ulong4_5_accum) combiner(combiner) +static void my_ulong4_5_accum(int *accum, ulong4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_ulong4_6) accumulator(my_ulong4_6_accum) combiner(combiner) +static void my_ulong4_6_accum(int *accum, ulong4 in, uint x, uint y) { } + +#pragma rs reduce(my_ulong4_7) accumulator(my_ulong4_7_accum) combiner(combiner) +static void my_ulong4_7_accum(int *accum, ulong4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_ulong4_8) accumulator(my_ulong4_8_accum) combiner(combiner) +static void my_ulong4_8_accum(int *accum, ulong4 in, uint z) { } + +#pragma rs reduce(my_ulong4_9) accumulator(my_ulong4_9_accum) combiner(combiner) +static void my_ulong4_9_accum(int *accum, ulong4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_ulong4_10) accumulator(my_ulong4_10_accum) combiner(combiner) +static void my_ulong4_10_accum(int *accum, ulong4 in, uint x, uint z) { } + +#pragma rs reduce(my_ulong4_11) accumulator(my_ulong4_11_accum) combiner(combiner) +static void my_ulong4_11_accum(int *accum, ulong4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_ulong4_12) accumulator(my_ulong4_12_accum) combiner(combiner) +static void my_ulong4_12_accum(int *accum, ulong4 in, uint y, uint z) { } + +#pragma rs reduce(my_ulong4_13) accumulator(my_ulong4_13_accum) combiner(combiner) +static void my_ulong4_13_accum(int *accum, ulong4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_ulong4_14) accumulator(my_ulong4_14_accum) combiner(combiner) +static void my_ulong4_14_accum(int *accum, ulong4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_ulong4_15) accumulator(my_ulong4_15_accum) combiner(combiner) +static void my_ulong4_15_accum(int *accum, ulong4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_bool_0) accumulator(my_bool_0_accum) combiner(combiner) +static void my_bool_0_accum(int *accum, bool in) { } + +#pragma rs reduce(my_bool_1) accumulator(my_bool_1_accum) combiner(combiner) +static void my_bool_1_accum(int *accum, bool in, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_2) accumulator(my_bool_2_accum) combiner(combiner) +static void my_bool_2_accum(int *accum, bool in, uint x) { } + +#pragma rs reduce(my_bool_3) accumulator(my_bool_3_accum) combiner(combiner) +static void my_bool_3_accum(int *accum, bool in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_bool_4) accumulator(my_bool_4_accum) combiner(combiner) +static void my_bool_4_accum(int *accum, bool in, uint y) { } + +#pragma rs reduce(my_bool_5) accumulator(my_bool_5_accum) combiner(combiner) +static void my_bool_5_accum(int *accum, bool in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_bool_6) accumulator(my_bool_6_accum) combiner(combiner) +static void my_bool_6_accum(int *accum, bool in, uint x, uint y) { } + +#pragma rs reduce(my_bool_7) accumulator(my_bool_7_accum) combiner(combiner) +static void my_bool_7_accum(int *accum, bool in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_bool_8) accumulator(my_bool_8_accum) combiner(combiner) +static void my_bool_8_accum(int *accum, bool in, uint z) { } + +#pragma rs reduce(my_bool_9) accumulator(my_bool_9_accum) combiner(combiner) +static void my_bool_9_accum(int *accum, bool in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_bool_10) accumulator(my_bool_10_accum) combiner(combiner) +static void my_bool_10_accum(int *accum, bool in, uint x, uint z) { } + +#pragma rs reduce(my_bool_11) accumulator(my_bool_11_accum) combiner(combiner) +static void my_bool_11_accum(int *accum, bool in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_bool_12) accumulator(my_bool_12_accum) combiner(combiner) +static void my_bool_12_accum(int *accum, bool in, uint y, uint z) { } + +#pragma rs reduce(my_bool_13) accumulator(my_bool_13_accum) combiner(combiner) +static void my_bool_13_accum(int *accum, bool in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_bool_14) accumulator(my_bool_14_accum) combiner(combiner) +static void my_bool_14_accum(int *accum, bool in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_bool_15) accumulator(my_bool_15_accum) combiner(combiner) +static void my_bool_15_accum(int *accum, bool in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_0) accumulator(my_rs_matrix2x2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_0_accum(int *accum, rs_matrix2x2 in) { } + +#pragma rs reduce(my_rs_matrix2x2_1) accumulator(my_rs_matrix2x2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_1_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_2) accumulator(my_rs_matrix2x2_2_accum) combiner(combiner) +static void my_rs_matrix2x2_2_accum(int *accum, rs_matrix2x2 in, uint x) { } + +#pragma rs reduce(my_rs_matrix2x2_3) accumulator(my_rs_matrix2x2_3_accum) combiner(combiner) +static void my_rs_matrix2x2_3_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_rs_matrix2x2_4) accumulator(my_rs_matrix2x2_4_accum) combiner(combiner) +static void my_rs_matrix2x2_4_accum(int *accum, rs_matrix2x2 in, uint y) { } + +#pragma rs reduce(my_rs_matrix2x2_5) accumulator(my_rs_matrix2x2_5_accum) combiner(combiner) +static void my_rs_matrix2x2_5_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_rs_matrix2x2_6) accumulator(my_rs_matrix2x2_6_accum) combiner(combiner) +static void my_rs_matrix2x2_6_accum(int *accum, rs_matrix2x2 in, uint x, uint y) { } + +#pragma rs reduce(my_rs_matrix2x2_7) accumulator(my_rs_matrix2x2_7_accum) combiner(combiner) +static void my_rs_matrix2x2_7_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_rs_matrix2x2_8) accumulator(my_rs_matrix2x2_8_accum) combiner(combiner) +static void my_rs_matrix2x2_8_accum(int *accum, rs_matrix2x2 in, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_9) accumulator(my_rs_matrix2x2_9_accum) combiner(combiner) +static void my_rs_matrix2x2_9_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_10) accumulator(my_rs_matrix2x2_10_accum) combiner(combiner) +static void my_rs_matrix2x2_10_accum(int *accum, rs_matrix2x2 in, uint x, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_11) accumulator(my_rs_matrix2x2_11_accum) combiner(combiner) +static void my_rs_matrix2x2_11_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_12) accumulator(my_rs_matrix2x2_12_accum) combiner(combiner) +static void my_rs_matrix2x2_12_accum(int *accum, rs_matrix2x2 in, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_13) accumulator(my_rs_matrix2x2_13_accum) combiner(combiner) +static void my_rs_matrix2x2_13_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_14) accumulator(my_rs_matrix2x2_14_accum) combiner(combiner) +static void my_rs_matrix2x2_14_accum(int *accum, rs_matrix2x2 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix2x2_15) accumulator(my_rs_matrix2x2_15_accum) combiner(combiner) +static void my_rs_matrix2x2_15_accum(int *accum, rs_matrix2x2 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_0) accumulator(my_rs_matrix3x3_0_accum) combiner(combiner) +static void my_rs_matrix3x3_0_accum(int *accum, rs_matrix3x3 in) { } + +#pragma rs reduce(my_rs_matrix3x3_1) accumulator(my_rs_matrix3x3_1_accum) combiner(combiner) +static void my_rs_matrix3x3_1_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix3x3_2) accumulator(my_rs_matrix3x3_2_accum) combiner(combiner) +static void my_rs_matrix3x3_2_accum(int *accum, rs_matrix3x3 in, uint x) { } + +#pragma rs reduce(my_rs_matrix3x3_3) accumulator(my_rs_matrix3x3_3_accum) combiner(combiner) +static void my_rs_matrix3x3_3_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_rs_matrix3x3_4) accumulator(my_rs_matrix3x3_4_accum) combiner(combiner) +static void my_rs_matrix3x3_4_accum(int *accum, rs_matrix3x3 in, uint y) { } + +#pragma rs reduce(my_rs_matrix3x3_5) accumulator(my_rs_matrix3x3_5_accum) combiner(combiner) +static void my_rs_matrix3x3_5_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_rs_matrix3x3_6) accumulator(my_rs_matrix3x3_6_accum) combiner(combiner) +static void my_rs_matrix3x3_6_accum(int *accum, rs_matrix3x3 in, uint x, uint y) { } + +#pragma rs reduce(my_rs_matrix3x3_7) accumulator(my_rs_matrix3x3_7_accum) combiner(combiner) +static void my_rs_matrix3x3_7_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_rs_matrix3x3_8) accumulator(my_rs_matrix3x3_8_accum) combiner(combiner) +static void my_rs_matrix3x3_8_accum(int *accum, rs_matrix3x3 in, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_9) accumulator(my_rs_matrix3x3_9_accum) combiner(combiner) +static void my_rs_matrix3x3_9_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_10) accumulator(my_rs_matrix3x3_10_accum) combiner(combiner) +static void my_rs_matrix3x3_10_accum(int *accum, rs_matrix3x3 in, uint x, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_11) accumulator(my_rs_matrix3x3_11_accum) combiner(combiner) +static void my_rs_matrix3x3_11_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_12) accumulator(my_rs_matrix3x3_12_accum) combiner(combiner) +static void my_rs_matrix3x3_12_accum(int *accum, rs_matrix3x3 in, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_13) accumulator(my_rs_matrix3x3_13_accum) combiner(combiner) +static void my_rs_matrix3x3_13_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_14) accumulator(my_rs_matrix3x3_14_accum) combiner(combiner) +static void my_rs_matrix3x3_14_accum(int *accum, rs_matrix3x3 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix3x3_15) accumulator(my_rs_matrix3x3_15_accum) combiner(combiner) +static void my_rs_matrix3x3_15_accum(int *accum, rs_matrix3x3 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_0) accumulator(my_rs_matrix4x4_0_accum) combiner(combiner) +static void my_rs_matrix4x4_0_accum(int *accum, rs_matrix4x4 in) { } + +#pragma rs reduce(my_rs_matrix4x4_1) accumulator(my_rs_matrix4x4_1_accum) combiner(combiner) +static void my_rs_matrix4x4_1_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix4x4_2) accumulator(my_rs_matrix4x4_2_accum) combiner(combiner) +static void my_rs_matrix4x4_2_accum(int *accum, rs_matrix4x4 in, uint x) { } + +#pragma rs reduce(my_rs_matrix4x4_3) accumulator(my_rs_matrix4x4_3_accum) combiner(combiner) +static void my_rs_matrix4x4_3_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_rs_matrix4x4_4) accumulator(my_rs_matrix4x4_4_accum) combiner(combiner) +static void my_rs_matrix4x4_4_accum(int *accum, rs_matrix4x4 in, uint y) { } + +#pragma rs reduce(my_rs_matrix4x4_5) accumulator(my_rs_matrix4x4_5_accum) combiner(combiner) +static void my_rs_matrix4x4_5_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_rs_matrix4x4_6) accumulator(my_rs_matrix4x4_6_accum) combiner(combiner) +static void my_rs_matrix4x4_6_accum(int *accum, rs_matrix4x4 in, uint x, uint y) { } + +#pragma rs reduce(my_rs_matrix4x4_7) accumulator(my_rs_matrix4x4_7_accum) combiner(combiner) +static void my_rs_matrix4x4_7_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_rs_matrix4x4_8) accumulator(my_rs_matrix4x4_8_accum) combiner(combiner) +static void my_rs_matrix4x4_8_accum(int *accum, rs_matrix4x4 in, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_9) accumulator(my_rs_matrix4x4_9_accum) combiner(combiner) +static void my_rs_matrix4x4_9_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_10) accumulator(my_rs_matrix4x4_10_accum) combiner(combiner) +static void my_rs_matrix4x4_10_accum(int *accum, rs_matrix4x4 in, uint x, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_11) accumulator(my_rs_matrix4x4_11_accum) combiner(combiner) +static void my_rs_matrix4x4_11_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_12) accumulator(my_rs_matrix4x4_12_accum) combiner(combiner) +static void my_rs_matrix4x4_12_accum(int *accum, rs_matrix4x4 in, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_13) accumulator(my_rs_matrix4x4_13_accum) combiner(combiner) +static void my_rs_matrix4x4_13_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_14) accumulator(my_rs_matrix4x4_14_accum) combiner(combiner) +static void my_rs_matrix4x4_14_accum(int *accum, rs_matrix4x4 in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_rs_matrix4x4_15) accumulator(my_rs_matrix4x4_15_accum) combiner(combiner) +static void my_rs_matrix4x4_15_accum(int *accum, rs_matrix4x4 in, rs_kernel_context context, uint x, uint y, uint z) { } + +#pragma rs reduce(my_MyStruct_0) accumulator(my_MyStruct_0_accum) combiner(combiner) +static void my_MyStruct_0_accum(int *accum, MyStruct in) { } + +#pragma rs reduce(my_MyStruct_1) accumulator(my_MyStruct_1_accum) combiner(combiner) +static void my_MyStruct_1_accum(int *accum, MyStruct in, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_2) accumulator(my_MyStruct_2_accum) combiner(combiner) +static void my_MyStruct_2_accum(int *accum, MyStruct in, uint x) { } + +#pragma rs reduce(my_MyStruct_3) accumulator(my_MyStruct_3_accum) combiner(combiner) +static void my_MyStruct_3_accum(int *accum, MyStruct in, rs_kernel_context context, uint x) { } + +#pragma rs reduce(my_MyStruct_4) accumulator(my_MyStruct_4_accum) combiner(combiner) +static void my_MyStruct_4_accum(int *accum, MyStruct in, uint y) { } + +#pragma rs reduce(my_MyStruct_5) accumulator(my_MyStruct_5_accum) combiner(combiner) +static void my_MyStruct_5_accum(int *accum, MyStruct in, rs_kernel_context context, uint y) { } + +#pragma rs reduce(my_MyStruct_6) accumulator(my_MyStruct_6_accum) combiner(combiner) +static void my_MyStruct_6_accum(int *accum, MyStruct in, uint x, uint y) { } + +#pragma rs reduce(my_MyStruct_7) accumulator(my_MyStruct_7_accum) combiner(combiner) +static void my_MyStruct_7_accum(int *accum, MyStruct in, rs_kernel_context context, uint x, uint y) { } + +#pragma rs reduce(my_MyStruct_8) accumulator(my_MyStruct_8_accum) combiner(combiner) +static void my_MyStruct_8_accum(int *accum, MyStruct in, uint z) { } + +#pragma rs reduce(my_MyStruct_9) accumulator(my_MyStruct_9_accum) combiner(combiner) +static void my_MyStruct_9_accum(int *accum, MyStruct in, rs_kernel_context context, uint z) { } + +#pragma rs reduce(my_MyStruct_10) accumulator(my_MyStruct_10_accum) combiner(combiner) +static void my_MyStruct_10_accum(int *accum, MyStruct in, uint x, uint z) { } + +#pragma rs reduce(my_MyStruct_11) accumulator(my_MyStruct_11_accum) combiner(combiner) +static void my_MyStruct_11_accum(int *accum, MyStruct in, rs_kernel_context context, uint x, uint z) { } + +#pragma rs reduce(my_MyStruct_12) accumulator(my_MyStruct_12_accum) combiner(combiner) +static void my_MyStruct_12_accum(int *accum, MyStruct in, uint y, uint z) { } + +#pragma rs reduce(my_MyStruct_13) accumulator(my_MyStruct_13_accum) combiner(combiner) +static void my_MyStruct_13_accum(int *accum, MyStruct in, rs_kernel_context context, uint y, uint z) { } + +#pragma rs reduce(my_MyStruct_14) accumulator(my_MyStruct_14_accum) combiner(combiner) +static void my_MyStruct_14_accum(int *accum, MyStruct in, uint x, uint y, uint z) { } + +#pragma rs reduce(my_MyStruct_15) accumulator(my_MyStruct_15_accum) combiner(combiner) +static void my_MyStruct_15_accum(int *accum, MyStruct in, rs_kernel_context context, uint x, uint y, uint z) { }
diff --git a/slang/tests/P_reduce_general_input/stderr.txt.expect b/slang/tests/P_reduce_general_input/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_input/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_input/stdout.txt.expect b/slang/tests/P_reduce_general_input/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_input/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_inputs/ScriptC_reduce_general_inputs.java.expect b/slang/tests/P_reduce_general_inputs/ScriptC_reduce_general_inputs.java.expect new file mode 100644 index 0000000..05b80ad --- /dev/null +++ b/slang/tests/P_reduce_general_inputs/ScriptC_reduce_general_inputs.java.expect
@@ -0,0 +1,55645 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_inputs.rs + */ + +package inputs; + +import android.renderscript.*; +import inputs.reduce_general_inputsBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_inputs extends ScriptC { + private static final String __rs_resource_name = "reduce_general_inputs"; + // Constructor + public ScriptC_reduce_general_inputs(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_inputsBitCode.getBitCode32(), + reduce_general_inputsBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + __F16 = Element.F16(rs); + __F16_2 = Element.F16_2(rs); + __F16_4 = Element.F16_4(rs); + __F32 = Element.F32(rs); + __F32_2 = Element.F32_2(rs); + __F32_4 = Element.F32_4(rs); + __I8 = Element.I8(rs); + __I8_2 = Element.I8_2(rs); + __I8_4 = Element.I8_4(rs); + __I16 = Element.I16(rs); + __I16_2 = Element.I16_2(rs); + __I16_4 = Element.I16_4(rs); + __U8 = Element.U8(rs); + __U8_2 = Element.U8_2(rs); + __U8_4 = Element.U8_4(rs); + __U16 = Element.U16(rs); + __U16_2 = Element.U16_2(rs); + __U16_4 = Element.U16_4(rs); + __BOOLEAN = Element.BOOLEAN(rs); + __ScriptField_MyStruct = ScriptField_MyStruct.createElement(rs); + } + + private Element __BOOLEAN; + private Element __F16; + private Element __F16_2; + private Element __F16_4; + private Element __F32; + private Element __F32_2; + private Element __F32_4; + private Element __I16; + private Element __I16_2; + private Element __I16_4; + private Element __I32; + private Element __I8; + private Element __I8_2; + private Element __I8_4; + private Element __ScriptField_MyStruct; + private Element __U16; + private Element __U16_2; + private Element __U16_4; + private Element __U8; + private Element __U8_2; + private Element __U8_4; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + private final static int mExportReduceIdx_my_half_half_0 = 0; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "half b" + public result_int reduce_my_half_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_half_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "half b" + public result_int reduce_my_half_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_half_1 = 1; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "half b" + public result_int reduce_my_half_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_half_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "half b" + public result_int reduce_my_half_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_half2_0 = 2; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "half2 b" + public result_int reduce_my_half_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_half2_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "half2 b" + public result_int reduce_my_half_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_half2_1 = 3; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "half2 b" + public result_int reduce_my_half_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_half2_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "half2 b" + public result_int reduce_my_half_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_half4_0 = 4; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "half4 b" + public result_int reduce_my_half_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_half4_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "half4 b" + public result_int reduce_my_half_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_half4_1 = 5; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "half4 b" + public result_int reduce_my_half_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_half4_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "half4 b" + public result_int reduce_my_half_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_float_0 = 6; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "float b" + public result_int reduce_my_half_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_float_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "float b" + public result_int reduce_my_half_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_float_1 = 7; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "float b" + public result_int reduce_my_half_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_float_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "float b" + public result_int reduce_my_half_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_float2_0 = 8; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "float2 b" + public result_int reduce_my_half_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_float2_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "float2 b" + public result_int reduce_my_half_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_float2_1 = 9; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "float2 b" + public result_int reduce_my_half_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_float2_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "float2 b" + public result_int reduce_my_half_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_float4_0 = 10; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "float4 b" + public result_int reduce_my_half_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_float4_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "float4 b" + public result_int reduce_my_half_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_float4_1 = 11; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "float4 b" + public result_int reduce_my_half_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_float4_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "float4 b" + public result_int reduce_my_half_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_char_0 = 12; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "char b" + public result_int reduce_my_half_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_char_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "char b" + public result_int reduce_my_half_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_char_1 = 13; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "char b" + public result_int reduce_my_half_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_char_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "char b" + public result_int reduce_my_half_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_char2_0 = 14; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "char2 b" + public result_int reduce_my_half_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_char2_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "char2 b" + public result_int reduce_my_half_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_char2_1 = 15; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "char2 b" + public result_int reduce_my_half_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_char2_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "char2 b" + public result_int reduce_my_half_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_char4_0 = 16; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "char4 b" + public result_int reduce_my_half_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_char4_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "char4 b" + public result_int reduce_my_half_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_char4_1 = 17; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "char4 b" + public result_int reduce_my_half_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_char4_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "char4 b" + public result_int reduce_my_half_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_short_0 = 18; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "short b" + public result_int reduce_my_half_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_short_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "short b" + public result_int reduce_my_half_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_short_1 = 19; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "short b" + public result_int reduce_my_half_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_short_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "short b" + public result_int reduce_my_half_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_short2_0 = 20; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "short2 b" + public result_int reduce_my_half_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_short2_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "short2 b" + public result_int reduce_my_half_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_short2_1 = 21; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "short2 b" + public result_int reduce_my_half_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_short2_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "short2 b" + public result_int reduce_my_half_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_short4_0 = 22; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "short4 b" + public result_int reduce_my_half_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_short4_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "short4 b" + public result_int reduce_my_half_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_short4_1 = 23; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "short4 b" + public result_int reduce_my_half_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_short4_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "short4 b" + public result_int reduce_my_half_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_uchar_0 = 24; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "uchar b" + public result_int reduce_my_half_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_uchar_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "uchar b" + public result_int reduce_my_half_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_uchar_1 = 25; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "uchar b" + public result_int reduce_my_half_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_uchar_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "uchar b" + public result_int reduce_my_half_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_uchar2_0 = 26; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "uchar2 b" + public result_int reduce_my_half_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_uchar2_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "uchar2 b" + public result_int reduce_my_half_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_uchar2_1 = 27; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "uchar2 b" + public result_int reduce_my_half_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_uchar2_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "uchar2 b" + public result_int reduce_my_half_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_uchar4_0 = 28; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "uchar4 b" + public result_int reduce_my_half_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_uchar4_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "uchar4 b" + public result_int reduce_my_half_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_uchar4_1 = 29; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "uchar4 b" + public result_int reduce_my_half_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_uchar4_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "uchar4 b" + public result_int reduce_my_half_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_ushort_0 = 30; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "ushort b" + public result_int reduce_my_half_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_ushort_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "ushort b" + public result_int reduce_my_half_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_ushort_1 = 31; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "ushort b" + public result_int reduce_my_half_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_ushort_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "ushort b" + public result_int reduce_my_half_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_ushort2_0 = 32; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "ushort2 b" + public result_int reduce_my_half_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_ushort2_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "ushort2 b" + public result_int reduce_my_half_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_ushort2_1 = 33; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "ushort2 b" + public result_int reduce_my_half_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_ushort2_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "ushort2 b" + public result_int reduce_my_half_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_ushort4_0 = 34; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "ushort4 b" + public result_int reduce_my_half_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_ushort4_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "ushort4 b" + public result_int reduce_my_half_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_ushort4_1 = 35; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "ushort4 b" + public result_int reduce_my_half_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_ushort4_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "ushort4 b" + public result_int reduce_my_half_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_bool_0 = 36; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "bool b" + public result_int reduce_my_half_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_bool_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "bool b" + public result_int reduce_my_half_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_bool_1 = 37; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_half_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half a" + // ain2 = "bool b" + public result_int reduce_my_half_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_bool_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "bool b" + public result_int reduce_my_half_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_rs_matrix2x2_0 = 38; + // ain1 = "half a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_rs_matrix2x2_1 = 39; + // ain1 = "half a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_MyStruct_0 = 40; + // ain1 = "half a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_half_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half_MyStruct_1 = 41; + // ain1 = "half a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_half_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "half a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_half_0 = 42; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "half b" + public result_int reduce_my_half2_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_half_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "half b" + public result_int reduce_my_half2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_half_1 = 43; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "half b" + public result_int reduce_my_half2_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_half_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "half b" + public result_int reduce_my_half2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_half2_0 = 44; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "half2 b" + public result_int reduce_my_half2_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_half2_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "half2 b" + public result_int reduce_my_half2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_half2_1 = 45; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "half2 b" + public result_int reduce_my_half2_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_half2_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "half2 b" + public result_int reduce_my_half2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_half4_0 = 46; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "half4 b" + public result_int reduce_my_half2_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_half4_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "half4 b" + public result_int reduce_my_half2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_half4_1 = 47; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "half4 b" + public result_int reduce_my_half2_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_half4_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "half4 b" + public result_int reduce_my_half2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_float_0 = 48; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "float b" + public result_int reduce_my_half2_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_float_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "float b" + public result_int reduce_my_half2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_float_1 = 49; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "float b" + public result_int reduce_my_half2_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_float_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "float b" + public result_int reduce_my_half2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_float2_0 = 50; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "float2 b" + public result_int reduce_my_half2_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_float2_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "float2 b" + public result_int reduce_my_half2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_float2_1 = 51; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "float2 b" + public result_int reduce_my_half2_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_float2_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "float2 b" + public result_int reduce_my_half2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_float4_0 = 52; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "float4 b" + public result_int reduce_my_half2_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_float4_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "float4 b" + public result_int reduce_my_half2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_float4_1 = 53; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "float4 b" + public result_int reduce_my_half2_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_float4_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "float4 b" + public result_int reduce_my_half2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_char_0 = 54; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "char b" + public result_int reduce_my_half2_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_char_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "char b" + public result_int reduce_my_half2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_char_1 = 55; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "char b" + public result_int reduce_my_half2_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_char_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "char b" + public result_int reduce_my_half2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_char2_0 = 56; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "char2 b" + public result_int reduce_my_half2_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_char2_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "char2 b" + public result_int reduce_my_half2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_char2_1 = 57; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "char2 b" + public result_int reduce_my_half2_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_char2_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "char2 b" + public result_int reduce_my_half2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_char4_0 = 58; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "char4 b" + public result_int reduce_my_half2_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_char4_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "char4 b" + public result_int reduce_my_half2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_char4_1 = 59; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "char4 b" + public result_int reduce_my_half2_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_char4_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "char4 b" + public result_int reduce_my_half2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_short_0 = 60; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "short b" + public result_int reduce_my_half2_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_short_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "short b" + public result_int reduce_my_half2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_short_1 = 61; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "short b" + public result_int reduce_my_half2_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_short_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "short b" + public result_int reduce_my_half2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_short2_0 = 62; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "short2 b" + public result_int reduce_my_half2_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_short2_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "short2 b" + public result_int reduce_my_half2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_short2_1 = 63; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "short2 b" + public result_int reduce_my_half2_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_short2_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "short2 b" + public result_int reduce_my_half2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_short4_0 = 64; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "short4 b" + public result_int reduce_my_half2_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_short4_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "short4 b" + public result_int reduce_my_half2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_short4_1 = 65; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "short4 b" + public result_int reduce_my_half2_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_short4_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "short4 b" + public result_int reduce_my_half2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_uchar_0 = 66; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "uchar b" + public result_int reduce_my_half2_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_uchar_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "uchar b" + public result_int reduce_my_half2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_uchar_1 = 67; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "uchar b" + public result_int reduce_my_half2_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_uchar_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "uchar b" + public result_int reduce_my_half2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_uchar2_0 = 68; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half2_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_uchar2_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_uchar2_1 = 69; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half2_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_uchar2_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_uchar4_0 = 70; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half2_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_uchar4_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_uchar4_1 = 71; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half2_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_uchar4_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_ushort_0 = 72; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "ushort b" + public result_int reduce_my_half2_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_ushort_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "ushort b" + public result_int reduce_my_half2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_ushort_1 = 73; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "ushort b" + public result_int reduce_my_half2_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_ushort_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "ushort b" + public result_int reduce_my_half2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_ushort2_0 = 74; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half2_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_ushort2_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_ushort2_1 = 75; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half2_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half2_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_ushort2_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_ushort4_0 = 76; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half2_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_ushort4_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_ushort4_1 = 77; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half2_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half2_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_ushort4_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_bool_0 = 78; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "bool b" + public result_int reduce_my_half2_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_bool_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "bool b" + public result_int reduce_my_half2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_bool_1 = 79; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_half2_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half2_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half2 a" + // ain2 = "bool b" + public result_int reduce_my_half2_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_bool_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "bool b" + public result_int reduce_my_half2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_rs_matrix2x2_0 = 80; + // ain1 = "half2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_rs_matrix2x2_1 = 81; + // ain1 = "half2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_MyStruct_0 = 82; + // ain1 = "half2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half2_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_half2_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half2_MyStruct_1 = 83; + // ain1 = "half2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half2_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_half2_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "half2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_half_0 = 84; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "half b" + public result_int reduce_my_half4_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_half_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "half b" + public result_int reduce_my_half4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_half_1 = 85; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "half b" + public result_int reduce_my_half4_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_half_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "half b" + public result_int reduce_my_half4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_half2_0 = 86; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "half2 b" + public result_int reduce_my_half4_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_half2_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "half2 b" + public result_int reduce_my_half4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_half2_1 = 87; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "half2 b" + public result_int reduce_my_half4_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_half2_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "half2 b" + public result_int reduce_my_half4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_half4_0 = 88; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "half4 b" + public result_int reduce_my_half4_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_half4_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "half4 b" + public result_int reduce_my_half4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_half4_1 = 89; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "half4 b" + public result_int reduce_my_half4_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_half4_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "half4 b" + public result_int reduce_my_half4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_float_0 = 90; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "float b" + public result_int reduce_my_half4_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_float_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "float b" + public result_int reduce_my_half4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_float_1 = 91; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "float b" + public result_int reduce_my_half4_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_float_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "float b" + public result_int reduce_my_half4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_float2_0 = 92; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "float2 b" + public result_int reduce_my_half4_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_float2_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "float2 b" + public result_int reduce_my_half4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_float2_1 = 93; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "float2 b" + public result_int reduce_my_half4_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_float2_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "float2 b" + public result_int reduce_my_half4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_float4_0 = 94; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "float4 b" + public result_int reduce_my_half4_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_float4_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "float4 b" + public result_int reduce_my_half4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_float4_1 = 95; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "float4 b" + public result_int reduce_my_half4_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_float4_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "float4 b" + public result_int reduce_my_half4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_char_0 = 96; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "char b" + public result_int reduce_my_half4_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_char_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "char b" + public result_int reduce_my_half4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_char_1 = 97; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "char b" + public result_int reduce_my_half4_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_char_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "char b" + public result_int reduce_my_half4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_char2_0 = 98; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "char2 b" + public result_int reduce_my_half4_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_char2_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "char2 b" + public result_int reduce_my_half4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_char2_1 = 99; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "char2 b" + public result_int reduce_my_half4_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_char2_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "char2 b" + public result_int reduce_my_half4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_char4_0 = 100; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "char4 b" + public result_int reduce_my_half4_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_char4_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "char4 b" + public result_int reduce_my_half4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_char4_1 = 101; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "char4 b" + public result_int reduce_my_half4_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_char4_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "char4 b" + public result_int reduce_my_half4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_short_0 = 102; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "short b" + public result_int reduce_my_half4_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_short_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "short b" + public result_int reduce_my_half4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_short_1 = 103; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "short b" + public result_int reduce_my_half4_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_short_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "short b" + public result_int reduce_my_half4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_short2_0 = 104; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "short2 b" + public result_int reduce_my_half4_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_short2_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "short2 b" + public result_int reduce_my_half4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_short2_1 = 105; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "short2 b" + public result_int reduce_my_half4_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_short2_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "short2 b" + public result_int reduce_my_half4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_short4_0 = 106; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "short4 b" + public result_int reduce_my_half4_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_short4_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "short4 b" + public result_int reduce_my_half4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_short4_1 = 107; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "short4 b" + public result_int reduce_my_half4_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_short4_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "short4 b" + public result_int reduce_my_half4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_uchar_0 = 108; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "uchar b" + public result_int reduce_my_half4_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_uchar_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "uchar b" + public result_int reduce_my_half4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_uchar_1 = 109; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "uchar b" + public result_int reduce_my_half4_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_uchar_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "uchar b" + public result_int reduce_my_half4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_uchar2_0 = 110; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half4_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_uchar2_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_uchar2_1 = 111; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half4_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_uchar2_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_half4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_uchar4_0 = 112; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half4_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_uchar4_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_uchar4_1 = 113; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half4_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_uchar4_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_half4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_ushort_0 = 114; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "ushort b" + public result_int reduce_my_half4_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_ushort_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "ushort b" + public result_int reduce_my_half4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_ushort_1 = 115; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "ushort b" + public result_int reduce_my_half4_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_ushort_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "ushort b" + public result_int reduce_my_half4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_ushort2_0 = 116; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half4_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_ushort2_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_ushort2_1 = 117; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_half4_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half4_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_ushort2_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_half4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_ushort4_0 = 118; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half4_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_ushort4_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_ushort4_1 = 119; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_half4_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half4_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_ushort4_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_half4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_bool_0 = 120; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "bool b" + public result_int reduce_my_half4_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_bool_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "bool b" + public result_int reduce_my_half4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_bool_1 = 121; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_half4_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_half4_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "half4 a" + // ain2 = "bool b" + public result_int reduce_my_half4_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_bool_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "bool b" + public result_int reduce_my_half4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_rs_matrix2x2_0 = 122; + // ain1 = "half4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_rs_matrix2x2_1 = 123; + // ain1 = "half4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_half4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_MyStruct_0 = 124; + // ain1 = "half4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half4_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_half4_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_half4_MyStruct_1 = 125; + // ain1 = "half4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half4_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_half4_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "half4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_half4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_half_0 = 126; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_half_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "half b" + public result_int reduce_my_float_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_half_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "half b" + public result_int reduce_my_float_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_half_1 = 127; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_half_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "half b" + public result_int reduce_my_float_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_half_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "half b" + public result_int reduce_my_float_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_half2_0 = 128; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_half2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "half2 b" + public result_int reduce_my_float_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_half2_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "half2 b" + public result_int reduce_my_float_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_half2_1 = 129; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_half2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "half2 b" + public result_int reduce_my_float_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_half2_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "half2 b" + public result_int reduce_my_float_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_half4_0 = 130; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_half4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "half4 b" + public result_int reduce_my_float_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_half4_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "half4 b" + public result_int reduce_my_float_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_half4_1 = 131; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_half4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "half4 b" + public result_int reduce_my_float_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_half4_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "half4 b" + public result_int reduce_my_float_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_float_0 = 132; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_float_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "float b" + public result_int reduce_my_float_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_float_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "float b" + public result_int reduce_my_float_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_float_1 = 133; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_float_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "float b" + public result_int reduce_my_float_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_float_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "float b" + public result_int reduce_my_float_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_float2_0 = 134; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_float2_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "float2 b" + public result_int reduce_my_float_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_float2_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "float2 b" + public result_int reduce_my_float_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_float2_1 = 135; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_float2_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "float2 b" + public result_int reduce_my_float_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_float2_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "float2 b" + public result_int reduce_my_float_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_float4_0 = 136; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_float4_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "float4 b" + public result_int reduce_my_float_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_float4_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "float4 b" + public result_int reduce_my_float_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_float4_1 = 137; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_float4_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "float4 b" + public result_int reduce_my_float_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_float4_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "float4 b" + public result_int reduce_my_float_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_char_0 = 138; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_char_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "char b" + public result_int reduce_my_float_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_char_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "char b" + public result_int reduce_my_float_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_char_1 = 139; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_char_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "char b" + public result_int reduce_my_float_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_char_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "char b" + public result_int reduce_my_float_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_char2_0 = 140; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_char2_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "char2 b" + public result_int reduce_my_float_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_char2_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "char2 b" + public result_int reduce_my_float_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_char2_1 = 141; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_char2_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "char2 b" + public result_int reduce_my_float_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_char2_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "char2 b" + public result_int reduce_my_float_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_char4_0 = 142; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_char4_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "char4 b" + public result_int reduce_my_float_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_char4_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "char4 b" + public result_int reduce_my_float_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_char4_1 = 143; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_char4_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "char4 b" + public result_int reduce_my_float_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_char4_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "char4 b" + public result_int reduce_my_float_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_short_0 = 144; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_short_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "short b" + public result_int reduce_my_float_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_short_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "short b" + public result_int reduce_my_float_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_short_1 = 145; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_short_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "short b" + public result_int reduce_my_float_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_short_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "short b" + public result_int reduce_my_float_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_short2_0 = 146; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_short2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "short2 b" + public result_int reduce_my_float_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_short2_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "short2 b" + public result_int reduce_my_float_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_short2_1 = 147; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_short2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "short2 b" + public result_int reduce_my_float_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_short2_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "short2 b" + public result_int reduce_my_float_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_short4_0 = 148; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_short4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "short4 b" + public result_int reduce_my_float_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_short4_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "short4 b" + public result_int reduce_my_float_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_short4_1 = 149; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_short4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "short4 b" + public result_int reduce_my_float_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_short4_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "short4 b" + public result_int reduce_my_float_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_uchar_0 = 150; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_uchar_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "uchar b" + public result_int reduce_my_float_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_uchar_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "uchar b" + public result_int reduce_my_float_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_uchar_1 = 151; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_uchar_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "uchar b" + public result_int reduce_my_float_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_uchar_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "uchar b" + public result_int reduce_my_float_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_uchar2_0 = 152; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_uchar2_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "uchar2 b" + public result_int reduce_my_float_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_uchar2_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "uchar2 b" + public result_int reduce_my_float_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_uchar2_1 = 153; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_uchar2_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "uchar2 b" + public result_int reduce_my_float_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_uchar2_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "uchar2 b" + public result_int reduce_my_float_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_uchar4_0 = 154; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_uchar4_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "uchar4 b" + public result_int reduce_my_float_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_uchar4_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "uchar4 b" + public result_int reduce_my_float_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_uchar4_1 = 155; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_uchar4_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "uchar4 b" + public result_int reduce_my_float_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_uchar4_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "uchar4 b" + public result_int reduce_my_float_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_ushort_0 = 156; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_ushort_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "ushort b" + public result_int reduce_my_float_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_ushort_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "ushort b" + public result_int reduce_my_float_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_ushort_1 = 157; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_ushort_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "ushort b" + public result_int reduce_my_float_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_ushort_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "ushort b" + public result_int reduce_my_float_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_ushort2_0 = 158; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_ushort2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "ushort2 b" + public result_int reduce_my_float_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_ushort2_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "ushort2 b" + public result_int reduce_my_float_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_ushort2_1 = 159; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float_ushort2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "ushort2 b" + public result_int reduce_my_float_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_ushort2_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "ushort2 b" + public result_int reduce_my_float_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_ushort4_0 = 160; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_ushort4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "ushort4 b" + public result_int reduce_my_float_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_ushort4_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "ushort4 b" + public result_int reduce_my_float_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_ushort4_1 = 161; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float_ushort4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "ushort4 b" + public result_int reduce_my_float_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_ushort4_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "ushort4 b" + public result_int reduce_my_float_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_bool_0 = 162; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_bool_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "bool b" + public result_int reduce_my_float_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_bool_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "bool b" + public result_int reduce_my_float_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_bool_1 = 163; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_float_bool_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float a" + // ain2 = "bool b" + public result_int reduce_my_float_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_bool_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "bool b" + public result_int reduce_my_float_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_rs_matrix2x2_0 = 164; + // ain1 = "float a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_rs_matrix2x2_1 = 165; + // ain1 = "float a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_MyStruct_0 = 166; + // ain1 = "float a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_float_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float_MyStruct_1 = 167; + // ain1 = "float a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_float_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "float a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_half_0 = 168; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_half_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "half b" + public result_int reduce_my_float2_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_half_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "half b" + public result_int reduce_my_float2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_half_1 = 169; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_half_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "half b" + public result_int reduce_my_float2_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_half_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "half b" + public result_int reduce_my_float2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_half2_0 = 170; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_half2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "half2 b" + public result_int reduce_my_float2_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_half2_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "half2 b" + public result_int reduce_my_float2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_half2_1 = 171; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_half2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "half2 b" + public result_int reduce_my_float2_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_half2_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "half2 b" + public result_int reduce_my_float2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_half4_0 = 172; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_half4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "half4 b" + public result_int reduce_my_float2_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_half4_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "half4 b" + public result_int reduce_my_float2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_half4_1 = 173; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_half4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "half4 b" + public result_int reduce_my_float2_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_half4_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "half4 b" + public result_int reduce_my_float2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_float_0 = 174; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_float_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "float b" + public result_int reduce_my_float2_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_float_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "float b" + public result_int reduce_my_float2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_float_1 = 175; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_float_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "float b" + public result_int reduce_my_float2_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_float_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "float b" + public result_int reduce_my_float2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_float2_0 = 176; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_float2_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "float2 b" + public result_int reduce_my_float2_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_float2_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "float2 b" + public result_int reduce_my_float2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_float2_1 = 177; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_float2_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "float2 b" + public result_int reduce_my_float2_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_float2_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "float2 b" + public result_int reduce_my_float2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_float4_0 = 178; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_float4_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "float4 b" + public result_int reduce_my_float2_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_float4_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "float4 b" + public result_int reduce_my_float2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_float4_1 = 179; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_float4_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "float4 b" + public result_int reduce_my_float2_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_float4_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "float4 b" + public result_int reduce_my_float2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_char_0 = 180; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_char_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "char b" + public result_int reduce_my_float2_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_char_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "char b" + public result_int reduce_my_float2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_char_1 = 181; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_char_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "char b" + public result_int reduce_my_float2_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_char_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "char b" + public result_int reduce_my_float2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_char2_0 = 182; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_char2_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "char2 b" + public result_int reduce_my_float2_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_char2_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "char2 b" + public result_int reduce_my_float2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_char2_1 = 183; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_char2_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "char2 b" + public result_int reduce_my_float2_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_char2_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "char2 b" + public result_int reduce_my_float2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_char4_0 = 184; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_char4_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "char4 b" + public result_int reduce_my_float2_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_char4_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "char4 b" + public result_int reduce_my_float2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_char4_1 = 185; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_char4_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "char4 b" + public result_int reduce_my_float2_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_char4_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "char4 b" + public result_int reduce_my_float2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_short_0 = 186; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_short_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "short b" + public result_int reduce_my_float2_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_short_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "short b" + public result_int reduce_my_float2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_short_1 = 187; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_short_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "short b" + public result_int reduce_my_float2_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_short_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "short b" + public result_int reduce_my_float2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_short2_0 = 188; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_short2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "short2 b" + public result_int reduce_my_float2_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_short2_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "short2 b" + public result_int reduce_my_float2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_short2_1 = 189; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_short2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "short2 b" + public result_int reduce_my_float2_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_short2_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "short2 b" + public result_int reduce_my_float2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_short4_0 = 190; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_short4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "short4 b" + public result_int reduce_my_float2_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_short4_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "short4 b" + public result_int reduce_my_float2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_short4_1 = 191; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_short4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "short4 b" + public result_int reduce_my_float2_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_short4_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "short4 b" + public result_int reduce_my_float2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_uchar_0 = 192; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_uchar_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "uchar b" + public result_int reduce_my_float2_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_uchar_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "uchar b" + public result_int reduce_my_float2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_uchar_1 = 193; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_uchar_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "uchar b" + public result_int reduce_my_float2_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_uchar_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "uchar b" + public result_int reduce_my_float2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_uchar2_0 = 194; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_uchar2_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float2_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_uchar2_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_uchar2_1 = 195; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_uchar2_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float2_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_uchar2_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_uchar4_0 = 196; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_uchar4_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float2_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_uchar4_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_uchar4_1 = 197; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_uchar4_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float2_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_uchar4_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_ushort_0 = 198; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_ushort_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "ushort b" + public result_int reduce_my_float2_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_ushort_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "ushort b" + public result_int reduce_my_float2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_ushort_1 = 199; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_ushort_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "ushort b" + public result_int reduce_my_float2_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_ushort_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "ushort b" + public result_int reduce_my_float2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_ushort2_0 = 200; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_ushort2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float2_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_ushort2_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_ushort2_1 = 201; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float2_ushort2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float2_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_ushort2_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_ushort4_0 = 202; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_ushort4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float2_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_ushort4_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_ushort4_1 = 203; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float2_ushort4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float2_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_ushort4_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_bool_0 = 204; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_bool_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "bool b" + public result_int reduce_my_float2_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_bool_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "bool b" + public result_int reduce_my_float2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_bool_1 = 205; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_float2_bool_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float2_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float2 a" + // ain2 = "bool b" + public result_int reduce_my_float2_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_bool_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "bool b" + public result_int reduce_my_float2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_rs_matrix2x2_0 = 206; + // ain1 = "float2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_rs_matrix2x2_1 = 207; + // ain1 = "float2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_MyStruct_0 = 208; + // ain1 = "float2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float2_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_float2_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float2_MyStruct_1 = 209; + // ain1 = "float2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float2_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_float2_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "float2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_half_0 = 210; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_half_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "half b" + public result_int reduce_my_float4_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_half_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "half b" + public result_int reduce_my_float4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_half_1 = 211; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_half_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "half b" + public result_int reduce_my_float4_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_half_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "half b" + public result_int reduce_my_float4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_half2_0 = 212; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_half2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "half2 b" + public result_int reduce_my_float4_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_half2_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "half2 b" + public result_int reduce_my_float4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_half2_1 = 213; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_half2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "half2 b" + public result_int reduce_my_float4_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_half2_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "half2 b" + public result_int reduce_my_float4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_half4_0 = 214; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_half4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "half4 b" + public result_int reduce_my_float4_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_half4_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "half4 b" + public result_int reduce_my_float4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_half4_1 = 215; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_half4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "half4 b" + public result_int reduce_my_float4_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_half4_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "half4 b" + public result_int reduce_my_float4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_float_0 = 216; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_float_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "float b" + public result_int reduce_my_float4_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_float_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "float b" + public result_int reduce_my_float4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_float_1 = 217; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_float_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "float b" + public result_int reduce_my_float4_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_float_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "float b" + public result_int reduce_my_float4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_float2_0 = 218; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_float2_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "float2 b" + public result_int reduce_my_float4_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_float2_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "float2 b" + public result_int reduce_my_float4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_float2_1 = 219; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_float2_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "float2 b" + public result_int reduce_my_float4_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_float2_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "float2 b" + public result_int reduce_my_float4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_float4_0 = 220; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_float4_0(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "float4 b" + public result_int reduce_my_float4_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_float4_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "float4 b" + public result_int reduce_my_float4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_float4_1 = 221; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_float4_1(float[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "float4 b" + public result_int reduce_my_float4_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_float4_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "float4 b" + public result_int reduce_my_float4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_char_0 = 222; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_char_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "char b" + public result_int reduce_my_float4_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_char_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "char b" + public result_int reduce_my_float4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_char_1 = 223; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_char_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "char b" + public result_int reduce_my_float4_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_char_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "char b" + public result_int reduce_my_float4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_char2_0 = 224; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_char2_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "char2 b" + public result_int reduce_my_float4_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_char2_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "char2 b" + public result_int reduce_my_float4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_char2_1 = 225; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_char2_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "char2 b" + public result_int reduce_my_float4_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_char2_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "char2 b" + public result_int reduce_my_float4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_char4_0 = 226; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_char4_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "char4 b" + public result_int reduce_my_float4_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_char4_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "char4 b" + public result_int reduce_my_float4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_char4_1 = 227; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_char4_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "char4 b" + public result_int reduce_my_float4_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_char4_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "char4 b" + public result_int reduce_my_float4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_short_0 = 228; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_short_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "short b" + public result_int reduce_my_float4_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_short_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "short b" + public result_int reduce_my_float4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_short_1 = 229; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_short_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "short b" + public result_int reduce_my_float4_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_short_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "short b" + public result_int reduce_my_float4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_short2_0 = 230; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_short2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "short2 b" + public result_int reduce_my_float4_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_short2_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "short2 b" + public result_int reduce_my_float4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_short2_1 = 231; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_short2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "short2 b" + public result_int reduce_my_float4_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_short2_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "short2 b" + public result_int reduce_my_float4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_short4_0 = 232; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_short4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "short4 b" + public result_int reduce_my_float4_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_short4_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "short4 b" + public result_int reduce_my_float4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_short4_1 = 233; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_short4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "short4 b" + public result_int reduce_my_float4_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_short4_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "short4 b" + public result_int reduce_my_float4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_uchar_0 = 234; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_uchar_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "uchar b" + public result_int reduce_my_float4_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_uchar_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "uchar b" + public result_int reduce_my_float4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_uchar_1 = 235; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_uchar_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "uchar b" + public result_int reduce_my_float4_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_uchar_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "uchar b" + public result_int reduce_my_float4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_uchar2_0 = 236; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_uchar2_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float4_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_uchar2_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_uchar2_1 = 237; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_uchar2_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float4_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_uchar2_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_float4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_uchar4_0 = 238; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_uchar4_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float4_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_uchar4_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_uchar4_1 = 239; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_uchar4_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float4_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_uchar4_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_float4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_ushort_0 = 240; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_ushort_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "ushort b" + public result_int reduce_my_float4_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_ushort_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "ushort b" + public result_int reduce_my_float4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_ushort_1 = 241; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_ushort_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "ushort b" + public result_int reduce_my_float4_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_ushort_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "ushort b" + public result_int reduce_my_float4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_ushort2_0 = 242; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_ushort2_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float4_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_ushort2_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_ushort2_1 = 243; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_float4_ushort2_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float4_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_ushort2_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_float4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_ushort4_0 = 244; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_ushort4_0(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float4_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_ushort4_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_ushort4_1 = 245; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_float4_ushort4_1(float[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float4_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_ushort4_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_float4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_bool_0 = 246; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_bool_0(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "bool b" + public result_int reduce_my_float4_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_bool_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "bool b" + public result_int reduce_my_float4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_bool_1 = 247; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_float4_bool_1(float[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_float4_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "float4 a" + // ain2 = "bool b" + public result_int reduce_my_float4_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_bool_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "bool b" + public result_int reduce_my_float4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_rs_matrix2x2_0 = 248; + // ain1 = "float4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_rs_matrix2x2_1 = 249; + // ain1 = "float4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_float4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_MyStruct_0 = 250; + // ain1 = "float4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float4_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_float4_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_float4_MyStruct_1 = 251; + // ain1 = "float4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float4_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_float4_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "float4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_float4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_half_0 = 252; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_half_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "half b" + public result_int reduce_my_char_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_half_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "half b" + public result_int reduce_my_char_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_half_1 = 253; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_half_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "half b" + public result_int reduce_my_char_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_half_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "half b" + public result_int reduce_my_char_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_half2_0 = 254; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_half2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "half2 b" + public result_int reduce_my_char_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_half2_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "half2 b" + public result_int reduce_my_char_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_half2_1 = 255; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_half2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "half2 b" + public result_int reduce_my_char_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_half2_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "half2 b" + public result_int reduce_my_char_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_half4_0 = 256; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_half4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "half4 b" + public result_int reduce_my_char_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_half4_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "half4 b" + public result_int reduce_my_char_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_half4_1 = 257; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_half4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "half4 b" + public result_int reduce_my_char_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_half4_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "half4 b" + public result_int reduce_my_char_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_float_0 = 258; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_float_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "float b" + public result_int reduce_my_char_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_float_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "float b" + public result_int reduce_my_char_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_float_1 = 259; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_float_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "float b" + public result_int reduce_my_char_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_float_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "float b" + public result_int reduce_my_char_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_float2_0 = 260; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_float2_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "float2 b" + public result_int reduce_my_char_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_float2_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "float2 b" + public result_int reduce_my_char_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_float2_1 = 261; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_float2_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "float2 b" + public result_int reduce_my_char_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_float2_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "float2 b" + public result_int reduce_my_char_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_float4_0 = 262; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_float4_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "float4 b" + public result_int reduce_my_char_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_float4_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "float4 b" + public result_int reduce_my_char_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_float4_1 = 263; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_float4_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "float4 b" + public result_int reduce_my_char_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_float4_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "float4 b" + public result_int reduce_my_char_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_char_0 = 264; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_char_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "char b" + public result_int reduce_my_char_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_char_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "char b" + public result_int reduce_my_char_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_char_1 = 265; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_char_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "char b" + public result_int reduce_my_char_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_char_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "char b" + public result_int reduce_my_char_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_char2_0 = 266; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_char2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "char2 b" + public result_int reduce_my_char_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_char2_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "char2 b" + public result_int reduce_my_char_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_char2_1 = 267; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_char2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "char2 b" + public result_int reduce_my_char_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_char2_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "char2 b" + public result_int reduce_my_char_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_char4_0 = 268; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_char4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "char4 b" + public result_int reduce_my_char_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_char4_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "char4 b" + public result_int reduce_my_char_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_char4_1 = 269; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_char4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "char4 b" + public result_int reduce_my_char_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_char4_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "char4 b" + public result_int reduce_my_char_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_short_0 = 270; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_short_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "short b" + public result_int reduce_my_char_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_short_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "short b" + public result_int reduce_my_char_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_short_1 = 271; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_short_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "short b" + public result_int reduce_my_char_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_short_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "short b" + public result_int reduce_my_char_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_short2_0 = 272; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_short2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "short2 b" + public result_int reduce_my_char_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_short2_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "short2 b" + public result_int reduce_my_char_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_short2_1 = 273; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_short2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "short2 b" + public result_int reduce_my_char_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_short2_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "short2 b" + public result_int reduce_my_char_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_short4_0 = 274; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_short4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "short4 b" + public result_int reduce_my_char_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_short4_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "short4 b" + public result_int reduce_my_char_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_short4_1 = 275; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_short4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "short4 b" + public result_int reduce_my_char_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_short4_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "short4 b" + public result_int reduce_my_char_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_uchar_0 = 276; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_uchar_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "uchar b" + public result_int reduce_my_char_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_uchar_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "uchar b" + public result_int reduce_my_char_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_uchar_1 = 277; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_uchar_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "uchar b" + public result_int reduce_my_char_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_uchar_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "uchar b" + public result_int reduce_my_char_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_uchar2_0 = 278; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_uchar2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "uchar2 b" + public result_int reduce_my_char_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_uchar2_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "uchar2 b" + public result_int reduce_my_char_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_uchar2_1 = 279; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_uchar2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "uchar2 b" + public result_int reduce_my_char_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_uchar2_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "uchar2 b" + public result_int reduce_my_char_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_uchar4_0 = 280; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_uchar4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "uchar4 b" + public result_int reduce_my_char_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_uchar4_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "uchar4 b" + public result_int reduce_my_char_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_uchar4_1 = 281; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_uchar4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "uchar4 b" + public result_int reduce_my_char_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_uchar4_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "uchar4 b" + public result_int reduce_my_char_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_ushort_0 = 282; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_ushort_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "ushort b" + public result_int reduce_my_char_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_ushort_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "ushort b" + public result_int reduce_my_char_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_ushort_1 = 283; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_ushort_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "ushort b" + public result_int reduce_my_char_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_ushort_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "ushort b" + public result_int reduce_my_char_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_ushort2_0 = 284; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_ushort2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "ushort2 b" + public result_int reduce_my_char_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_ushort2_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "ushort2 b" + public result_int reduce_my_char_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_ushort2_1 = 285; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char_ushort2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "ushort2 b" + public result_int reduce_my_char_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_ushort2_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "ushort2 b" + public result_int reduce_my_char_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_ushort4_0 = 286; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_ushort4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "ushort4 b" + public result_int reduce_my_char_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_ushort4_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "ushort4 b" + public result_int reduce_my_char_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_ushort4_1 = 287; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char_ushort4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "ushort4 b" + public result_int reduce_my_char_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_ushort4_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "ushort4 b" + public result_int reduce_my_char_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_bool_0 = 288; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_bool_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "bool b" + public result_int reduce_my_char_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_bool_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "bool b" + public result_int reduce_my_char_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_bool_1 = 289; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_char_bool_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char a" + // ain2 = "bool b" + public result_int reduce_my_char_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_bool_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "bool b" + public result_int reduce_my_char_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_rs_matrix2x2_0 = 290; + // ain1 = "char a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_rs_matrix2x2_1 = 291; + // ain1 = "char a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_MyStruct_0 = 292; + // ain1 = "char a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_char_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char_MyStruct_1 = 293; + // ain1 = "char a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_char_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "char a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_half_0 = 294; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_half_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "half b" + public result_int reduce_my_char2_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_half_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "half b" + public result_int reduce_my_char2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_half_1 = 295; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_half_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "half b" + public result_int reduce_my_char2_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_half_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "half b" + public result_int reduce_my_char2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_half2_0 = 296; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_half2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "half2 b" + public result_int reduce_my_char2_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_half2_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "half2 b" + public result_int reduce_my_char2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_half2_1 = 297; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_half2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "half2 b" + public result_int reduce_my_char2_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_half2_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "half2 b" + public result_int reduce_my_char2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_half4_0 = 298; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_half4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "half4 b" + public result_int reduce_my_char2_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_half4_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "half4 b" + public result_int reduce_my_char2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_half4_1 = 299; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_half4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "half4 b" + public result_int reduce_my_char2_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_half4_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "half4 b" + public result_int reduce_my_char2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_float_0 = 300; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_float_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "float b" + public result_int reduce_my_char2_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_float_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "float b" + public result_int reduce_my_char2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_float_1 = 301; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_float_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "float b" + public result_int reduce_my_char2_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_float_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "float b" + public result_int reduce_my_char2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_float2_0 = 302; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_float2_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "float2 b" + public result_int reduce_my_char2_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_float2_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "float2 b" + public result_int reduce_my_char2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_float2_1 = 303; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_float2_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "float2 b" + public result_int reduce_my_char2_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_float2_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "float2 b" + public result_int reduce_my_char2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_float4_0 = 304; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_float4_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "float4 b" + public result_int reduce_my_char2_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_float4_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "float4 b" + public result_int reduce_my_char2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_float4_1 = 305; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_float4_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "float4 b" + public result_int reduce_my_char2_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_float4_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "float4 b" + public result_int reduce_my_char2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_char_0 = 306; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_char_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "char b" + public result_int reduce_my_char2_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_char_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "char b" + public result_int reduce_my_char2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_char_1 = 307; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_char_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "char b" + public result_int reduce_my_char2_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_char_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "char b" + public result_int reduce_my_char2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_char2_0 = 308; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_char2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "char2 b" + public result_int reduce_my_char2_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_char2_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "char2 b" + public result_int reduce_my_char2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_char2_1 = 309; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_char2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "char2 b" + public result_int reduce_my_char2_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_char2_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "char2 b" + public result_int reduce_my_char2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_char4_0 = 310; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_char4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "char4 b" + public result_int reduce_my_char2_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_char4_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "char4 b" + public result_int reduce_my_char2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_char4_1 = 311; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_char4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "char4 b" + public result_int reduce_my_char2_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_char4_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "char4 b" + public result_int reduce_my_char2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_short_0 = 312; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_short_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "short b" + public result_int reduce_my_char2_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_short_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "short b" + public result_int reduce_my_char2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_short_1 = 313; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_short_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "short b" + public result_int reduce_my_char2_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_short_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "short b" + public result_int reduce_my_char2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_short2_0 = 314; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_short2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "short2 b" + public result_int reduce_my_char2_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_short2_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "short2 b" + public result_int reduce_my_char2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_short2_1 = 315; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_short2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "short2 b" + public result_int reduce_my_char2_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_short2_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "short2 b" + public result_int reduce_my_char2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_short4_0 = 316; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_short4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "short4 b" + public result_int reduce_my_char2_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_short4_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "short4 b" + public result_int reduce_my_char2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_short4_1 = 317; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_short4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "short4 b" + public result_int reduce_my_char2_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_short4_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "short4 b" + public result_int reduce_my_char2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_uchar_0 = 318; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_uchar_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "uchar b" + public result_int reduce_my_char2_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_uchar_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "uchar b" + public result_int reduce_my_char2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_uchar_1 = 319; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_uchar_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "uchar b" + public result_int reduce_my_char2_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_uchar_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "uchar b" + public result_int reduce_my_char2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_uchar2_0 = 320; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_uchar2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char2_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_uchar2_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_uchar2_1 = 321; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_uchar2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char2_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_uchar2_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_uchar4_0 = 322; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_uchar4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char2_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_uchar4_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_uchar4_1 = 323; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_uchar4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char2_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_uchar4_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_ushort_0 = 324; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_ushort_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "ushort b" + public result_int reduce_my_char2_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_ushort_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "ushort b" + public result_int reduce_my_char2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_ushort_1 = 325; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_ushort_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "ushort b" + public result_int reduce_my_char2_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_ushort_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "ushort b" + public result_int reduce_my_char2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_ushort2_0 = 326; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_ushort2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char2_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_ushort2_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_ushort2_1 = 327; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char2_ushort2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char2_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_ushort2_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_ushort4_0 = 328; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_ushort4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char2_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_ushort4_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_ushort4_1 = 329; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char2_ushort4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char2_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_ushort4_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_bool_0 = 330; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_bool_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "bool b" + public result_int reduce_my_char2_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_bool_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "bool b" + public result_int reduce_my_char2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_bool_1 = 331; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_char2_bool_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char2_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char2 a" + // ain2 = "bool b" + public result_int reduce_my_char2_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_bool_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "bool b" + public result_int reduce_my_char2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_rs_matrix2x2_0 = 332; + // ain1 = "char2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_rs_matrix2x2_1 = 333; + // ain1 = "char2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_MyStruct_0 = 334; + // ain1 = "char2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char2_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_char2_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char2_MyStruct_1 = 335; + // ain1 = "char2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char2_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_char2_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "char2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_half_0 = 336; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_half_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "half b" + public result_int reduce_my_char4_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_half_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "half b" + public result_int reduce_my_char4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_half_1 = 337; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_half_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "half b" + public result_int reduce_my_char4_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_half_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "half b" + public result_int reduce_my_char4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_half2_0 = 338; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_half2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "half2 b" + public result_int reduce_my_char4_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_half2_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "half2 b" + public result_int reduce_my_char4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_half2_1 = 339; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_half2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "half2 b" + public result_int reduce_my_char4_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_half2_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "half2 b" + public result_int reduce_my_char4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_half4_0 = 340; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_half4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "half4 b" + public result_int reduce_my_char4_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_half4_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "half4 b" + public result_int reduce_my_char4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_half4_1 = 341; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_half4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "half4 b" + public result_int reduce_my_char4_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_half4_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "half4 b" + public result_int reduce_my_char4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_float_0 = 342; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_float_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "float b" + public result_int reduce_my_char4_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_float_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "float b" + public result_int reduce_my_char4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_float_1 = 343; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_float_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "float b" + public result_int reduce_my_char4_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_float_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "float b" + public result_int reduce_my_char4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_float2_0 = 344; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_float2_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "float2 b" + public result_int reduce_my_char4_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_float2_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "float2 b" + public result_int reduce_my_char4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_float2_1 = 345; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_float2_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "float2 b" + public result_int reduce_my_char4_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_float2_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "float2 b" + public result_int reduce_my_char4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_float4_0 = 346; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_float4_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "float4 b" + public result_int reduce_my_char4_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_float4_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "float4 b" + public result_int reduce_my_char4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_float4_1 = 347; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_float4_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "float4 b" + public result_int reduce_my_char4_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_float4_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "float4 b" + public result_int reduce_my_char4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_char_0 = 348; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_char_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "char b" + public result_int reduce_my_char4_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_char_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "char b" + public result_int reduce_my_char4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_char_1 = 349; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_char_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "char b" + public result_int reduce_my_char4_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_char_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "char b" + public result_int reduce_my_char4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_char2_0 = 350; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_char2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "char2 b" + public result_int reduce_my_char4_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_char2_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "char2 b" + public result_int reduce_my_char4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_char2_1 = 351; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_char2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "char2 b" + public result_int reduce_my_char4_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_char2_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "char2 b" + public result_int reduce_my_char4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_char4_0 = 352; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_char4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "char4 b" + public result_int reduce_my_char4_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_char4_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "char4 b" + public result_int reduce_my_char4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_char4_1 = 353; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_char4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "char4 b" + public result_int reduce_my_char4_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_char4_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "char4 b" + public result_int reduce_my_char4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_short_0 = 354; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_short_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "short b" + public result_int reduce_my_char4_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_short_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "short b" + public result_int reduce_my_char4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_short_1 = 355; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_short_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "short b" + public result_int reduce_my_char4_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_short_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "short b" + public result_int reduce_my_char4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_short2_0 = 356; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_short2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "short2 b" + public result_int reduce_my_char4_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_short2_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "short2 b" + public result_int reduce_my_char4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_short2_1 = 357; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_short2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "short2 b" + public result_int reduce_my_char4_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_short2_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "short2 b" + public result_int reduce_my_char4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_short4_0 = 358; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_short4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "short4 b" + public result_int reduce_my_char4_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_short4_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "short4 b" + public result_int reduce_my_char4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_short4_1 = 359; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_short4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "short4 b" + public result_int reduce_my_char4_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_short4_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "short4 b" + public result_int reduce_my_char4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_uchar_0 = 360; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_uchar_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "uchar b" + public result_int reduce_my_char4_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_uchar_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "uchar b" + public result_int reduce_my_char4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_uchar_1 = 361; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_uchar_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "uchar b" + public result_int reduce_my_char4_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_uchar_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "uchar b" + public result_int reduce_my_char4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_uchar2_0 = 362; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_uchar2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char4_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_uchar2_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_uchar2_1 = 363; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_uchar2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char4_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_uchar2_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_char4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_uchar4_0 = 364; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_uchar4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char4_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_uchar4_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_uchar4_1 = 365; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_uchar4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char4_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_uchar4_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_char4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_ushort_0 = 366; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_ushort_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "ushort b" + public result_int reduce_my_char4_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_ushort_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "ushort b" + public result_int reduce_my_char4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_ushort_1 = 367; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_ushort_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "ushort b" + public result_int reduce_my_char4_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_ushort_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "ushort b" + public result_int reduce_my_char4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_ushort2_0 = 368; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_ushort2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char4_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_ushort2_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_ushort2_1 = 369; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_char4_ushort2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char4_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_ushort2_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_char4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_ushort4_0 = 370; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_ushort4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char4_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_ushort4_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_ushort4_1 = 371; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_char4_ushort4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char4_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_ushort4_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_char4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_bool_0 = 372; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_bool_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "bool b" + public result_int reduce_my_char4_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_bool_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "bool b" + public result_int reduce_my_char4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_bool_1 = 373; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_char4_bool_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_char4_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "char4 a" + // ain2 = "bool b" + public result_int reduce_my_char4_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_bool_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "bool b" + public result_int reduce_my_char4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_rs_matrix2x2_0 = 374; + // ain1 = "char4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_rs_matrix2x2_1 = 375; + // ain1 = "char4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_char4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_MyStruct_0 = 376; + // ain1 = "char4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char4_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_char4_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_char4_MyStruct_1 = 377; + // ain1 = "char4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char4_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_char4_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "char4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_char4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_half_0 = 378; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "half b" + public result_int reduce_my_short_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_half_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "half b" + public result_int reduce_my_short_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_half_1 = 379; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "half b" + public result_int reduce_my_short_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_half_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "half b" + public result_int reduce_my_short_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_half2_0 = 380; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "half2 b" + public result_int reduce_my_short_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_half2_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "half2 b" + public result_int reduce_my_short_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_half2_1 = 381; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "half2 b" + public result_int reduce_my_short_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_half2_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "half2 b" + public result_int reduce_my_short_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_half4_0 = 382; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "half4 b" + public result_int reduce_my_short_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_half4_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "half4 b" + public result_int reduce_my_short_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_half4_1 = 383; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "half4 b" + public result_int reduce_my_short_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_half4_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "half4 b" + public result_int reduce_my_short_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_float_0 = 384; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "float b" + public result_int reduce_my_short_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_float_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "float b" + public result_int reduce_my_short_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_float_1 = 385; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "float b" + public result_int reduce_my_short_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_float_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "float b" + public result_int reduce_my_short_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_float2_0 = 386; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "float2 b" + public result_int reduce_my_short_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_float2_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "float2 b" + public result_int reduce_my_short_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_float2_1 = 387; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "float2 b" + public result_int reduce_my_short_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_float2_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "float2 b" + public result_int reduce_my_short_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_float4_0 = 388; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "float4 b" + public result_int reduce_my_short_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_float4_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "float4 b" + public result_int reduce_my_short_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_float4_1 = 389; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "float4 b" + public result_int reduce_my_short_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_float4_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "float4 b" + public result_int reduce_my_short_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_char_0 = 390; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "char b" + public result_int reduce_my_short_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_char_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "char b" + public result_int reduce_my_short_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_char_1 = 391; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "char b" + public result_int reduce_my_short_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_char_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "char b" + public result_int reduce_my_short_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_char2_0 = 392; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "char2 b" + public result_int reduce_my_short_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_char2_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "char2 b" + public result_int reduce_my_short_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_char2_1 = 393; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "char2 b" + public result_int reduce_my_short_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_char2_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "char2 b" + public result_int reduce_my_short_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_char4_0 = 394; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "char4 b" + public result_int reduce_my_short_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_char4_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "char4 b" + public result_int reduce_my_short_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_char4_1 = 395; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "char4 b" + public result_int reduce_my_short_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_char4_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "char4 b" + public result_int reduce_my_short_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_short_0 = 396; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "short b" + public result_int reduce_my_short_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_short_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "short b" + public result_int reduce_my_short_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_short_1 = 397; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "short b" + public result_int reduce_my_short_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_short_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "short b" + public result_int reduce_my_short_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_short2_0 = 398; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "short2 b" + public result_int reduce_my_short_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_short2_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "short2 b" + public result_int reduce_my_short_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_short2_1 = 399; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "short2 b" + public result_int reduce_my_short_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_short2_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "short2 b" + public result_int reduce_my_short_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_short4_0 = 400; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "short4 b" + public result_int reduce_my_short_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_short4_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "short4 b" + public result_int reduce_my_short_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_short4_1 = 401; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "short4 b" + public result_int reduce_my_short_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_short4_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "short4 b" + public result_int reduce_my_short_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_uchar_0 = 402; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "uchar b" + public result_int reduce_my_short_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_uchar_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "uchar b" + public result_int reduce_my_short_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_uchar_1 = 403; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "uchar b" + public result_int reduce_my_short_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_uchar_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "uchar b" + public result_int reduce_my_short_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_uchar2_0 = 404; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "uchar2 b" + public result_int reduce_my_short_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_uchar2_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "uchar2 b" + public result_int reduce_my_short_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_uchar2_1 = 405; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "uchar2 b" + public result_int reduce_my_short_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_uchar2_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "uchar2 b" + public result_int reduce_my_short_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_uchar4_0 = 406; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "uchar4 b" + public result_int reduce_my_short_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_uchar4_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "uchar4 b" + public result_int reduce_my_short_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_uchar4_1 = 407; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "uchar4 b" + public result_int reduce_my_short_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_uchar4_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "uchar4 b" + public result_int reduce_my_short_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_ushort_0 = 408; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "ushort b" + public result_int reduce_my_short_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_ushort_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "ushort b" + public result_int reduce_my_short_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_ushort_1 = 409; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "ushort b" + public result_int reduce_my_short_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_ushort_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "ushort b" + public result_int reduce_my_short_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_ushort2_0 = 410; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "ushort2 b" + public result_int reduce_my_short_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_ushort2_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "ushort2 b" + public result_int reduce_my_short_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_ushort2_1 = 411; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "ushort2 b" + public result_int reduce_my_short_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_ushort2_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "ushort2 b" + public result_int reduce_my_short_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_ushort4_0 = 412; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "ushort4 b" + public result_int reduce_my_short_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_ushort4_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "ushort4 b" + public result_int reduce_my_short_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_ushort4_1 = 413; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "ushort4 b" + public result_int reduce_my_short_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_ushort4_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "ushort4 b" + public result_int reduce_my_short_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_bool_0 = 414; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "bool b" + public result_int reduce_my_short_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_bool_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "bool b" + public result_int reduce_my_short_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_bool_1 = 415; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_short_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short a" + // ain2 = "bool b" + public result_int reduce_my_short_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_bool_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "bool b" + public result_int reduce_my_short_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_rs_matrix2x2_0 = 416; + // ain1 = "short a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_rs_matrix2x2_1 = 417; + // ain1 = "short a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_MyStruct_0 = 418; + // ain1 = "short a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_short_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short_MyStruct_1 = 419; + // ain1 = "short a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_short_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "short a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_half_0 = 420; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "half b" + public result_int reduce_my_short2_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_half_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "half b" + public result_int reduce_my_short2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_half_1 = 421; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "half b" + public result_int reduce_my_short2_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_half_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "half b" + public result_int reduce_my_short2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_half2_0 = 422; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "half2 b" + public result_int reduce_my_short2_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_half2_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "half2 b" + public result_int reduce_my_short2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_half2_1 = 423; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "half2 b" + public result_int reduce_my_short2_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_half2_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "half2 b" + public result_int reduce_my_short2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_half4_0 = 424; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "half4 b" + public result_int reduce_my_short2_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_half4_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "half4 b" + public result_int reduce_my_short2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_half4_1 = 425; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "half4 b" + public result_int reduce_my_short2_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_half4_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "half4 b" + public result_int reduce_my_short2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_float_0 = 426; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "float b" + public result_int reduce_my_short2_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_float_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "float b" + public result_int reduce_my_short2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_float_1 = 427; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "float b" + public result_int reduce_my_short2_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_float_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "float b" + public result_int reduce_my_short2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_float2_0 = 428; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "float2 b" + public result_int reduce_my_short2_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_float2_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "float2 b" + public result_int reduce_my_short2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_float2_1 = 429; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "float2 b" + public result_int reduce_my_short2_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_float2_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "float2 b" + public result_int reduce_my_short2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_float4_0 = 430; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "float4 b" + public result_int reduce_my_short2_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_float4_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "float4 b" + public result_int reduce_my_short2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_float4_1 = 431; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "float4 b" + public result_int reduce_my_short2_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_float4_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "float4 b" + public result_int reduce_my_short2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_char_0 = 432; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "char b" + public result_int reduce_my_short2_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_char_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "char b" + public result_int reduce_my_short2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_char_1 = 433; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "char b" + public result_int reduce_my_short2_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_char_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "char b" + public result_int reduce_my_short2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_char2_0 = 434; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "char2 b" + public result_int reduce_my_short2_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_char2_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "char2 b" + public result_int reduce_my_short2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_char2_1 = 435; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "char2 b" + public result_int reduce_my_short2_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_char2_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "char2 b" + public result_int reduce_my_short2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_char4_0 = 436; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "char4 b" + public result_int reduce_my_short2_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_char4_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "char4 b" + public result_int reduce_my_short2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_char4_1 = 437; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "char4 b" + public result_int reduce_my_short2_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_char4_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "char4 b" + public result_int reduce_my_short2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_short_0 = 438; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "short b" + public result_int reduce_my_short2_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_short_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "short b" + public result_int reduce_my_short2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_short_1 = 439; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "short b" + public result_int reduce_my_short2_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_short_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "short b" + public result_int reduce_my_short2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_short2_0 = 440; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "short2 b" + public result_int reduce_my_short2_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_short2_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "short2 b" + public result_int reduce_my_short2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_short2_1 = 441; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "short2 b" + public result_int reduce_my_short2_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_short2_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "short2 b" + public result_int reduce_my_short2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_short4_0 = 442; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "short4 b" + public result_int reduce_my_short2_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_short4_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "short4 b" + public result_int reduce_my_short2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_short4_1 = 443; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "short4 b" + public result_int reduce_my_short2_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_short4_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "short4 b" + public result_int reduce_my_short2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_uchar_0 = 444; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "uchar b" + public result_int reduce_my_short2_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_uchar_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "uchar b" + public result_int reduce_my_short2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_uchar_1 = 445; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "uchar b" + public result_int reduce_my_short2_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_uchar_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "uchar b" + public result_int reduce_my_short2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_uchar2_0 = 446; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short2_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_uchar2_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_uchar2_1 = 447; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short2_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_uchar2_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_uchar4_0 = 448; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short2_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_uchar4_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_uchar4_1 = 449; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short2_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_uchar4_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_ushort_0 = 450; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "ushort b" + public result_int reduce_my_short2_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_ushort_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "ushort b" + public result_int reduce_my_short2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_ushort_1 = 451; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "ushort b" + public result_int reduce_my_short2_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_ushort_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "ushort b" + public result_int reduce_my_short2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_ushort2_0 = 452; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short2_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_ushort2_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_ushort2_1 = 453; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short2_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short2_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_ushort2_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_ushort4_0 = 454; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short2_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_ushort4_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_ushort4_1 = 455; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short2_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short2_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_ushort4_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_bool_0 = 456; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "bool b" + public result_int reduce_my_short2_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_bool_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "bool b" + public result_int reduce_my_short2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_bool_1 = 457; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_short2_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short2_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short2 a" + // ain2 = "bool b" + public result_int reduce_my_short2_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_bool_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "bool b" + public result_int reduce_my_short2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_rs_matrix2x2_0 = 458; + // ain1 = "short2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_rs_matrix2x2_1 = 459; + // ain1 = "short2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_MyStruct_0 = 460; + // ain1 = "short2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short2_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_short2_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short2_MyStruct_1 = 461; + // ain1 = "short2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short2_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_short2_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "short2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_half_0 = 462; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "half b" + public result_int reduce_my_short4_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_half_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "half b" + public result_int reduce_my_short4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_half_1 = 463; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "half b" + public result_int reduce_my_short4_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_half_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "half b" + public result_int reduce_my_short4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_half2_0 = 464; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "half2 b" + public result_int reduce_my_short4_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_half2_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "half2 b" + public result_int reduce_my_short4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_half2_1 = 465; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "half2 b" + public result_int reduce_my_short4_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_half2_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "half2 b" + public result_int reduce_my_short4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_half4_0 = 466; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "half4 b" + public result_int reduce_my_short4_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_half4_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "half4 b" + public result_int reduce_my_short4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_half4_1 = 467; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "half4 b" + public result_int reduce_my_short4_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_half4_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "half4 b" + public result_int reduce_my_short4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_float_0 = 468; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "float b" + public result_int reduce_my_short4_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_float_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "float b" + public result_int reduce_my_short4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_float_1 = 469; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "float b" + public result_int reduce_my_short4_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_float_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "float b" + public result_int reduce_my_short4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_float2_0 = 470; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "float2 b" + public result_int reduce_my_short4_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_float2_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "float2 b" + public result_int reduce_my_short4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_float2_1 = 471; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "float2 b" + public result_int reduce_my_short4_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_float2_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "float2 b" + public result_int reduce_my_short4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_float4_0 = 472; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "float4 b" + public result_int reduce_my_short4_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_float4_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "float4 b" + public result_int reduce_my_short4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_float4_1 = 473; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "float4 b" + public result_int reduce_my_short4_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_float4_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "float4 b" + public result_int reduce_my_short4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_char_0 = 474; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "char b" + public result_int reduce_my_short4_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_char_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "char b" + public result_int reduce_my_short4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_char_1 = 475; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "char b" + public result_int reduce_my_short4_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_char_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "char b" + public result_int reduce_my_short4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_char2_0 = 476; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "char2 b" + public result_int reduce_my_short4_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_char2_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "char2 b" + public result_int reduce_my_short4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_char2_1 = 477; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "char2 b" + public result_int reduce_my_short4_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_char2_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "char2 b" + public result_int reduce_my_short4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_char4_0 = 478; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "char4 b" + public result_int reduce_my_short4_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_char4_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "char4 b" + public result_int reduce_my_short4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_char4_1 = 479; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "char4 b" + public result_int reduce_my_short4_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_char4_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "char4 b" + public result_int reduce_my_short4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_short_0 = 480; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "short b" + public result_int reduce_my_short4_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_short_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "short b" + public result_int reduce_my_short4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_short_1 = 481; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "short b" + public result_int reduce_my_short4_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_short_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "short b" + public result_int reduce_my_short4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_short2_0 = 482; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "short2 b" + public result_int reduce_my_short4_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_short2_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "short2 b" + public result_int reduce_my_short4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_short2_1 = 483; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "short2 b" + public result_int reduce_my_short4_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_short2_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "short2 b" + public result_int reduce_my_short4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_short4_0 = 484; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "short4 b" + public result_int reduce_my_short4_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_short4_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "short4 b" + public result_int reduce_my_short4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_short4_1 = 485; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "short4 b" + public result_int reduce_my_short4_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_short4_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "short4 b" + public result_int reduce_my_short4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_uchar_0 = 486; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "uchar b" + public result_int reduce_my_short4_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_uchar_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "uchar b" + public result_int reduce_my_short4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_uchar_1 = 487; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "uchar b" + public result_int reduce_my_short4_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_uchar_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "uchar b" + public result_int reduce_my_short4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_uchar2_0 = 488; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short4_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_uchar2_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_uchar2_1 = 489; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short4_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_uchar2_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_short4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_uchar4_0 = 490; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short4_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_uchar4_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_uchar4_1 = 491; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short4_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_uchar4_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_short4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_ushort_0 = 492; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "ushort b" + public result_int reduce_my_short4_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_ushort_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "ushort b" + public result_int reduce_my_short4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_ushort_1 = 493; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "ushort b" + public result_int reduce_my_short4_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_ushort_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "ushort b" + public result_int reduce_my_short4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_ushort2_0 = 494; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short4_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_ushort2_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_ushort2_1 = 495; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_short4_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short4_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_ushort2_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_short4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_ushort4_0 = 496; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short4_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_ushort4_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_ushort4_1 = 497; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_short4_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short4_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_ushort4_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_short4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_bool_0 = 498; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "bool b" + public result_int reduce_my_short4_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_bool_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "bool b" + public result_int reduce_my_short4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_bool_1 = 499; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_short4_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_short4_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "short4 a" + // ain2 = "bool b" + public result_int reduce_my_short4_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_bool_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "bool b" + public result_int reduce_my_short4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_rs_matrix2x2_0 = 500; + // ain1 = "short4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_rs_matrix2x2_1 = 501; + // ain1 = "short4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_short4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_MyStruct_0 = 502; + // ain1 = "short4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short4_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_short4_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_short4_MyStruct_1 = 503; + // ain1 = "short4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short4_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_short4_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "short4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_short4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_half_0 = 504; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_half_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "half b" + public result_int reduce_my_uchar_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_half_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "half b" + public result_int reduce_my_uchar_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_half_1 = 505; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_half_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "half b" + public result_int reduce_my_uchar_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_half_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "half b" + public result_int reduce_my_uchar_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_half2_0 = 506; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_half2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "half2 b" + public result_int reduce_my_uchar_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_half2_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "half2 b" + public result_int reduce_my_uchar_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_half2_1 = 507; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_half2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "half2 b" + public result_int reduce_my_uchar_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_half2_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "half2 b" + public result_int reduce_my_uchar_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_half4_0 = 508; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_half4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "half4 b" + public result_int reduce_my_uchar_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_half4_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "half4 b" + public result_int reduce_my_uchar_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_half4_1 = 509; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_half4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "half4 b" + public result_int reduce_my_uchar_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_half4_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "half4 b" + public result_int reduce_my_uchar_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_float_0 = 510; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_float_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "float b" + public result_int reduce_my_uchar_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_float_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "float b" + public result_int reduce_my_uchar_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_float_1 = 511; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_float_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "float b" + public result_int reduce_my_uchar_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_float_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "float b" + public result_int reduce_my_uchar_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_float2_0 = 512; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_float2_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "float2 b" + public result_int reduce_my_uchar_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_float2_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "float2 b" + public result_int reduce_my_uchar_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_float2_1 = 513; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_float2_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "float2 b" + public result_int reduce_my_uchar_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_float2_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "float2 b" + public result_int reduce_my_uchar_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_float4_0 = 514; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_float4_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "float4 b" + public result_int reduce_my_uchar_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_float4_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "float4 b" + public result_int reduce_my_uchar_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_float4_1 = 515; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_float4_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "float4 b" + public result_int reduce_my_uchar_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_float4_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "float4 b" + public result_int reduce_my_uchar_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_char_0 = 516; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_char_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "char b" + public result_int reduce_my_uchar_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_char_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "char b" + public result_int reduce_my_uchar_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_char_1 = 517; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_char_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "char b" + public result_int reduce_my_uchar_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_char_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "char b" + public result_int reduce_my_uchar_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_char2_0 = 518; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_char2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "char2 b" + public result_int reduce_my_uchar_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_char2_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "char2 b" + public result_int reduce_my_uchar_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_char2_1 = 519; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_char2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "char2 b" + public result_int reduce_my_uchar_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_char2_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "char2 b" + public result_int reduce_my_uchar_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_char4_0 = 520; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_char4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "char4 b" + public result_int reduce_my_uchar_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_char4_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "char4 b" + public result_int reduce_my_uchar_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_char4_1 = 521; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_char4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "char4 b" + public result_int reduce_my_uchar_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_char4_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "char4 b" + public result_int reduce_my_uchar_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_short_0 = 522; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_short_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "short b" + public result_int reduce_my_uchar_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_short_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "short b" + public result_int reduce_my_uchar_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_short_1 = 523; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_short_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "short b" + public result_int reduce_my_uchar_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_short_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "short b" + public result_int reduce_my_uchar_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_short2_0 = 524; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_short2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "short2 b" + public result_int reduce_my_uchar_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_short2_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "short2 b" + public result_int reduce_my_uchar_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_short2_1 = 525; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_short2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "short2 b" + public result_int reduce_my_uchar_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_short2_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "short2 b" + public result_int reduce_my_uchar_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_short4_0 = 526; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_short4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "short4 b" + public result_int reduce_my_uchar_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_short4_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "short4 b" + public result_int reduce_my_uchar_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_short4_1 = 527; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_short4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "short4 b" + public result_int reduce_my_uchar_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_short4_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "short4 b" + public result_int reduce_my_uchar_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_uchar_0 = 528; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_uchar_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "uchar b" + public result_int reduce_my_uchar_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_uchar_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "uchar b" + public result_int reduce_my_uchar_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_uchar_1 = 529; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_uchar_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "uchar b" + public result_int reduce_my_uchar_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_uchar_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "uchar b" + public result_int reduce_my_uchar_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_uchar2_0 = 530; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_uchar2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_uchar2_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_uchar2_1 = 531; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_uchar2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_uchar2_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_uchar4_0 = 532; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_uchar4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_uchar4_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_uchar4_1 = 533; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_uchar4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_uchar4_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_ushort_0 = 534; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_ushort_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "ushort b" + public result_int reduce_my_uchar_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_ushort_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "ushort b" + public result_int reduce_my_uchar_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_ushort_1 = 535; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_ushort_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "ushort b" + public result_int reduce_my_uchar_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_ushort_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "ushort b" + public result_int reduce_my_uchar_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_ushort2_0 = 536; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_ushort2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_ushort2_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_ushort2_1 = 537; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar_ushort2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_ushort2_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_ushort4_0 = 538; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_ushort4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_ushort4_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_ushort4_1 = 539; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar_ushort4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_ushort4_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_bool_0 = 540; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_bool_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "bool b" + public result_int reduce_my_uchar_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_bool_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "bool b" + public result_int reduce_my_uchar_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_bool_1 = 541; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_uchar_bool_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar a" + // ain2 = "bool b" + public result_int reduce_my_uchar_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_bool_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "bool b" + public result_int reduce_my_uchar_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_rs_matrix2x2_0 = 542; + // ain1 = "uchar a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_rs_matrix2x2_1 = 543; + // ain1 = "uchar a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_MyStruct_0 = 544; + // ain1 = "uchar a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar_MyStruct_1 = 545; + // ain1 = "uchar a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "uchar a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_half_0 = 546; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_half_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "half b" + public result_int reduce_my_uchar2_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_half_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "half b" + public result_int reduce_my_uchar2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_half_1 = 547; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_half_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "half b" + public result_int reduce_my_uchar2_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_half_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "half b" + public result_int reduce_my_uchar2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_half2_0 = 548; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_half2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar2_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_half2_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_half2_1 = 549; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_half2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar2_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_half2_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_half4_0 = 550; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_half4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar2_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_half4_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_half4_1 = 551; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_half4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar2_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_half4_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_float_0 = 552; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_float_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "float b" + public result_int reduce_my_uchar2_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_float_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "float b" + public result_int reduce_my_uchar2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_float_1 = 553; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_float_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "float b" + public result_int reduce_my_uchar2_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_float_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "float b" + public result_int reduce_my_uchar2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_float2_0 = 554; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_float2_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar2_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_float2_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_float2_1 = 555; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_float2_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar2_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_float2_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_float4_0 = 556; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_float4_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar2_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_float4_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_float4_1 = 557; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_float4_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar2_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_float4_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_char_0 = 558; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_char_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "char b" + public result_int reduce_my_uchar2_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_char_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "char b" + public result_int reduce_my_uchar2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_char_1 = 559; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_char_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "char b" + public result_int reduce_my_uchar2_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_char_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "char b" + public result_int reduce_my_uchar2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_char2_0 = 560; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_char2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar2_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_char2_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_char2_1 = 561; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_char2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar2_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_char2_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_char4_0 = 562; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_char4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar2_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_char4_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_char4_1 = 563; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_char4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar2_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_char4_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_short_0 = 564; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_short_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "short b" + public result_int reduce_my_uchar2_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_short_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "short b" + public result_int reduce_my_uchar2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_short_1 = 565; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_short_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "short b" + public result_int reduce_my_uchar2_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_short_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "short b" + public result_int reduce_my_uchar2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_short2_0 = 566; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_short2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar2_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_short2_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_short2_1 = 567; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_short2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar2_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_short2_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_short4_0 = 568; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_short4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar2_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_short4_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_short4_1 = 569; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_short4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar2_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_short4_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_uchar_0 = 570; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_uchar_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar2_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_uchar_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_uchar_1 = 571; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_uchar_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar2_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_uchar_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_uchar2_0 = 572; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_uchar2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar2_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_uchar2_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_uchar2_1 = 573; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_uchar2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar2_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_uchar2_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_uchar4_0 = 574; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_uchar4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar2_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_uchar4_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_uchar4_1 = 575; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_uchar4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar2_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_uchar4_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_ushort_0 = 576; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_ushort_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar2_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_ushort_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_ushort_1 = 577; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_ushort_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar2_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_ushort_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_ushort2_0 = 578; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_ushort2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar2_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_ushort2_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_ushort2_1 = 579; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar2_ushort2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar2_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_ushort2_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_ushort4_0 = 580; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_ushort4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar2_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_ushort4_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_ushort4_1 = 581; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar2_ushort4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar2_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_ushort4_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_bool_0 = 582; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_bool_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "bool b" + public result_int reduce_my_uchar2_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_bool_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "bool b" + public result_int reduce_my_uchar2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_bool_1 = 583; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_uchar2_bool_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar2_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar2 a" + // ain2 = "bool b" + public result_int reduce_my_uchar2_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_bool_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "bool b" + public result_int reduce_my_uchar2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_rs_matrix2x2_0 = 584; + // ain1 = "uchar2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_rs_matrix2x2_1 = 585; + // ain1 = "uchar2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_MyStruct_0 = 586; + // ain1 = "uchar2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar2_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar2_MyStruct_1 = 587; + // ain1 = "uchar2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar2_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar2_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "uchar2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_half_0 = 588; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_half_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "half b" + public result_int reduce_my_uchar4_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_half_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "half b" + public result_int reduce_my_uchar4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_half_1 = 589; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_half_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "half b" + public result_int reduce_my_uchar4_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_half_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "half b" + public result_int reduce_my_uchar4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_half2_0 = 590; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_half2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar4_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_half2_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_half2_1 = 591; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_half2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar4_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_half2_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "half2 b" + public result_int reduce_my_uchar4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_half4_0 = 592; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_half4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar4_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_half4_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_half4_1 = 593; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_half4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar4_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_half4_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "half4 b" + public result_int reduce_my_uchar4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_float_0 = 594; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_float_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "float b" + public result_int reduce_my_uchar4_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_float_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "float b" + public result_int reduce_my_uchar4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_float_1 = 595; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_float_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "float b" + public result_int reduce_my_uchar4_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_float_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "float b" + public result_int reduce_my_uchar4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_float2_0 = 596; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_float2_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar4_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_float2_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_float2_1 = 597; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_float2_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar4_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_float2_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "float2 b" + public result_int reduce_my_uchar4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_float4_0 = 598; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_float4_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar4_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_float4_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_float4_1 = 599; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_float4_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar4_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_float4_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "float4 b" + public result_int reduce_my_uchar4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_char_0 = 600; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_char_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "char b" + public result_int reduce_my_uchar4_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_char_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "char b" + public result_int reduce_my_uchar4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_char_1 = 601; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_char_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "char b" + public result_int reduce_my_uchar4_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_char_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "char b" + public result_int reduce_my_uchar4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_char2_0 = 602; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_char2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar4_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_char2_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_char2_1 = 603; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_char2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar4_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_char2_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "char2 b" + public result_int reduce_my_uchar4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_char4_0 = 604; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_char4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar4_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_char4_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_char4_1 = 605; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_char4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar4_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_char4_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "char4 b" + public result_int reduce_my_uchar4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_short_0 = 606; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_short_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "short b" + public result_int reduce_my_uchar4_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_short_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "short b" + public result_int reduce_my_uchar4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_short_1 = 607; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_short_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "short b" + public result_int reduce_my_uchar4_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_short_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "short b" + public result_int reduce_my_uchar4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_short2_0 = 608; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_short2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar4_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_short2_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_short2_1 = 609; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_short2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar4_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_short2_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "short2 b" + public result_int reduce_my_uchar4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_short4_0 = 610; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_short4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar4_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_short4_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_short4_1 = 611; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_short4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar4_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_short4_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "short4 b" + public result_int reduce_my_uchar4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_uchar_0 = 612; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_uchar_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar4_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_uchar_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_uchar_1 = 613; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_uchar_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar4_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_uchar_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "uchar b" + public result_int reduce_my_uchar4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_uchar2_0 = 614; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_uchar2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar4_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_uchar2_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_uchar2_1 = 615; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_uchar2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar4_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_uchar2_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_uchar4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_uchar4_0 = 616; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_uchar4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar4_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_uchar4_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_uchar4_1 = 617; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_uchar4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar4_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_uchar4_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_uchar4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_ushort_0 = 618; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_ushort_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar4_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_ushort_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_ushort_1 = 619; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_ushort_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar4_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_ushort_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "ushort b" + public result_int reduce_my_uchar4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_ushort2_0 = 620; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_ushort2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar4_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_ushort2_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_ushort2_1 = 621; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_uchar4_ushort2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar4_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_ushort2_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_uchar4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_ushort4_0 = 622; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_ushort4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar4_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_ushort4_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_ushort4_1 = 623; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_uchar4_ushort4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar4_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_ushort4_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_uchar4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_bool_0 = 624; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_bool_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "bool b" + public result_int reduce_my_uchar4_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_bool_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "bool b" + public result_int reduce_my_uchar4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_bool_1 = 625; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_uchar4_bool_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_uchar4_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "uchar4 a" + // ain2 = "bool b" + public result_int reduce_my_uchar4_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_bool_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "bool b" + public result_int reduce_my_uchar4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_rs_matrix2x2_0 = 626; + // ain1 = "uchar4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_rs_matrix2x2_1 = 627; + // ain1 = "uchar4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_uchar4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_MyStruct_0 = 628; + // ain1 = "uchar4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar4_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_uchar4_MyStruct_1 = 629; + // ain1 = "uchar4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar4_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_uchar4_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "uchar4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_uchar4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_half_0 = 630; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "half b" + public result_int reduce_my_ushort_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_half_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "half b" + public result_int reduce_my_ushort_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_half_1 = 631; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "half b" + public result_int reduce_my_ushort_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_half_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "half b" + public result_int reduce_my_ushort_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_half2_0 = 632; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "half2 b" + public result_int reduce_my_ushort_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_half2_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "half2 b" + public result_int reduce_my_ushort_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_half2_1 = 633; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "half2 b" + public result_int reduce_my_ushort_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_half2_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "half2 b" + public result_int reduce_my_ushort_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_half4_0 = 634; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "half4 b" + public result_int reduce_my_ushort_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_half4_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "half4 b" + public result_int reduce_my_ushort_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_half4_1 = 635; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "half4 b" + public result_int reduce_my_ushort_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_half4_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "half4 b" + public result_int reduce_my_ushort_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_float_0 = 636; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "float b" + public result_int reduce_my_ushort_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_float_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "float b" + public result_int reduce_my_ushort_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_float_1 = 637; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "float b" + public result_int reduce_my_ushort_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_float_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "float b" + public result_int reduce_my_ushort_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_float2_0 = 638; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "float2 b" + public result_int reduce_my_ushort_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_float2_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "float2 b" + public result_int reduce_my_ushort_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_float2_1 = 639; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "float2 b" + public result_int reduce_my_ushort_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_float2_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "float2 b" + public result_int reduce_my_ushort_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_float4_0 = 640; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "float4 b" + public result_int reduce_my_ushort_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_float4_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "float4 b" + public result_int reduce_my_ushort_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_float4_1 = 641; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "float4 b" + public result_int reduce_my_ushort_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_float4_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "float4 b" + public result_int reduce_my_ushort_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_char_0 = 642; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "char b" + public result_int reduce_my_ushort_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_char_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "char b" + public result_int reduce_my_ushort_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_char_1 = 643; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "char b" + public result_int reduce_my_ushort_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_char_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "char b" + public result_int reduce_my_ushort_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_char2_0 = 644; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "char2 b" + public result_int reduce_my_ushort_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_char2_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "char2 b" + public result_int reduce_my_ushort_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_char2_1 = 645; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "char2 b" + public result_int reduce_my_ushort_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_char2_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "char2 b" + public result_int reduce_my_ushort_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_char4_0 = 646; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "char4 b" + public result_int reduce_my_ushort_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_char4_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "char4 b" + public result_int reduce_my_ushort_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_char4_1 = 647; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "char4 b" + public result_int reduce_my_ushort_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_char4_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "char4 b" + public result_int reduce_my_ushort_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_short_0 = 648; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "short b" + public result_int reduce_my_ushort_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_short_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "short b" + public result_int reduce_my_ushort_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_short_1 = 649; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "short b" + public result_int reduce_my_ushort_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_short_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "short b" + public result_int reduce_my_ushort_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_short2_0 = 650; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "short2 b" + public result_int reduce_my_ushort_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_short2_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "short2 b" + public result_int reduce_my_ushort_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_short2_1 = 651; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "short2 b" + public result_int reduce_my_ushort_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_short2_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "short2 b" + public result_int reduce_my_ushort_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_short4_0 = 652; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "short4 b" + public result_int reduce_my_ushort_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_short4_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "short4 b" + public result_int reduce_my_ushort_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_short4_1 = 653; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "short4 b" + public result_int reduce_my_ushort_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_short4_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "short4 b" + public result_int reduce_my_ushort_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_uchar_0 = 654; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "uchar b" + public result_int reduce_my_ushort_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_uchar_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "uchar b" + public result_int reduce_my_ushort_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_uchar_1 = 655; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "uchar b" + public result_int reduce_my_ushort_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_uchar_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "uchar b" + public result_int reduce_my_ushort_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_uchar2_0 = 656; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_uchar2_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_uchar2_1 = 657; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_uchar2_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_uchar4_0 = 658; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_uchar4_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_uchar4_1 = 659; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_uchar4_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_ushort_0 = 660; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "ushort b" + public result_int reduce_my_ushort_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_ushort_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "ushort b" + public result_int reduce_my_ushort_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_ushort_1 = 661; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "ushort b" + public result_int reduce_my_ushort_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_ushort_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "ushort b" + public result_int reduce_my_ushort_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_ushort2_0 = 662; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_ushort2_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_ushort2_1 = 663; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_ushort2_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_ushort4_0 = 664; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_ushort4_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_ushort4_1 = 665; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_ushort4_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_bool_0 = 666; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "bool b" + public result_int reduce_my_ushort_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_bool_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "bool b" + public result_int reduce_my_ushort_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_bool_1 = 667; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_ushort_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort a" + // ain2 = "bool b" + public result_int reduce_my_ushort_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_bool_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "bool b" + public result_int reduce_my_ushort_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_rs_matrix2x2_0 = 668; + // ain1 = "ushort a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_rs_matrix2x2_1 = 669; + // ain1 = "ushort a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_MyStruct_0 = 670; + // ain1 = "ushort a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort_MyStruct_1 = 671; + // ain1 = "ushort a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "ushort a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_half_0 = 672; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "half b" + public result_int reduce_my_ushort2_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_half_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "half b" + public result_int reduce_my_ushort2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_half_1 = 673; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "half b" + public result_int reduce_my_ushort2_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_half_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "half b" + public result_int reduce_my_ushort2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_half2_0 = 674; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort2_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_half2_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_half2_1 = 675; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort2_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_half2_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_half4_0 = 676; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort2_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_half4_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_half4_1 = 677; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort2_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_half4_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_float_0 = 678; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "float b" + public result_int reduce_my_ushort2_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_float_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "float b" + public result_int reduce_my_ushort2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_float_1 = 679; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "float b" + public result_int reduce_my_ushort2_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_float_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "float b" + public result_int reduce_my_ushort2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_float2_0 = 680; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort2_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_float2_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_float2_1 = 681; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort2_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_float2_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_float4_0 = 682; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort2_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_float4_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_float4_1 = 683; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort2_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_float4_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_char_0 = 684; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "char b" + public result_int reduce_my_ushort2_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_char_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "char b" + public result_int reduce_my_ushort2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_char_1 = 685; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "char b" + public result_int reduce_my_ushort2_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_char_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "char b" + public result_int reduce_my_ushort2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_char2_0 = 686; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort2_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_char2_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_char2_1 = 687; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort2_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_char2_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_char4_0 = 688; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort2_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_char4_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_char4_1 = 689; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort2_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_char4_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_short_0 = 690; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "short b" + public result_int reduce_my_ushort2_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_short_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "short b" + public result_int reduce_my_ushort2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_short_1 = 691; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "short b" + public result_int reduce_my_ushort2_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_short_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "short b" + public result_int reduce_my_ushort2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_short2_0 = 692; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort2_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_short2_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_short2_1 = 693; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort2_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_short2_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_short4_0 = 694; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort2_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_short4_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_short4_1 = 695; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort2_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_short4_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_uchar_0 = 696; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort2_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_uchar_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_uchar_1 = 697; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort2_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_uchar_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_uchar2_0 = 698; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort2_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_uchar2_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_uchar2_1 = 699; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort2_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_uchar2_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_uchar4_0 = 700; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort2_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_uchar4_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_uchar4_1 = 701; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort2_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_uchar4_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_ushort_0 = 702; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort2_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_ushort_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_ushort_1 = 703; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort2_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_ushort_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_ushort2_0 = 704; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort2_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_ushort2_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_ushort2_1 = 705; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort2_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort2_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_ushort2_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_ushort4_0 = 706; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort2_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_ushort4_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_ushort4_1 = 707; + // in1 = "a", flattened 2-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort2_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort2_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_ushort4_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_bool_0 = 708; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "bool b" + public result_int reduce_my_ushort2_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_bool_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "bool b" + public result_int reduce_my_ushort2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_bool_1 = 709; + // in1 = "a", flattened 2-vectors + // in2 = "b" + public result_int reduce_my_ushort2_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 2 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort2_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort2 a" + // ain2 = "bool b" + public result_int reduce_my_ushort2_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_bool_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "bool b" + public result_int reduce_my_ushort2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_rs_matrix2x2_0 = 710; + // ain1 = "ushort2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_rs_matrix2x2_1 = 711; + // ain1 = "ushort2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_MyStruct_0 = 712; + // ain1 = "ushort2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort2_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort2_MyStruct_1 = 713; + // ain1 = "ushort2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort2_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort2_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "ushort2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_half_0 = 714; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_half_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "half b" + public result_int reduce_my_ushort4_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_half_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "half b" + public result_int reduce_my_ushort4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_half_1 = 715; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_half_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "half b" + public result_int reduce_my_ushort4_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_half_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "half b" + public result_int reduce_my_ushort4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_half2_0 = 716; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_half2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort4_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_half2_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_half2_1 = 717; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_half2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort4_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_half2_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "half2 b" + public result_int reduce_my_ushort4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_half4_0 = 718; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_half4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort4_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_half4_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_half4_1 = 719; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_half4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort4_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_half4_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "half4 b" + public result_int reduce_my_ushort4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_float_0 = 720; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_float_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "float b" + public result_int reduce_my_ushort4_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_float_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "float b" + public result_int reduce_my_ushort4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_float_1 = 721; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_float_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "float b" + public result_int reduce_my_ushort4_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_float_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "float b" + public result_int reduce_my_ushort4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_float2_0 = 722; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_float2_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort4_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_float2_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_float2_1 = 723; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_float2_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort4_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_float2_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "float2 b" + public result_int reduce_my_ushort4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_float4_0 = 724; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_float4_0(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort4_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_float4_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_float4_1 = 725; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_float4_1(short[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort4_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_float4_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "float4 b" + public result_int reduce_my_ushort4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_char_0 = 726; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_char_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "char b" + public result_int reduce_my_ushort4_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_char_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "char b" + public result_int reduce_my_ushort4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_char_1 = 727; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_char_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "char b" + public result_int reduce_my_ushort4_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_char_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "char b" + public result_int reduce_my_ushort4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_char2_0 = 728; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_char2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort4_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_char2_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_char2_1 = 729; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_char2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort4_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_char2_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "char2 b" + public result_int reduce_my_ushort4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_char4_0 = 730; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_char4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort4_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_char4_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_char4_1 = 731; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_char4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort4_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_char4_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "char4 b" + public result_int reduce_my_ushort4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_short_0 = 732; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_short_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "short b" + public result_int reduce_my_ushort4_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_short_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "short b" + public result_int reduce_my_ushort4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_short_1 = 733; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_short_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "short b" + public result_int reduce_my_ushort4_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_short_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "short b" + public result_int reduce_my_ushort4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_short2_0 = 734; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_short2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort4_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_short2_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_short2_1 = 735; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_short2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort4_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_short2_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "short2 b" + public result_int reduce_my_ushort4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_short4_0 = 736; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_short4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort4_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_short4_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_short4_1 = 737; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_short4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort4_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_short4_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "short4 b" + public result_int reduce_my_ushort4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_uchar_0 = 738; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_uchar_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort4_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_uchar_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_uchar_1 = 739; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_uchar_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort4_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_uchar_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "uchar b" + public result_int reduce_my_ushort4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_uchar2_0 = 740; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_uchar2_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort4_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_uchar2_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_uchar2_1 = 741; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_uchar2_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort4_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_uchar2_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "uchar2 b" + public result_int reduce_my_ushort4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_uchar4_0 = 742; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_uchar4_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort4_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_uchar4_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_uchar4_1 = 743; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_uchar4_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort4_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_uchar4_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "uchar4 b" + public result_int reduce_my_ushort4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_ushort_0 = 744; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_ushort_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort4_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_ushort_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_ushort_1 = 745; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_ushort_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort4_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_ushort_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "ushort b" + public result_int reduce_my_ushort4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_ushort2_0 = 746; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_ushort2_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort4_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_ushort2_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_ushort2_1 = 747; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 2-vectors + public result_int reduce_my_ushort4_ushort2_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort4_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_ushort2_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "ushort2 b" + public result_int reduce_my_ushort4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_ushort4_0 = 748; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_ushort4_0(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort4_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_ushort4_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_ushort4_1 = 749; + // in1 = "a", flattened 4-vectors + // in2 = "b", flattened 4-vectors + public result_int reduce_my_ushort4_ushort4_1(short[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort4_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_ushort4_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "ushort4 b" + public result_int reduce_my_ushort4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_bool_0 = 750; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_bool_0(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "bool b" + public result_int reduce_my_ushort4_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_bool_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "bool b" + public result_int reduce_my_ushort4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_bool_1 = 751; + // in1 = "a", flattened 4-vectors + // in2 = "b" + public result_int reduce_my_ushort4_bool_1(short[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length / 4 != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_ushort4_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "ushort4 a" + // ain2 = "bool b" + public result_int reduce_my_ushort4_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_bool_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "bool b" + public result_int reduce_my_ushort4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_rs_matrix2x2_0 = 752; + // ain1 = "ushort4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_rs_matrix2x2_1 = 753; + // ain1 = "ushort4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_ushort4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_MyStruct_0 = 754; + // ain1 = "ushort4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort4_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_ushort4_MyStruct_1 = 755; + // ain1 = "ushort4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort4_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_ushort4_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "ushort4 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_ushort4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_half_0 = 756; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_half_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_half_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "half b" + public result_int reduce_my_bool_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_half_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "half b" + public result_int reduce_my_bool_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_half_1 = 757; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_half_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_half_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "half b" + public result_int reduce_my_bool_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_half_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "half b" + public result_int reduce_my_bool_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_half2_0 = 758; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_half2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_half2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "half2 b" + public result_int reduce_my_bool_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_half2_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "half2 b" + public result_int reduce_my_bool_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_half2_1 = 759; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_half2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_half2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "half2 b" + public result_int reduce_my_bool_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_half2_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "half2 b" + public result_int reduce_my_bool_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_half4_0 = 760; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_half4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_half4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "half4 b" + public result_int reduce_my_bool_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_half4_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "half4 b" + public result_int reduce_my_bool_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_half4_1 = 761; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_half4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_half4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "half4 b" + public result_int reduce_my_bool_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_half4_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "half4 b" + public result_int reduce_my_bool_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_float_0 = 762; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_float_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_float_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "float b" + public result_int reduce_my_bool_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_float_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "float b" + public result_int reduce_my_bool_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_float_1 = 763; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_float_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_float_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "float b" + public result_int reduce_my_bool_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_float_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "float b" + public result_int reduce_my_bool_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_float2_0 = 764; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_float2_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_float2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "float2 b" + public result_int reduce_my_bool_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_float2_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "float2 b" + public result_int reduce_my_bool_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_float2_1 = 765; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_float2_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_float2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "float2 b" + public result_int reduce_my_bool_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_float2_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "float2 b" + public result_int reduce_my_bool_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_float4_0 = 766; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_float4_0(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_float4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "float4 b" + public result_int reduce_my_bool_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_float4_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "float4 b" + public result_int reduce_my_bool_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_float4_1 = 767; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_float4_1(byte[] in1, float[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_float4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "float4 b" + public result_int reduce_my_bool_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_float4_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "float4 b" + public result_int reduce_my_bool_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_char_0 = 768; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_char_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_char_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "char b" + public result_int reduce_my_bool_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_char_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "char b" + public result_int reduce_my_bool_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_char_1 = 769; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_char_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_char_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "char b" + public result_int reduce_my_bool_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_char_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "char b" + public result_int reduce_my_bool_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_char2_0 = 770; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_char2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_char2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "char2 b" + public result_int reduce_my_bool_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_char2_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "char2 b" + public result_int reduce_my_bool_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_char2_1 = 771; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_char2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_char2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "char2 b" + public result_int reduce_my_bool_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_char2_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "char2 b" + public result_int reduce_my_bool_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_char4_0 = 772; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_char4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_char4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "char4 b" + public result_int reduce_my_bool_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_char4_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "char4 b" + public result_int reduce_my_bool_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_char4_1 = 773; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_char4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_char4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "char4 b" + public result_int reduce_my_bool_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_char4_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "char4 b" + public result_int reduce_my_bool_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_short_0 = 774; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_short_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_short_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "short b" + public result_int reduce_my_bool_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_short_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "short b" + public result_int reduce_my_bool_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_short_1 = 775; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_short_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_short_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "short b" + public result_int reduce_my_bool_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_short_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "short b" + public result_int reduce_my_bool_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_short2_0 = 776; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_short2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_short2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "short2 b" + public result_int reduce_my_bool_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_short2_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "short2 b" + public result_int reduce_my_bool_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_short2_1 = 777; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_short2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_short2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "short2 b" + public result_int reduce_my_bool_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_short2_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "short2 b" + public result_int reduce_my_bool_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_short4_0 = 778; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_short4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_short4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "short4 b" + public result_int reduce_my_bool_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_short4_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "short4 b" + public result_int reduce_my_bool_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_short4_1 = 779; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_short4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_short4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "short4 b" + public result_int reduce_my_bool_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_short4_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "short4 b" + public result_int reduce_my_bool_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_uchar_0 = 780; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_uchar_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_uchar_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "uchar b" + public result_int reduce_my_bool_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_uchar_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "uchar b" + public result_int reduce_my_bool_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_uchar_1 = 781; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_uchar_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_uchar_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "uchar b" + public result_int reduce_my_bool_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_uchar_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "uchar b" + public result_int reduce_my_bool_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_uchar2_0 = 782; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_uchar2_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_uchar2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "uchar2 b" + public result_int reduce_my_bool_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_uchar2_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "uchar2 b" + public result_int reduce_my_bool_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_uchar2_1 = 783; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_uchar2_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_uchar2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "uchar2 b" + public result_int reduce_my_bool_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_uchar2_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "uchar2 b" + public result_int reduce_my_bool_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_uchar4_0 = 784; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_uchar4_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_uchar4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "uchar4 b" + public result_int reduce_my_bool_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_uchar4_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "uchar4 b" + public result_int reduce_my_bool_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_uchar4_1 = 785; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_uchar4_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_uchar4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "uchar4 b" + public result_int reduce_my_bool_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_uchar4_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "uchar4 b" + public result_int reduce_my_bool_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_ushort_0 = 786; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_ushort_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_ushort_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "ushort b" + public result_int reduce_my_bool_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_ushort_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "ushort b" + public result_int reduce_my_bool_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_ushort_1 = 787; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_ushort_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_ushort_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "ushort b" + public result_int reduce_my_bool_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_ushort_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "ushort b" + public result_int reduce_my_bool_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_ushort2_0 = 788; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_ushort2_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_ushort2_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "ushort2 b" + public result_int reduce_my_bool_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_ushort2_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "ushort2 b" + public result_int reduce_my_bool_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_ushort2_1 = 789; + // in1 = "a" + // in2 = "b", flattened 2-vectors + public result_int reduce_my_bool_ushort2_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 2) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_ushort2_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "ushort2 b" + public result_int reduce_my_bool_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_ushort2_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "ushort2 b" + public result_int reduce_my_bool_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_ushort4_0 = 790; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_ushort4_0(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_ushort4_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "ushort4 b" + public result_int reduce_my_bool_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_ushort4_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "ushort4 b" + public result_int reduce_my_bool_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_ushort4_1 = 791; + // in1 = "a" + // in2 = "b", flattened 4-vectors + public result_int reduce_my_bool_ushort4_1(byte[] in1, short[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in2.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length / 4) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_ushort4_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "ushort4 b" + public result_int reduce_my_bool_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_ushort4_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "ushort4 b" + public result_int reduce_my_bool_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_bool_0 = 792; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_bool_0(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_bool_0(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "bool b" + public result_int reduce_my_bool_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_bool_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "bool b" + public result_int reduce_my_bool_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_bool_1 = 793; + // in1 = "a" + // in2 = "b" + public result_int reduce_my_bool_bool_1(byte[] in1, byte[] in2) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + // Verify that "in2" is non-null. + if (in2 == null) { + throw new RSIllegalArgumentException("Array \"in2\" is null!"); + } + // Verify that input array lengths are the same. + if (in1.length != in2.length) { + throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!"); + } + Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length); + ain2.setAutoPadding(true); + ain2.copyFrom(in2); + + result_int result = reduce_my_bool_bool_1(ain1, ain2, null); + result.mTempIns = new Allocation[]{ain1, ain2}; + return result; + } + + // ain1 = "bool a" + // ain2 = "bool b" + public result_int reduce_my_bool_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_bool_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "bool b" + public result_int reduce_my_bool_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_rs_matrix2x2_0 = 794; + // ain1 = "bool a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_bool_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_bool_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_rs_matrix2x2_1 = 795; + // ain1 = "bool a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_bool_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_bool_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_MyStruct_0 = 796; + // ain1 = "bool a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_bool_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_bool_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_bool_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_bool_MyStruct_1 = 797; + // ain1 = "bool a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_bool_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_bool_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "bool a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_bool_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_half_0 = 798; + // ain1 = "rs_matrix2x2 a" + // ain2 = "half b" + public result_int reduce_my_rs_matrix2x2_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_half_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "half b" + public result_int reduce_my_rs_matrix2x2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_half_1 = 799; + // ain1 = "rs_matrix2x2 a" + // ain2 = "half b" + public result_int reduce_my_rs_matrix2x2_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_half_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "half b" + public result_int reduce_my_rs_matrix2x2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_half2_0 = 800; + // ain1 = "rs_matrix2x2 a" + // ain2 = "half2 b" + public result_int reduce_my_rs_matrix2x2_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_half2_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "half2 b" + public result_int reduce_my_rs_matrix2x2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_half2_1 = 801; + // ain1 = "rs_matrix2x2 a" + // ain2 = "half2 b" + public result_int reduce_my_rs_matrix2x2_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_half2_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "half2 b" + public result_int reduce_my_rs_matrix2x2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_half4_0 = 802; + // ain1 = "rs_matrix2x2 a" + // ain2 = "half4 b" + public result_int reduce_my_rs_matrix2x2_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_half4_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "half4 b" + public result_int reduce_my_rs_matrix2x2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_half4_1 = 803; + // ain1 = "rs_matrix2x2 a" + // ain2 = "half4 b" + public result_int reduce_my_rs_matrix2x2_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_half4_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "half4 b" + public result_int reduce_my_rs_matrix2x2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_float_0 = 804; + // ain1 = "rs_matrix2x2 a" + // ain2 = "float b" + public result_int reduce_my_rs_matrix2x2_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_float_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "float b" + public result_int reduce_my_rs_matrix2x2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_float_1 = 805; + // ain1 = "rs_matrix2x2 a" + // ain2 = "float b" + public result_int reduce_my_rs_matrix2x2_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_float_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "float b" + public result_int reduce_my_rs_matrix2x2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_float2_0 = 806; + // ain1 = "rs_matrix2x2 a" + // ain2 = "float2 b" + public result_int reduce_my_rs_matrix2x2_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_float2_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "float2 b" + public result_int reduce_my_rs_matrix2x2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_float2_1 = 807; + // ain1 = "rs_matrix2x2 a" + // ain2 = "float2 b" + public result_int reduce_my_rs_matrix2x2_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_float2_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "float2 b" + public result_int reduce_my_rs_matrix2x2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_float4_0 = 808; + // ain1 = "rs_matrix2x2 a" + // ain2 = "float4 b" + public result_int reduce_my_rs_matrix2x2_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_float4_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "float4 b" + public result_int reduce_my_rs_matrix2x2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_float4_1 = 809; + // ain1 = "rs_matrix2x2 a" + // ain2 = "float4 b" + public result_int reduce_my_rs_matrix2x2_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_float4_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "float4 b" + public result_int reduce_my_rs_matrix2x2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_char_0 = 810; + // ain1 = "rs_matrix2x2 a" + // ain2 = "char b" + public result_int reduce_my_rs_matrix2x2_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_char_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "char b" + public result_int reduce_my_rs_matrix2x2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_char_1 = 811; + // ain1 = "rs_matrix2x2 a" + // ain2 = "char b" + public result_int reduce_my_rs_matrix2x2_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_char_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "char b" + public result_int reduce_my_rs_matrix2x2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_char2_0 = 812; + // ain1 = "rs_matrix2x2 a" + // ain2 = "char2 b" + public result_int reduce_my_rs_matrix2x2_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_char2_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "char2 b" + public result_int reduce_my_rs_matrix2x2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_char2_1 = 813; + // ain1 = "rs_matrix2x2 a" + // ain2 = "char2 b" + public result_int reduce_my_rs_matrix2x2_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_char2_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "char2 b" + public result_int reduce_my_rs_matrix2x2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_char4_0 = 814; + // ain1 = "rs_matrix2x2 a" + // ain2 = "char4 b" + public result_int reduce_my_rs_matrix2x2_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_char4_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "char4 b" + public result_int reduce_my_rs_matrix2x2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_char4_1 = 815; + // ain1 = "rs_matrix2x2 a" + // ain2 = "char4 b" + public result_int reduce_my_rs_matrix2x2_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_char4_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "char4 b" + public result_int reduce_my_rs_matrix2x2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_short_0 = 816; + // ain1 = "rs_matrix2x2 a" + // ain2 = "short b" + public result_int reduce_my_rs_matrix2x2_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_short_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "short b" + public result_int reduce_my_rs_matrix2x2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_short_1 = 817; + // ain1 = "rs_matrix2x2 a" + // ain2 = "short b" + public result_int reduce_my_rs_matrix2x2_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_short_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "short b" + public result_int reduce_my_rs_matrix2x2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_short2_0 = 818; + // ain1 = "rs_matrix2x2 a" + // ain2 = "short2 b" + public result_int reduce_my_rs_matrix2x2_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_short2_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "short2 b" + public result_int reduce_my_rs_matrix2x2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_short2_1 = 819; + // ain1 = "rs_matrix2x2 a" + // ain2 = "short2 b" + public result_int reduce_my_rs_matrix2x2_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_short2_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "short2 b" + public result_int reduce_my_rs_matrix2x2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_short4_0 = 820; + // ain1 = "rs_matrix2x2 a" + // ain2 = "short4 b" + public result_int reduce_my_rs_matrix2x2_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_short4_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "short4 b" + public result_int reduce_my_rs_matrix2x2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_short4_1 = 821; + // ain1 = "rs_matrix2x2 a" + // ain2 = "short4 b" + public result_int reduce_my_rs_matrix2x2_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_short4_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "short4 b" + public result_int reduce_my_rs_matrix2x2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_uchar_0 = 822; + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar b" + public result_int reduce_my_rs_matrix2x2_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_uchar_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar b" + public result_int reduce_my_rs_matrix2x2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_uchar_1 = 823; + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar b" + public result_int reduce_my_rs_matrix2x2_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_uchar_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar b" + public result_int reduce_my_rs_matrix2x2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_uchar2_0 = 824; + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_rs_matrix2x2_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_uchar2_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_rs_matrix2x2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_uchar2_1 = 825; + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_rs_matrix2x2_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_uchar2_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar2 b" + public result_int reduce_my_rs_matrix2x2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_uchar4_0 = 826; + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_rs_matrix2x2_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_uchar4_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_rs_matrix2x2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_uchar4_1 = 827; + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_rs_matrix2x2_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_uchar4_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "uchar4 b" + public result_int reduce_my_rs_matrix2x2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_ushort_0 = 828; + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort b" + public result_int reduce_my_rs_matrix2x2_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_ushort_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort b" + public result_int reduce_my_rs_matrix2x2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_ushort_1 = 829; + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort b" + public result_int reduce_my_rs_matrix2x2_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_ushort_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort b" + public result_int reduce_my_rs_matrix2x2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_ushort2_0 = 830; + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_rs_matrix2x2_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_ushort2_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_rs_matrix2x2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_ushort2_1 = 831; + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_rs_matrix2x2_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_ushort2_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort2 b" + public result_int reduce_my_rs_matrix2x2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_ushort4_0 = 832; + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_rs_matrix2x2_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_ushort4_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_rs_matrix2x2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_ushort4_1 = 833; + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_rs_matrix2x2_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_ushort4_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "ushort4 b" + public result_int reduce_my_rs_matrix2x2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_bool_0 = 834; + // ain1 = "rs_matrix2x2 a" + // ain2 = "bool b" + public result_int reduce_my_rs_matrix2x2_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_bool_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "bool b" + public result_int reduce_my_rs_matrix2x2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_bool_1 = 835; + // ain1 = "rs_matrix2x2 a" + // ain2 = "bool b" + public result_int reduce_my_rs_matrix2x2_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_bool_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "bool b" + public result_int reduce_my_rs_matrix2x2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_0 = 836; + // ain1 = "rs_matrix2x2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_1 = 837; + // ain1 = "rs_matrix2x2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_MyStruct_0 = 838; + // ain1 = "rs_matrix2x2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_rs_matrix2x2_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_rs_matrix2x2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_rs_matrix2x2_MyStruct_1 = 839; + // ain1 = "rs_matrix2x2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_rs_matrix2x2_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_rs_matrix2x2_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "rs_matrix2x2 a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_rs_matrix2x2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_rs_matrix2x2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_half_0 = 840; + // ain1 = "/* struct <> */ a" + // ain2 = "half b" + public result_int reduce_my_MyStruct_half_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_half_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "half b" + public result_int reduce_my_MyStruct_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_half_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_half_1 = 841; + // ain1 = "/* struct <> */ a" + // ain2 = "half b" + public result_int reduce_my_MyStruct_half_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_half_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "half b" + public result_int reduce_my_MyStruct_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_half_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_half2_0 = 842; + // ain1 = "/* struct <> */ a" + // ain2 = "half2 b" + public result_int reduce_my_MyStruct_half2_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_half2_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "half2 b" + public result_int reduce_my_MyStruct_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_half2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_half2_1 = 843; + // ain1 = "/* struct <> */ a" + // ain2 = "half2 b" + public result_int reduce_my_MyStruct_half2_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_half2_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "half2 b" + public result_int reduce_my_MyStruct_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_half2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_half4_0 = 844; + // ain1 = "/* struct <> */ a" + // ain2 = "half4 b" + public result_int reduce_my_MyStruct_half4_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_half4_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "half4 b" + public result_int reduce_my_MyStruct_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_half4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_half4_1 = 845; + // ain1 = "/* struct <> */ a" + // ain2 = "half4 b" + public result_int reduce_my_MyStruct_half4_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_half4_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "half4 b" + public result_int reduce_my_MyStruct_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_half4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_float_0 = 846; + // ain1 = "/* struct <> */ a" + // ain2 = "float b" + public result_int reduce_my_MyStruct_float_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_float_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "float b" + public result_int reduce_my_MyStruct_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_float_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_float_1 = 847; + // ain1 = "/* struct <> */ a" + // ain2 = "float b" + public result_int reduce_my_MyStruct_float_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_float_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "float b" + public result_int reduce_my_MyStruct_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_float_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_float2_0 = 848; + // ain1 = "/* struct <> */ a" + // ain2 = "float2 b" + public result_int reduce_my_MyStruct_float2_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_float2_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "float2 b" + public result_int reduce_my_MyStruct_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_float2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_float2_1 = 849; + // ain1 = "/* struct <> */ a" + // ain2 = "float2 b" + public result_int reduce_my_MyStruct_float2_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_float2_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "float2 b" + public result_int reduce_my_MyStruct_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_float2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_float4_0 = 850; + // ain1 = "/* struct <> */ a" + // ain2 = "float4 b" + public result_int reduce_my_MyStruct_float4_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_float4_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "float4 b" + public result_int reduce_my_MyStruct_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_float4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_float4_1 = 851; + // ain1 = "/* struct <> */ a" + // ain2 = "float4 b" + public result_int reduce_my_MyStruct_float4_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_float4_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "float4 b" + public result_int reduce_my_MyStruct_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_float4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_char_0 = 852; + // ain1 = "/* struct <> */ a" + // ain2 = "char b" + public result_int reduce_my_MyStruct_char_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_char_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "char b" + public result_int reduce_my_MyStruct_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_char_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_char_1 = 853; + // ain1 = "/* struct <> */ a" + // ain2 = "char b" + public result_int reduce_my_MyStruct_char_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_char_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "char b" + public result_int reduce_my_MyStruct_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_char_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_char2_0 = 854; + // ain1 = "/* struct <> */ a" + // ain2 = "char2 b" + public result_int reduce_my_MyStruct_char2_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_char2_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "char2 b" + public result_int reduce_my_MyStruct_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_char2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_char2_1 = 855; + // ain1 = "/* struct <> */ a" + // ain2 = "char2 b" + public result_int reduce_my_MyStruct_char2_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_char2_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "char2 b" + public result_int reduce_my_MyStruct_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_char2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_char4_0 = 856; + // ain1 = "/* struct <> */ a" + // ain2 = "char4 b" + public result_int reduce_my_MyStruct_char4_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_char4_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "char4 b" + public result_int reduce_my_MyStruct_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_char4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_char4_1 = 857; + // ain1 = "/* struct <> */ a" + // ain2 = "char4 b" + public result_int reduce_my_MyStruct_char4_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_char4_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "char4 b" + public result_int reduce_my_MyStruct_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_char4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_short_0 = 858; + // ain1 = "/* struct <> */ a" + // ain2 = "short b" + public result_int reduce_my_MyStruct_short_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_short_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "short b" + public result_int reduce_my_MyStruct_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_short_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_short_1 = 859; + // ain1 = "/* struct <> */ a" + // ain2 = "short b" + public result_int reduce_my_MyStruct_short_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_short_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "short b" + public result_int reduce_my_MyStruct_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_short_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_short2_0 = 860; + // ain1 = "/* struct <> */ a" + // ain2 = "short2 b" + public result_int reduce_my_MyStruct_short2_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_short2_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "short2 b" + public result_int reduce_my_MyStruct_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_short2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_short2_1 = 861; + // ain1 = "/* struct <> */ a" + // ain2 = "short2 b" + public result_int reduce_my_MyStruct_short2_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_short2_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "short2 b" + public result_int reduce_my_MyStruct_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_short2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_short4_0 = 862; + // ain1 = "/* struct <> */ a" + // ain2 = "short4 b" + public result_int reduce_my_MyStruct_short4_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_short4_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "short4 b" + public result_int reduce_my_MyStruct_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_short4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_short4_1 = 863; + // ain1 = "/* struct <> */ a" + // ain2 = "short4 b" + public result_int reduce_my_MyStruct_short4_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_short4_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "short4 b" + public result_int reduce_my_MyStruct_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_short4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_uchar_0 = 864; + // ain1 = "/* struct <> */ a" + // ain2 = "uchar b" + public result_int reduce_my_MyStruct_uchar_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_uchar_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "uchar b" + public result_int reduce_my_MyStruct_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_uchar_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_uchar_1 = 865; + // ain1 = "/* struct <> */ a" + // ain2 = "uchar b" + public result_int reduce_my_MyStruct_uchar_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_uchar_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "uchar b" + public result_int reduce_my_MyStruct_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_uchar_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_uchar2_0 = 866; + // ain1 = "/* struct <> */ a" + // ain2 = "uchar2 b" + public result_int reduce_my_MyStruct_uchar2_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_uchar2_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "uchar2 b" + public result_int reduce_my_MyStruct_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_uchar2_1 = 867; + // ain1 = "/* struct <> */ a" + // ain2 = "uchar2 b" + public result_int reduce_my_MyStruct_uchar2_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_uchar2_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "uchar2 b" + public result_int reduce_my_MyStruct_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_uchar4_0 = 868; + // ain1 = "/* struct <> */ a" + // ain2 = "uchar4 b" + public result_int reduce_my_MyStruct_uchar4_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_uchar4_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "uchar4 b" + public result_int reduce_my_MyStruct_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_uchar4_1 = 869; + // ain1 = "/* struct <> */ a" + // ain2 = "uchar4 b" + public result_int reduce_my_MyStruct_uchar4_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_uchar4_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "uchar4 b" + public result_int reduce_my_MyStruct_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_ushort_0 = 870; + // ain1 = "/* struct <> */ a" + // ain2 = "ushort b" + public result_int reduce_my_MyStruct_ushort_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_ushort_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "ushort b" + public result_int reduce_my_MyStruct_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_ushort_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_ushort_1 = 871; + // ain1 = "/* struct <> */ a" + // ain2 = "ushort b" + public result_int reduce_my_MyStruct_ushort_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_ushort_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "ushort b" + public result_int reduce_my_MyStruct_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_ushort_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_ushort2_0 = 872; + // ain1 = "/* struct <> */ a" + // ain2 = "ushort2 b" + public result_int reduce_my_MyStruct_ushort2_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_ushort2_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "ushort2 b" + public result_int reduce_my_MyStruct_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_ushort2_1 = 873; + // ain1 = "/* struct <> */ a" + // ain2 = "ushort2 b" + public result_int reduce_my_MyStruct_ushort2_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_ushort2_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "ushort2 b" + public result_int reduce_my_MyStruct_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_ushort4_0 = 874; + // ain1 = "/* struct <> */ a" + // ain2 = "ushort4 b" + public result_int reduce_my_MyStruct_ushort4_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_ushort4_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "ushort4 b" + public result_int reduce_my_MyStruct_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_ushort4_1 = 875; + // ain1 = "/* struct <> */ a" + // ain2 = "ushort4 b" + public result_int reduce_my_MyStruct_ushort4_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_ushort4_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "ushort4 b" + public result_int reduce_my_MyStruct_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_bool_0 = 876; + // ain1 = "/* struct <> */ a" + // ain2 = "bool b" + public result_int reduce_my_MyStruct_bool_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_bool_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "bool b" + public result_int reduce_my_MyStruct_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_bool_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_bool_1 = 877; + // ain1 = "/* struct <> */ a" + // ain2 = "bool b" + public result_int reduce_my_MyStruct_bool_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_bool_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "bool b" + public result_int reduce_my_MyStruct_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_bool_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_rs_matrix2x2_0 = 878; + // ain1 = "/* struct <> */ a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_MyStruct_rs_matrix2x2_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_rs_matrix2x2_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_MyStruct_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_rs_matrix2x2_1 = 879; + // ain1 = "/* struct <> */ a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_MyStruct_rs_matrix2x2_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_rs_matrix2x2_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "rs_matrix2x2 b" + public result_int reduce_my_MyStruct_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_MyStruct_0 = 880; + // ain1 = "/* struct <> */ a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_MyStruct_MyStruct_0(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_MyStruct_0(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_MyStruct_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_MyStruct_MyStruct_1 = 881; + // ain1 = "/* struct <> */ a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_MyStruct_MyStruct_1(Allocation ain1, Allocation ain2) { + return reduce_my_MyStruct_MyStruct_1(ain1, ain2, null); + } + + // ain1 = "/* struct <> */ a" + // ain2 = "/* struct <> */ b" + public result_int reduce_my_MyStruct_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) { + Type t0, t1; + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // check ain2 + if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + // Verify dimensions + t0 = ain1.getType(); + t1 = ain2.getType(); + if ((t0.getCount() != t1.getCount()) || + (t0.getX() != t1.getX()) || + (t0.getY() != t1.getY()) || + (t0.getZ() != t1.getZ()) || + (t0.hasFaces() != t1.hasFaces()) || + (t0.hasMipmaps() != t1.hasMipmaps())) { + throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!"); + } + + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_MyStruct_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc); + return new result_int(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_inputs/ScriptField_MyStruct.java.expect b/slang/tests/P_reduce_general_inputs/ScriptField_MyStruct.java.expect new file mode 100644 index 0000000..182f920 --- /dev/null +++ b/slang/tests/P_reduce_general_inputs/ScriptField_MyStruct.java.expect
@@ -0,0 +1,200 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_inputs.rs + */ + +package inputs; + +import android.renderscript.*; +import inputs.reduce_general_inputsBitCode; + +/** + * @hide + */ +public class ScriptField_MyStruct extends android.renderscript.Script.FieldBase { + static public class Item { + + float f; + double d; + + Item() { + } + + } + + private Item mItemArray[]; + private FieldPacker mIOBuffer; + private static java.lang.ref.WeakReference<Element> mElementCache = new java.lang.ref.WeakReference<Element>(null); + public static Element createElement(RenderScript rs) { + Element.Builder eb = new Element.Builder(rs); + eb.add(Element.F32(rs), "f"); + eb.add(Element.U32(rs), "#rs_padding_1"); + eb.add(Element.F64(rs), "d"); + return eb.create(); + } + + private ScriptField_MyStruct(RenderScript rs) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + } + + public ScriptField_MyStruct(RenderScript rs, int count) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + init(rs, count); + } + + public ScriptField_MyStruct(RenderScript rs, int count, int usages) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + init(rs, count, usages); + } + + public static ScriptField_MyStruct create1D(RenderScript rs, int dimX, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + obj.mAllocation = Allocation.createSized(rs, obj.mElement, dimX, usages); + return obj; + } + + public static ScriptField_MyStruct create1D(RenderScript rs, int dimX) { + return create1D(rs, dimX, Allocation.USAGE_SCRIPT); + } + + public static ScriptField_MyStruct create2D(RenderScript rs, int dimX, int dimY) { + return create2D(rs, dimX, dimY, Allocation.USAGE_SCRIPT); + } + + public static ScriptField_MyStruct create2D(RenderScript rs, int dimX, int dimY, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + Type.Builder b = new Type.Builder(rs, obj.mElement); + b.setX(dimX); + b.setY(dimY); + Type t = b.create(); + obj.mAllocation = Allocation.createTyped(rs, t, usages); + return obj; + } + + public static Type.Builder createTypeBuilder(RenderScript rs) { + Element e = createElement(rs); + return new Type.Builder(rs, e); + } + + public static ScriptField_MyStruct createCustom(RenderScript rs, Type.Builder tb, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + Type t = tb.create(); + if (t.getElement() != obj.mElement) { + throw new RSIllegalArgumentException("Type.Builder did not match expected element type."); + } + obj.mAllocation = Allocation.createTyped(rs, t, usages); + return obj; + } + + private void copyToArrayLocal(Item i, FieldPacker fp) { + fp.addF32(i.f); + fp.skip(4); + fp.addF64(i.d); + } + + private void copyToArray(Item i, int index) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + mIOBuffer.reset(index * mElement.getBytesSize()); + copyToArrayLocal(i, mIOBuffer); + } + + public synchronized void set(Item i, int index, boolean copyNow) { + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + mItemArray[index] = i; + if (copyNow) { + copyToArray(i, index); + FieldPacker fp = new FieldPacker(mElement.getBytesSize()); + copyToArrayLocal(i, fp); + mAllocation.setFromFieldPacker(index, fp); + } + + } + + public synchronized Item get(int index) { + if (mItemArray == null) return null; + return mItemArray[index]; + } + + public synchronized void set_f(int index, float v, boolean copyNow) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + if (mItemArray[index] == null) mItemArray[index] = new Item(); + mItemArray[index].f = v; + if (copyNow) { + mIOBuffer.reset(index * mElement.getBytesSize()); + mIOBuffer.addF32(v); + FieldPacker fp = new FieldPacker(4); + fp.addF32(v); + mAllocation.setFromFieldPacker(index, 0, fp); + } + + } + + public synchronized void set_d(int index, double v, boolean copyNow) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + if (mItemArray[index] == null) mItemArray[index] = new Item(); + mItemArray[index].d = v; + if (copyNow) { + mIOBuffer.reset(index * mElement.getBytesSize() + 8); + mIOBuffer.addF64(v); + FieldPacker fp = new FieldPacker(8); + fp.addF64(v); + mAllocation.setFromFieldPacker(index, 2, fp); + } + + } + + public synchronized float get_f(int index) { + if (mItemArray == null) return 0; + return mItemArray[index].f; + } + + public synchronized double get_d(int index) { + if (mItemArray == null) return 0; + return mItemArray[index].d; + } + + public synchronized void copyAll() { + for (int ct = 0; ct < mItemArray.length; ct++) copyToArray(mItemArray[ct], ct); + mAllocation.setFromFieldPacker(0, mIOBuffer); + } + + public synchronized void resize(int newSize) { + if (mItemArray != null) { + int oldSize = mItemArray.length; + int copySize = Math.min(oldSize, newSize); + if (newSize == oldSize) return; + Item ni[] = new Item[newSize]; + System.arraycopy(mItemArray, 0, ni, 0, copySize); + mItemArray = ni; + } + + mAllocation.resize(newSize); + if (mIOBuffer != null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + } + +} +
diff --git a/slang/tests/P_reduce_general_inputs/gen-inputs.pl b/slang/tests/P_reduce_general_inputs/gen-inputs.pl new file mode 100755 index 0000000..136ec27 --- /dev/null +++ b/slang/tests/P_reduce_general_inputs/gen-inputs.pl
@@ -0,0 +1,71 @@ +#!/usr/bin/perl -w + +# Generate trivial test cases to exercise input types. + +use strict; + +# deliberately non-exhaustive +my @basicTypes = ("half", "float", # "double", + "char", "short", # "int", "long", + "uchar", "ushort", # "uint", "ulong", + "bool", + "rs_matrix2x2", # "rs_matrix3x3", "rs_matrix4x4", + "MyStruct"); + +# 1 signifies non-vector +# 3 is not supported for exported types +my @vecLengths = (1, 2, 4); + +sub isVectorEligible { + my ($type) = @_; + + # There are no bool vectors or struct vectors + return 0 if ($type eq "bool") || ($type eq "MyStruct"); + + # There are no matrix or object vectors + return 0 if (substr($type, 0, 3) eq "rs_"); + + # Else ok + return 1; +} + +print "// -Wall -Werror\n"; +print "#pragma version(1)\n"; +print "#pragma rs java_package_name(inputs)\n\n"; +print "// This test case was created by $0.\n"; +print "// It exercises various legal combinations of inputs and special parameters,\n"; +print "// so that we can ensure\n"; +print "// (a) We do not choke when compiling them\n"; +print "// (b) We reflect them correctly\n\n"; +print "// One example struct type\n"; +print "typedef struct MyStruct { float f; double d; } MyStruct;\n\n"; +print "// Trivial combiner shared by all test cases\n"; +print "static void combiner(int *accum, const int *other) { }\n"; + +foreach my $basicTypeA (@basicTypes) { + foreach my $vecLenA (@vecLengths) { + next if ($vecLenA > 1) && !isVectorEligible($basicTypeA); + + my $eltNameA = $basicTypeA; + $eltNameA .= $vecLenA if ($vecLenA > 1); + + foreach my $basicTypeB (@basicTypes) { + foreach my $vecLenB (@vecLengths) { + next if ($vecLenB > 1) && !isVectorEligible($basicTypeB); + + my $eltNameB = $basicTypeB; + $eltNameB .= $vecLenB if ($vecLenB > 1); + + for (my $hasSpecial = 0; $hasSpecial <= 1; ++$hasSpecial) { + my $reduceName = "my_${eltNameA}_${eltNameB}_${hasSpecial}"; + my $accumName = "${reduceName}_accum"; + print "\n"; + print "#pragma rs reduce(${reduceName}) accumulator(${accumName}) combiner(combiner)\n"; + print "static void ${accumName}(int *accum, ${eltNameA} a, ${eltNameB} b"; + print ", rs_kernel_context context" if ($hasSpecial); + print ") { }\n"; + } + } + } + } +}
diff --git a/slang/tests/P_reduce_general_inputs/reduce_general_inputs.rs b/slang/tests/P_reduce_general_inputs/reduce_general_inputs.rs new file mode 100644 index 0000000..aa7aae7 --- /dev/null +++ b/slang/tests/P_reduce_general_inputs/reduce_general_inputs.rs
@@ -0,0 +1,2661 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(inputs) + +// This test case was created by ./gen-inputs.pl. +// It exercises various legal combinations of inputs and special parameters, +// so that we can ensure +// (a) We do not choke when compiling them +// (b) We reflect them correctly + +// One example struct type +typedef struct MyStruct { float f; double d; } MyStruct; + +// Trivial combiner shared by all test cases +static void combiner(int *accum, const int *other) { } + +#pragma rs reduce(my_half_half_0) accumulator(my_half_half_0_accum) combiner(combiner) +static void my_half_half_0_accum(int *accum, half a, half b) { } + +#pragma rs reduce(my_half_half_1) accumulator(my_half_half_1_accum) combiner(combiner) +static void my_half_half_1_accum(int *accum, half a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_half2_0) accumulator(my_half_half2_0_accum) combiner(combiner) +static void my_half_half2_0_accum(int *accum, half a, half2 b) { } + +#pragma rs reduce(my_half_half2_1) accumulator(my_half_half2_1_accum) combiner(combiner) +static void my_half_half2_1_accum(int *accum, half a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_half4_0) accumulator(my_half_half4_0_accum) combiner(combiner) +static void my_half_half4_0_accum(int *accum, half a, half4 b) { } + +#pragma rs reduce(my_half_half4_1) accumulator(my_half_half4_1_accum) combiner(combiner) +static void my_half_half4_1_accum(int *accum, half a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_float_0) accumulator(my_half_float_0_accum) combiner(combiner) +static void my_half_float_0_accum(int *accum, half a, float b) { } + +#pragma rs reduce(my_half_float_1) accumulator(my_half_float_1_accum) combiner(combiner) +static void my_half_float_1_accum(int *accum, half a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_float2_0) accumulator(my_half_float2_0_accum) combiner(combiner) +static void my_half_float2_0_accum(int *accum, half a, float2 b) { } + +#pragma rs reduce(my_half_float2_1) accumulator(my_half_float2_1_accum) combiner(combiner) +static void my_half_float2_1_accum(int *accum, half a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_float4_0) accumulator(my_half_float4_0_accum) combiner(combiner) +static void my_half_float4_0_accum(int *accum, half a, float4 b) { } + +#pragma rs reduce(my_half_float4_1) accumulator(my_half_float4_1_accum) combiner(combiner) +static void my_half_float4_1_accum(int *accum, half a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_char_0) accumulator(my_half_char_0_accum) combiner(combiner) +static void my_half_char_0_accum(int *accum, half a, char b) { } + +#pragma rs reduce(my_half_char_1) accumulator(my_half_char_1_accum) combiner(combiner) +static void my_half_char_1_accum(int *accum, half a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_char2_0) accumulator(my_half_char2_0_accum) combiner(combiner) +static void my_half_char2_0_accum(int *accum, half a, char2 b) { } + +#pragma rs reduce(my_half_char2_1) accumulator(my_half_char2_1_accum) combiner(combiner) +static void my_half_char2_1_accum(int *accum, half a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_char4_0) accumulator(my_half_char4_0_accum) combiner(combiner) +static void my_half_char4_0_accum(int *accum, half a, char4 b) { } + +#pragma rs reduce(my_half_char4_1) accumulator(my_half_char4_1_accum) combiner(combiner) +static void my_half_char4_1_accum(int *accum, half a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_short_0) accumulator(my_half_short_0_accum) combiner(combiner) +static void my_half_short_0_accum(int *accum, half a, short b) { } + +#pragma rs reduce(my_half_short_1) accumulator(my_half_short_1_accum) combiner(combiner) +static void my_half_short_1_accum(int *accum, half a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_short2_0) accumulator(my_half_short2_0_accum) combiner(combiner) +static void my_half_short2_0_accum(int *accum, half a, short2 b) { } + +#pragma rs reduce(my_half_short2_1) accumulator(my_half_short2_1_accum) combiner(combiner) +static void my_half_short2_1_accum(int *accum, half a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_short4_0) accumulator(my_half_short4_0_accum) combiner(combiner) +static void my_half_short4_0_accum(int *accum, half a, short4 b) { } + +#pragma rs reduce(my_half_short4_1) accumulator(my_half_short4_1_accum) combiner(combiner) +static void my_half_short4_1_accum(int *accum, half a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_uchar_0) accumulator(my_half_uchar_0_accum) combiner(combiner) +static void my_half_uchar_0_accum(int *accum, half a, uchar b) { } + +#pragma rs reduce(my_half_uchar_1) accumulator(my_half_uchar_1_accum) combiner(combiner) +static void my_half_uchar_1_accum(int *accum, half a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_uchar2_0) accumulator(my_half_uchar2_0_accum) combiner(combiner) +static void my_half_uchar2_0_accum(int *accum, half a, uchar2 b) { } + +#pragma rs reduce(my_half_uchar2_1) accumulator(my_half_uchar2_1_accum) combiner(combiner) +static void my_half_uchar2_1_accum(int *accum, half a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_uchar4_0) accumulator(my_half_uchar4_0_accum) combiner(combiner) +static void my_half_uchar4_0_accum(int *accum, half a, uchar4 b) { } + +#pragma rs reduce(my_half_uchar4_1) accumulator(my_half_uchar4_1_accum) combiner(combiner) +static void my_half_uchar4_1_accum(int *accum, half a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_ushort_0) accumulator(my_half_ushort_0_accum) combiner(combiner) +static void my_half_ushort_0_accum(int *accum, half a, ushort b) { } + +#pragma rs reduce(my_half_ushort_1) accumulator(my_half_ushort_1_accum) combiner(combiner) +static void my_half_ushort_1_accum(int *accum, half a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_ushort2_0) accumulator(my_half_ushort2_0_accum) combiner(combiner) +static void my_half_ushort2_0_accum(int *accum, half a, ushort2 b) { } + +#pragma rs reduce(my_half_ushort2_1) accumulator(my_half_ushort2_1_accum) combiner(combiner) +static void my_half_ushort2_1_accum(int *accum, half a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_ushort4_0) accumulator(my_half_ushort4_0_accum) combiner(combiner) +static void my_half_ushort4_0_accum(int *accum, half a, ushort4 b) { } + +#pragma rs reduce(my_half_ushort4_1) accumulator(my_half_ushort4_1_accum) combiner(combiner) +static void my_half_ushort4_1_accum(int *accum, half a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_bool_0) accumulator(my_half_bool_0_accum) combiner(combiner) +static void my_half_bool_0_accum(int *accum, half a, bool b) { } + +#pragma rs reduce(my_half_bool_1) accumulator(my_half_bool_1_accum) combiner(combiner) +static void my_half_bool_1_accum(int *accum, half a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_rs_matrix2x2_0) accumulator(my_half_rs_matrix2x2_0_accum) combiner(combiner) +static void my_half_rs_matrix2x2_0_accum(int *accum, half a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_half_rs_matrix2x2_1) accumulator(my_half_rs_matrix2x2_1_accum) combiner(combiner) +static void my_half_rs_matrix2x2_1_accum(int *accum, half a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half_MyStruct_0) accumulator(my_half_MyStruct_0_accum) combiner(combiner) +static void my_half_MyStruct_0_accum(int *accum, half a, MyStruct b) { } + +#pragma rs reduce(my_half_MyStruct_1) accumulator(my_half_MyStruct_1_accum) combiner(combiner) +static void my_half_MyStruct_1_accum(int *accum, half a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_half_0) accumulator(my_half2_half_0_accum) combiner(combiner) +static void my_half2_half_0_accum(int *accum, half2 a, half b) { } + +#pragma rs reduce(my_half2_half_1) accumulator(my_half2_half_1_accum) combiner(combiner) +static void my_half2_half_1_accum(int *accum, half2 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_half2_0) accumulator(my_half2_half2_0_accum) combiner(combiner) +static void my_half2_half2_0_accum(int *accum, half2 a, half2 b) { } + +#pragma rs reduce(my_half2_half2_1) accumulator(my_half2_half2_1_accum) combiner(combiner) +static void my_half2_half2_1_accum(int *accum, half2 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_half4_0) accumulator(my_half2_half4_0_accum) combiner(combiner) +static void my_half2_half4_0_accum(int *accum, half2 a, half4 b) { } + +#pragma rs reduce(my_half2_half4_1) accumulator(my_half2_half4_1_accum) combiner(combiner) +static void my_half2_half4_1_accum(int *accum, half2 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_float_0) accumulator(my_half2_float_0_accum) combiner(combiner) +static void my_half2_float_0_accum(int *accum, half2 a, float b) { } + +#pragma rs reduce(my_half2_float_1) accumulator(my_half2_float_1_accum) combiner(combiner) +static void my_half2_float_1_accum(int *accum, half2 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_float2_0) accumulator(my_half2_float2_0_accum) combiner(combiner) +static void my_half2_float2_0_accum(int *accum, half2 a, float2 b) { } + +#pragma rs reduce(my_half2_float2_1) accumulator(my_half2_float2_1_accum) combiner(combiner) +static void my_half2_float2_1_accum(int *accum, half2 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_float4_0) accumulator(my_half2_float4_0_accum) combiner(combiner) +static void my_half2_float4_0_accum(int *accum, half2 a, float4 b) { } + +#pragma rs reduce(my_half2_float4_1) accumulator(my_half2_float4_1_accum) combiner(combiner) +static void my_half2_float4_1_accum(int *accum, half2 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_char_0) accumulator(my_half2_char_0_accum) combiner(combiner) +static void my_half2_char_0_accum(int *accum, half2 a, char b) { } + +#pragma rs reduce(my_half2_char_1) accumulator(my_half2_char_1_accum) combiner(combiner) +static void my_half2_char_1_accum(int *accum, half2 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_char2_0) accumulator(my_half2_char2_0_accum) combiner(combiner) +static void my_half2_char2_0_accum(int *accum, half2 a, char2 b) { } + +#pragma rs reduce(my_half2_char2_1) accumulator(my_half2_char2_1_accum) combiner(combiner) +static void my_half2_char2_1_accum(int *accum, half2 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_char4_0) accumulator(my_half2_char4_0_accum) combiner(combiner) +static void my_half2_char4_0_accum(int *accum, half2 a, char4 b) { } + +#pragma rs reduce(my_half2_char4_1) accumulator(my_half2_char4_1_accum) combiner(combiner) +static void my_half2_char4_1_accum(int *accum, half2 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_short_0) accumulator(my_half2_short_0_accum) combiner(combiner) +static void my_half2_short_0_accum(int *accum, half2 a, short b) { } + +#pragma rs reduce(my_half2_short_1) accumulator(my_half2_short_1_accum) combiner(combiner) +static void my_half2_short_1_accum(int *accum, half2 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_short2_0) accumulator(my_half2_short2_0_accum) combiner(combiner) +static void my_half2_short2_0_accum(int *accum, half2 a, short2 b) { } + +#pragma rs reduce(my_half2_short2_1) accumulator(my_half2_short2_1_accum) combiner(combiner) +static void my_half2_short2_1_accum(int *accum, half2 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_short4_0) accumulator(my_half2_short4_0_accum) combiner(combiner) +static void my_half2_short4_0_accum(int *accum, half2 a, short4 b) { } + +#pragma rs reduce(my_half2_short4_1) accumulator(my_half2_short4_1_accum) combiner(combiner) +static void my_half2_short4_1_accum(int *accum, half2 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_uchar_0) accumulator(my_half2_uchar_0_accum) combiner(combiner) +static void my_half2_uchar_0_accum(int *accum, half2 a, uchar b) { } + +#pragma rs reduce(my_half2_uchar_1) accumulator(my_half2_uchar_1_accum) combiner(combiner) +static void my_half2_uchar_1_accum(int *accum, half2 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_uchar2_0) accumulator(my_half2_uchar2_0_accum) combiner(combiner) +static void my_half2_uchar2_0_accum(int *accum, half2 a, uchar2 b) { } + +#pragma rs reduce(my_half2_uchar2_1) accumulator(my_half2_uchar2_1_accum) combiner(combiner) +static void my_half2_uchar2_1_accum(int *accum, half2 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_uchar4_0) accumulator(my_half2_uchar4_0_accum) combiner(combiner) +static void my_half2_uchar4_0_accum(int *accum, half2 a, uchar4 b) { } + +#pragma rs reduce(my_half2_uchar4_1) accumulator(my_half2_uchar4_1_accum) combiner(combiner) +static void my_half2_uchar4_1_accum(int *accum, half2 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_ushort_0) accumulator(my_half2_ushort_0_accum) combiner(combiner) +static void my_half2_ushort_0_accum(int *accum, half2 a, ushort b) { } + +#pragma rs reduce(my_half2_ushort_1) accumulator(my_half2_ushort_1_accum) combiner(combiner) +static void my_half2_ushort_1_accum(int *accum, half2 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_ushort2_0) accumulator(my_half2_ushort2_0_accum) combiner(combiner) +static void my_half2_ushort2_0_accum(int *accum, half2 a, ushort2 b) { } + +#pragma rs reduce(my_half2_ushort2_1) accumulator(my_half2_ushort2_1_accum) combiner(combiner) +static void my_half2_ushort2_1_accum(int *accum, half2 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_ushort4_0) accumulator(my_half2_ushort4_0_accum) combiner(combiner) +static void my_half2_ushort4_0_accum(int *accum, half2 a, ushort4 b) { } + +#pragma rs reduce(my_half2_ushort4_1) accumulator(my_half2_ushort4_1_accum) combiner(combiner) +static void my_half2_ushort4_1_accum(int *accum, half2 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_bool_0) accumulator(my_half2_bool_0_accum) combiner(combiner) +static void my_half2_bool_0_accum(int *accum, half2 a, bool b) { } + +#pragma rs reduce(my_half2_bool_1) accumulator(my_half2_bool_1_accum) combiner(combiner) +static void my_half2_bool_1_accum(int *accum, half2 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_rs_matrix2x2_0) accumulator(my_half2_rs_matrix2x2_0_accum) combiner(combiner) +static void my_half2_rs_matrix2x2_0_accum(int *accum, half2 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_half2_rs_matrix2x2_1) accumulator(my_half2_rs_matrix2x2_1_accum) combiner(combiner) +static void my_half2_rs_matrix2x2_1_accum(int *accum, half2 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half2_MyStruct_0) accumulator(my_half2_MyStruct_0_accum) combiner(combiner) +static void my_half2_MyStruct_0_accum(int *accum, half2 a, MyStruct b) { } + +#pragma rs reduce(my_half2_MyStruct_1) accumulator(my_half2_MyStruct_1_accum) combiner(combiner) +static void my_half2_MyStruct_1_accum(int *accum, half2 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_half_0) accumulator(my_half4_half_0_accum) combiner(combiner) +static void my_half4_half_0_accum(int *accum, half4 a, half b) { } + +#pragma rs reduce(my_half4_half_1) accumulator(my_half4_half_1_accum) combiner(combiner) +static void my_half4_half_1_accum(int *accum, half4 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_half2_0) accumulator(my_half4_half2_0_accum) combiner(combiner) +static void my_half4_half2_0_accum(int *accum, half4 a, half2 b) { } + +#pragma rs reduce(my_half4_half2_1) accumulator(my_half4_half2_1_accum) combiner(combiner) +static void my_half4_half2_1_accum(int *accum, half4 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_half4_0) accumulator(my_half4_half4_0_accum) combiner(combiner) +static void my_half4_half4_0_accum(int *accum, half4 a, half4 b) { } + +#pragma rs reduce(my_half4_half4_1) accumulator(my_half4_half4_1_accum) combiner(combiner) +static void my_half4_half4_1_accum(int *accum, half4 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_float_0) accumulator(my_half4_float_0_accum) combiner(combiner) +static void my_half4_float_0_accum(int *accum, half4 a, float b) { } + +#pragma rs reduce(my_half4_float_1) accumulator(my_half4_float_1_accum) combiner(combiner) +static void my_half4_float_1_accum(int *accum, half4 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_float2_0) accumulator(my_half4_float2_0_accum) combiner(combiner) +static void my_half4_float2_0_accum(int *accum, half4 a, float2 b) { } + +#pragma rs reduce(my_half4_float2_1) accumulator(my_half4_float2_1_accum) combiner(combiner) +static void my_half4_float2_1_accum(int *accum, half4 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_float4_0) accumulator(my_half4_float4_0_accum) combiner(combiner) +static void my_half4_float4_0_accum(int *accum, half4 a, float4 b) { } + +#pragma rs reduce(my_half4_float4_1) accumulator(my_half4_float4_1_accum) combiner(combiner) +static void my_half4_float4_1_accum(int *accum, half4 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_char_0) accumulator(my_half4_char_0_accum) combiner(combiner) +static void my_half4_char_0_accum(int *accum, half4 a, char b) { } + +#pragma rs reduce(my_half4_char_1) accumulator(my_half4_char_1_accum) combiner(combiner) +static void my_half4_char_1_accum(int *accum, half4 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_char2_0) accumulator(my_half4_char2_0_accum) combiner(combiner) +static void my_half4_char2_0_accum(int *accum, half4 a, char2 b) { } + +#pragma rs reduce(my_half4_char2_1) accumulator(my_half4_char2_1_accum) combiner(combiner) +static void my_half4_char2_1_accum(int *accum, half4 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_char4_0) accumulator(my_half4_char4_0_accum) combiner(combiner) +static void my_half4_char4_0_accum(int *accum, half4 a, char4 b) { } + +#pragma rs reduce(my_half4_char4_1) accumulator(my_half4_char4_1_accum) combiner(combiner) +static void my_half4_char4_1_accum(int *accum, half4 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_short_0) accumulator(my_half4_short_0_accum) combiner(combiner) +static void my_half4_short_0_accum(int *accum, half4 a, short b) { } + +#pragma rs reduce(my_half4_short_1) accumulator(my_half4_short_1_accum) combiner(combiner) +static void my_half4_short_1_accum(int *accum, half4 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_short2_0) accumulator(my_half4_short2_0_accum) combiner(combiner) +static void my_half4_short2_0_accum(int *accum, half4 a, short2 b) { } + +#pragma rs reduce(my_half4_short2_1) accumulator(my_half4_short2_1_accum) combiner(combiner) +static void my_half4_short2_1_accum(int *accum, half4 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_short4_0) accumulator(my_half4_short4_0_accum) combiner(combiner) +static void my_half4_short4_0_accum(int *accum, half4 a, short4 b) { } + +#pragma rs reduce(my_half4_short4_1) accumulator(my_half4_short4_1_accum) combiner(combiner) +static void my_half4_short4_1_accum(int *accum, half4 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_uchar_0) accumulator(my_half4_uchar_0_accum) combiner(combiner) +static void my_half4_uchar_0_accum(int *accum, half4 a, uchar b) { } + +#pragma rs reduce(my_half4_uchar_1) accumulator(my_half4_uchar_1_accum) combiner(combiner) +static void my_half4_uchar_1_accum(int *accum, half4 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_uchar2_0) accumulator(my_half4_uchar2_0_accum) combiner(combiner) +static void my_half4_uchar2_0_accum(int *accum, half4 a, uchar2 b) { } + +#pragma rs reduce(my_half4_uchar2_1) accumulator(my_half4_uchar2_1_accum) combiner(combiner) +static void my_half4_uchar2_1_accum(int *accum, half4 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_uchar4_0) accumulator(my_half4_uchar4_0_accum) combiner(combiner) +static void my_half4_uchar4_0_accum(int *accum, half4 a, uchar4 b) { } + +#pragma rs reduce(my_half4_uchar4_1) accumulator(my_half4_uchar4_1_accum) combiner(combiner) +static void my_half4_uchar4_1_accum(int *accum, half4 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_ushort_0) accumulator(my_half4_ushort_0_accum) combiner(combiner) +static void my_half4_ushort_0_accum(int *accum, half4 a, ushort b) { } + +#pragma rs reduce(my_half4_ushort_1) accumulator(my_half4_ushort_1_accum) combiner(combiner) +static void my_half4_ushort_1_accum(int *accum, half4 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_ushort2_0) accumulator(my_half4_ushort2_0_accum) combiner(combiner) +static void my_half4_ushort2_0_accum(int *accum, half4 a, ushort2 b) { } + +#pragma rs reduce(my_half4_ushort2_1) accumulator(my_half4_ushort2_1_accum) combiner(combiner) +static void my_half4_ushort2_1_accum(int *accum, half4 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_ushort4_0) accumulator(my_half4_ushort4_0_accum) combiner(combiner) +static void my_half4_ushort4_0_accum(int *accum, half4 a, ushort4 b) { } + +#pragma rs reduce(my_half4_ushort4_1) accumulator(my_half4_ushort4_1_accum) combiner(combiner) +static void my_half4_ushort4_1_accum(int *accum, half4 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_bool_0) accumulator(my_half4_bool_0_accum) combiner(combiner) +static void my_half4_bool_0_accum(int *accum, half4 a, bool b) { } + +#pragma rs reduce(my_half4_bool_1) accumulator(my_half4_bool_1_accum) combiner(combiner) +static void my_half4_bool_1_accum(int *accum, half4 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_rs_matrix2x2_0) accumulator(my_half4_rs_matrix2x2_0_accum) combiner(combiner) +static void my_half4_rs_matrix2x2_0_accum(int *accum, half4 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_half4_rs_matrix2x2_1) accumulator(my_half4_rs_matrix2x2_1_accum) combiner(combiner) +static void my_half4_rs_matrix2x2_1_accum(int *accum, half4 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_half4_MyStruct_0) accumulator(my_half4_MyStruct_0_accum) combiner(combiner) +static void my_half4_MyStruct_0_accum(int *accum, half4 a, MyStruct b) { } + +#pragma rs reduce(my_half4_MyStruct_1) accumulator(my_half4_MyStruct_1_accum) combiner(combiner) +static void my_half4_MyStruct_1_accum(int *accum, half4 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_half_0) accumulator(my_float_half_0_accum) combiner(combiner) +static void my_float_half_0_accum(int *accum, float a, half b) { } + +#pragma rs reduce(my_float_half_1) accumulator(my_float_half_1_accum) combiner(combiner) +static void my_float_half_1_accum(int *accum, float a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_half2_0) accumulator(my_float_half2_0_accum) combiner(combiner) +static void my_float_half2_0_accum(int *accum, float a, half2 b) { } + +#pragma rs reduce(my_float_half2_1) accumulator(my_float_half2_1_accum) combiner(combiner) +static void my_float_half2_1_accum(int *accum, float a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_half4_0) accumulator(my_float_half4_0_accum) combiner(combiner) +static void my_float_half4_0_accum(int *accum, float a, half4 b) { } + +#pragma rs reduce(my_float_half4_1) accumulator(my_float_half4_1_accum) combiner(combiner) +static void my_float_half4_1_accum(int *accum, float a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_float_0) accumulator(my_float_float_0_accum) combiner(combiner) +static void my_float_float_0_accum(int *accum, float a, float b) { } + +#pragma rs reduce(my_float_float_1) accumulator(my_float_float_1_accum) combiner(combiner) +static void my_float_float_1_accum(int *accum, float a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_float2_0) accumulator(my_float_float2_0_accum) combiner(combiner) +static void my_float_float2_0_accum(int *accum, float a, float2 b) { } + +#pragma rs reduce(my_float_float2_1) accumulator(my_float_float2_1_accum) combiner(combiner) +static void my_float_float2_1_accum(int *accum, float a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_float4_0) accumulator(my_float_float4_0_accum) combiner(combiner) +static void my_float_float4_0_accum(int *accum, float a, float4 b) { } + +#pragma rs reduce(my_float_float4_1) accumulator(my_float_float4_1_accum) combiner(combiner) +static void my_float_float4_1_accum(int *accum, float a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_char_0) accumulator(my_float_char_0_accum) combiner(combiner) +static void my_float_char_0_accum(int *accum, float a, char b) { } + +#pragma rs reduce(my_float_char_1) accumulator(my_float_char_1_accum) combiner(combiner) +static void my_float_char_1_accum(int *accum, float a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_char2_0) accumulator(my_float_char2_0_accum) combiner(combiner) +static void my_float_char2_0_accum(int *accum, float a, char2 b) { } + +#pragma rs reduce(my_float_char2_1) accumulator(my_float_char2_1_accum) combiner(combiner) +static void my_float_char2_1_accum(int *accum, float a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_char4_0) accumulator(my_float_char4_0_accum) combiner(combiner) +static void my_float_char4_0_accum(int *accum, float a, char4 b) { } + +#pragma rs reduce(my_float_char4_1) accumulator(my_float_char4_1_accum) combiner(combiner) +static void my_float_char4_1_accum(int *accum, float a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_short_0) accumulator(my_float_short_0_accum) combiner(combiner) +static void my_float_short_0_accum(int *accum, float a, short b) { } + +#pragma rs reduce(my_float_short_1) accumulator(my_float_short_1_accum) combiner(combiner) +static void my_float_short_1_accum(int *accum, float a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_short2_0) accumulator(my_float_short2_0_accum) combiner(combiner) +static void my_float_short2_0_accum(int *accum, float a, short2 b) { } + +#pragma rs reduce(my_float_short2_1) accumulator(my_float_short2_1_accum) combiner(combiner) +static void my_float_short2_1_accum(int *accum, float a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_short4_0) accumulator(my_float_short4_0_accum) combiner(combiner) +static void my_float_short4_0_accum(int *accum, float a, short4 b) { } + +#pragma rs reduce(my_float_short4_1) accumulator(my_float_short4_1_accum) combiner(combiner) +static void my_float_short4_1_accum(int *accum, float a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_uchar_0) accumulator(my_float_uchar_0_accum) combiner(combiner) +static void my_float_uchar_0_accum(int *accum, float a, uchar b) { } + +#pragma rs reduce(my_float_uchar_1) accumulator(my_float_uchar_1_accum) combiner(combiner) +static void my_float_uchar_1_accum(int *accum, float a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_uchar2_0) accumulator(my_float_uchar2_0_accum) combiner(combiner) +static void my_float_uchar2_0_accum(int *accum, float a, uchar2 b) { } + +#pragma rs reduce(my_float_uchar2_1) accumulator(my_float_uchar2_1_accum) combiner(combiner) +static void my_float_uchar2_1_accum(int *accum, float a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_uchar4_0) accumulator(my_float_uchar4_0_accum) combiner(combiner) +static void my_float_uchar4_0_accum(int *accum, float a, uchar4 b) { } + +#pragma rs reduce(my_float_uchar4_1) accumulator(my_float_uchar4_1_accum) combiner(combiner) +static void my_float_uchar4_1_accum(int *accum, float a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_ushort_0) accumulator(my_float_ushort_0_accum) combiner(combiner) +static void my_float_ushort_0_accum(int *accum, float a, ushort b) { } + +#pragma rs reduce(my_float_ushort_1) accumulator(my_float_ushort_1_accum) combiner(combiner) +static void my_float_ushort_1_accum(int *accum, float a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_ushort2_0) accumulator(my_float_ushort2_0_accum) combiner(combiner) +static void my_float_ushort2_0_accum(int *accum, float a, ushort2 b) { } + +#pragma rs reduce(my_float_ushort2_1) accumulator(my_float_ushort2_1_accum) combiner(combiner) +static void my_float_ushort2_1_accum(int *accum, float a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_ushort4_0) accumulator(my_float_ushort4_0_accum) combiner(combiner) +static void my_float_ushort4_0_accum(int *accum, float a, ushort4 b) { } + +#pragma rs reduce(my_float_ushort4_1) accumulator(my_float_ushort4_1_accum) combiner(combiner) +static void my_float_ushort4_1_accum(int *accum, float a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_bool_0) accumulator(my_float_bool_0_accum) combiner(combiner) +static void my_float_bool_0_accum(int *accum, float a, bool b) { } + +#pragma rs reduce(my_float_bool_1) accumulator(my_float_bool_1_accum) combiner(combiner) +static void my_float_bool_1_accum(int *accum, float a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_rs_matrix2x2_0) accumulator(my_float_rs_matrix2x2_0_accum) combiner(combiner) +static void my_float_rs_matrix2x2_0_accum(int *accum, float a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_float_rs_matrix2x2_1) accumulator(my_float_rs_matrix2x2_1_accum) combiner(combiner) +static void my_float_rs_matrix2x2_1_accum(int *accum, float a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float_MyStruct_0) accumulator(my_float_MyStruct_0_accum) combiner(combiner) +static void my_float_MyStruct_0_accum(int *accum, float a, MyStruct b) { } + +#pragma rs reduce(my_float_MyStruct_1) accumulator(my_float_MyStruct_1_accum) combiner(combiner) +static void my_float_MyStruct_1_accum(int *accum, float a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_half_0) accumulator(my_float2_half_0_accum) combiner(combiner) +static void my_float2_half_0_accum(int *accum, float2 a, half b) { } + +#pragma rs reduce(my_float2_half_1) accumulator(my_float2_half_1_accum) combiner(combiner) +static void my_float2_half_1_accum(int *accum, float2 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_half2_0) accumulator(my_float2_half2_0_accum) combiner(combiner) +static void my_float2_half2_0_accum(int *accum, float2 a, half2 b) { } + +#pragma rs reduce(my_float2_half2_1) accumulator(my_float2_half2_1_accum) combiner(combiner) +static void my_float2_half2_1_accum(int *accum, float2 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_half4_0) accumulator(my_float2_half4_0_accum) combiner(combiner) +static void my_float2_half4_0_accum(int *accum, float2 a, half4 b) { } + +#pragma rs reduce(my_float2_half4_1) accumulator(my_float2_half4_1_accum) combiner(combiner) +static void my_float2_half4_1_accum(int *accum, float2 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_float_0) accumulator(my_float2_float_0_accum) combiner(combiner) +static void my_float2_float_0_accum(int *accum, float2 a, float b) { } + +#pragma rs reduce(my_float2_float_1) accumulator(my_float2_float_1_accum) combiner(combiner) +static void my_float2_float_1_accum(int *accum, float2 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_float2_0) accumulator(my_float2_float2_0_accum) combiner(combiner) +static void my_float2_float2_0_accum(int *accum, float2 a, float2 b) { } + +#pragma rs reduce(my_float2_float2_1) accumulator(my_float2_float2_1_accum) combiner(combiner) +static void my_float2_float2_1_accum(int *accum, float2 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_float4_0) accumulator(my_float2_float4_0_accum) combiner(combiner) +static void my_float2_float4_0_accum(int *accum, float2 a, float4 b) { } + +#pragma rs reduce(my_float2_float4_1) accumulator(my_float2_float4_1_accum) combiner(combiner) +static void my_float2_float4_1_accum(int *accum, float2 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_char_0) accumulator(my_float2_char_0_accum) combiner(combiner) +static void my_float2_char_0_accum(int *accum, float2 a, char b) { } + +#pragma rs reduce(my_float2_char_1) accumulator(my_float2_char_1_accum) combiner(combiner) +static void my_float2_char_1_accum(int *accum, float2 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_char2_0) accumulator(my_float2_char2_0_accum) combiner(combiner) +static void my_float2_char2_0_accum(int *accum, float2 a, char2 b) { } + +#pragma rs reduce(my_float2_char2_1) accumulator(my_float2_char2_1_accum) combiner(combiner) +static void my_float2_char2_1_accum(int *accum, float2 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_char4_0) accumulator(my_float2_char4_0_accum) combiner(combiner) +static void my_float2_char4_0_accum(int *accum, float2 a, char4 b) { } + +#pragma rs reduce(my_float2_char4_1) accumulator(my_float2_char4_1_accum) combiner(combiner) +static void my_float2_char4_1_accum(int *accum, float2 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_short_0) accumulator(my_float2_short_0_accum) combiner(combiner) +static void my_float2_short_0_accum(int *accum, float2 a, short b) { } + +#pragma rs reduce(my_float2_short_1) accumulator(my_float2_short_1_accum) combiner(combiner) +static void my_float2_short_1_accum(int *accum, float2 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_short2_0) accumulator(my_float2_short2_0_accum) combiner(combiner) +static void my_float2_short2_0_accum(int *accum, float2 a, short2 b) { } + +#pragma rs reduce(my_float2_short2_1) accumulator(my_float2_short2_1_accum) combiner(combiner) +static void my_float2_short2_1_accum(int *accum, float2 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_short4_0) accumulator(my_float2_short4_0_accum) combiner(combiner) +static void my_float2_short4_0_accum(int *accum, float2 a, short4 b) { } + +#pragma rs reduce(my_float2_short4_1) accumulator(my_float2_short4_1_accum) combiner(combiner) +static void my_float2_short4_1_accum(int *accum, float2 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_uchar_0) accumulator(my_float2_uchar_0_accum) combiner(combiner) +static void my_float2_uchar_0_accum(int *accum, float2 a, uchar b) { } + +#pragma rs reduce(my_float2_uchar_1) accumulator(my_float2_uchar_1_accum) combiner(combiner) +static void my_float2_uchar_1_accum(int *accum, float2 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_uchar2_0) accumulator(my_float2_uchar2_0_accum) combiner(combiner) +static void my_float2_uchar2_0_accum(int *accum, float2 a, uchar2 b) { } + +#pragma rs reduce(my_float2_uchar2_1) accumulator(my_float2_uchar2_1_accum) combiner(combiner) +static void my_float2_uchar2_1_accum(int *accum, float2 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_uchar4_0) accumulator(my_float2_uchar4_0_accum) combiner(combiner) +static void my_float2_uchar4_0_accum(int *accum, float2 a, uchar4 b) { } + +#pragma rs reduce(my_float2_uchar4_1) accumulator(my_float2_uchar4_1_accum) combiner(combiner) +static void my_float2_uchar4_1_accum(int *accum, float2 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_ushort_0) accumulator(my_float2_ushort_0_accum) combiner(combiner) +static void my_float2_ushort_0_accum(int *accum, float2 a, ushort b) { } + +#pragma rs reduce(my_float2_ushort_1) accumulator(my_float2_ushort_1_accum) combiner(combiner) +static void my_float2_ushort_1_accum(int *accum, float2 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_ushort2_0) accumulator(my_float2_ushort2_0_accum) combiner(combiner) +static void my_float2_ushort2_0_accum(int *accum, float2 a, ushort2 b) { } + +#pragma rs reduce(my_float2_ushort2_1) accumulator(my_float2_ushort2_1_accum) combiner(combiner) +static void my_float2_ushort2_1_accum(int *accum, float2 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_ushort4_0) accumulator(my_float2_ushort4_0_accum) combiner(combiner) +static void my_float2_ushort4_0_accum(int *accum, float2 a, ushort4 b) { } + +#pragma rs reduce(my_float2_ushort4_1) accumulator(my_float2_ushort4_1_accum) combiner(combiner) +static void my_float2_ushort4_1_accum(int *accum, float2 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_bool_0) accumulator(my_float2_bool_0_accum) combiner(combiner) +static void my_float2_bool_0_accum(int *accum, float2 a, bool b) { } + +#pragma rs reduce(my_float2_bool_1) accumulator(my_float2_bool_1_accum) combiner(combiner) +static void my_float2_bool_1_accum(int *accum, float2 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_rs_matrix2x2_0) accumulator(my_float2_rs_matrix2x2_0_accum) combiner(combiner) +static void my_float2_rs_matrix2x2_0_accum(int *accum, float2 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_float2_rs_matrix2x2_1) accumulator(my_float2_rs_matrix2x2_1_accum) combiner(combiner) +static void my_float2_rs_matrix2x2_1_accum(int *accum, float2 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float2_MyStruct_0) accumulator(my_float2_MyStruct_0_accum) combiner(combiner) +static void my_float2_MyStruct_0_accum(int *accum, float2 a, MyStruct b) { } + +#pragma rs reduce(my_float2_MyStruct_1) accumulator(my_float2_MyStruct_1_accum) combiner(combiner) +static void my_float2_MyStruct_1_accum(int *accum, float2 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_half_0) accumulator(my_float4_half_0_accum) combiner(combiner) +static void my_float4_half_0_accum(int *accum, float4 a, half b) { } + +#pragma rs reduce(my_float4_half_1) accumulator(my_float4_half_1_accum) combiner(combiner) +static void my_float4_half_1_accum(int *accum, float4 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_half2_0) accumulator(my_float4_half2_0_accum) combiner(combiner) +static void my_float4_half2_0_accum(int *accum, float4 a, half2 b) { } + +#pragma rs reduce(my_float4_half2_1) accumulator(my_float4_half2_1_accum) combiner(combiner) +static void my_float4_half2_1_accum(int *accum, float4 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_half4_0) accumulator(my_float4_half4_0_accum) combiner(combiner) +static void my_float4_half4_0_accum(int *accum, float4 a, half4 b) { } + +#pragma rs reduce(my_float4_half4_1) accumulator(my_float4_half4_1_accum) combiner(combiner) +static void my_float4_half4_1_accum(int *accum, float4 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_float_0) accumulator(my_float4_float_0_accum) combiner(combiner) +static void my_float4_float_0_accum(int *accum, float4 a, float b) { } + +#pragma rs reduce(my_float4_float_1) accumulator(my_float4_float_1_accum) combiner(combiner) +static void my_float4_float_1_accum(int *accum, float4 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_float2_0) accumulator(my_float4_float2_0_accum) combiner(combiner) +static void my_float4_float2_0_accum(int *accum, float4 a, float2 b) { } + +#pragma rs reduce(my_float4_float2_1) accumulator(my_float4_float2_1_accum) combiner(combiner) +static void my_float4_float2_1_accum(int *accum, float4 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_float4_0) accumulator(my_float4_float4_0_accum) combiner(combiner) +static void my_float4_float4_0_accum(int *accum, float4 a, float4 b) { } + +#pragma rs reduce(my_float4_float4_1) accumulator(my_float4_float4_1_accum) combiner(combiner) +static void my_float4_float4_1_accum(int *accum, float4 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_char_0) accumulator(my_float4_char_0_accum) combiner(combiner) +static void my_float4_char_0_accum(int *accum, float4 a, char b) { } + +#pragma rs reduce(my_float4_char_1) accumulator(my_float4_char_1_accum) combiner(combiner) +static void my_float4_char_1_accum(int *accum, float4 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_char2_0) accumulator(my_float4_char2_0_accum) combiner(combiner) +static void my_float4_char2_0_accum(int *accum, float4 a, char2 b) { } + +#pragma rs reduce(my_float4_char2_1) accumulator(my_float4_char2_1_accum) combiner(combiner) +static void my_float4_char2_1_accum(int *accum, float4 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_char4_0) accumulator(my_float4_char4_0_accum) combiner(combiner) +static void my_float4_char4_0_accum(int *accum, float4 a, char4 b) { } + +#pragma rs reduce(my_float4_char4_1) accumulator(my_float4_char4_1_accum) combiner(combiner) +static void my_float4_char4_1_accum(int *accum, float4 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_short_0) accumulator(my_float4_short_0_accum) combiner(combiner) +static void my_float4_short_0_accum(int *accum, float4 a, short b) { } + +#pragma rs reduce(my_float4_short_1) accumulator(my_float4_short_1_accum) combiner(combiner) +static void my_float4_short_1_accum(int *accum, float4 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_short2_0) accumulator(my_float4_short2_0_accum) combiner(combiner) +static void my_float4_short2_0_accum(int *accum, float4 a, short2 b) { } + +#pragma rs reduce(my_float4_short2_1) accumulator(my_float4_short2_1_accum) combiner(combiner) +static void my_float4_short2_1_accum(int *accum, float4 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_short4_0) accumulator(my_float4_short4_0_accum) combiner(combiner) +static void my_float4_short4_0_accum(int *accum, float4 a, short4 b) { } + +#pragma rs reduce(my_float4_short4_1) accumulator(my_float4_short4_1_accum) combiner(combiner) +static void my_float4_short4_1_accum(int *accum, float4 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_uchar_0) accumulator(my_float4_uchar_0_accum) combiner(combiner) +static void my_float4_uchar_0_accum(int *accum, float4 a, uchar b) { } + +#pragma rs reduce(my_float4_uchar_1) accumulator(my_float4_uchar_1_accum) combiner(combiner) +static void my_float4_uchar_1_accum(int *accum, float4 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_uchar2_0) accumulator(my_float4_uchar2_0_accum) combiner(combiner) +static void my_float4_uchar2_0_accum(int *accum, float4 a, uchar2 b) { } + +#pragma rs reduce(my_float4_uchar2_1) accumulator(my_float4_uchar2_1_accum) combiner(combiner) +static void my_float4_uchar2_1_accum(int *accum, float4 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_uchar4_0) accumulator(my_float4_uchar4_0_accum) combiner(combiner) +static void my_float4_uchar4_0_accum(int *accum, float4 a, uchar4 b) { } + +#pragma rs reduce(my_float4_uchar4_1) accumulator(my_float4_uchar4_1_accum) combiner(combiner) +static void my_float4_uchar4_1_accum(int *accum, float4 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_ushort_0) accumulator(my_float4_ushort_0_accum) combiner(combiner) +static void my_float4_ushort_0_accum(int *accum, float4 a, ushort b) { } + +#pragma rs reduce(my_float4_ushort_1) accumulator(my_float4_ushort_1_accum) combiner(combiner) +static void my_float4_ushort_1_accum(int *accum, float4 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_ushort2_0) accumulator(my_float4_ushort2_0_accum) combiner(combiner) +static void my_float4_ushort2_0_accum(int *accum, float4 a, ushort2 b) { } + +#pragma rs reduce(my_float4_ushort2_1) accumulator(my_float4_ushort2_1_accum) combiner(combiner) +static void my_float4_ushort2_1_accum(int *accum, float4 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_ushort4_0) accumulator(my_float4_ushort4_0_accum) combiner(combiner) +static void my_float4_ushort4_0_accum(int *accum, float4 a, ushort4 b) { } + +#pragma rs reduce(my_float4_ushort4_1) accumulator(my_float4_ushort4_1_accum) combiner(combiner) +static void my_float4_ushort4_1_accum(int *accum, float4 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_bool_0) accumulator(my_float4_bool_0_accum) combiner(combiner) +static void my_float4_bool_0_accum(int *accum, float4 a, bool b) { } + +#pragma rs reduce(my_float4_bool_1) accumulator(my_float4_bool_1_accum) combiner(combiner) +static void my_float4_bool_1_accum(int *accum, float4 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_rs_matrix2x2_0) accumulator(my_float4_rs_matrix2x2_0_accum) combiner(combiner) +static void my_float4_rs_matrix2x2_0_accum(int *accum, float4 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_float4_rs_matrix2x2_1) accumulator(my_float4_rs_matrix2x2_1_accum) combiner(combiner) +static void my_float4_rs_matrix2x2_1_accum(int *accum, float4 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_float4_MyStruct_0) accumulator(my_float4_MyStruct_0_accum) combiner(combiner) +static void my_float4_MyStruct_0_accum(int *accum, float4 a, MyStruct b) { } + +#pragma rs reduce(my_float4_MyStruct_1) accumulator(my_float4_MyStruct_1_accum) combiner(combiner) +static void my_float4_MyStruct_1_accum(int *accum, float4 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_half_0) accumulator(my_char_half_0_accum) combiner(combiner) +static void my_char_half_0_accum(int *accum, char a, half b) { } + +#pragma rs reduce(my_char_half_1) accumulator(my_char_half_1_accum) combiner(combiner) +static void my_char_half_1_accum(int *accum, char a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_half2_0) accumulator(my_char_half2_0_accum) combiner(combiner) +static void my_char_half2_0_accum(int *accum, char a, half2 b) { } + +#pragma rs reduce(my_char_half2_1) accumulator(my_char_half2_1_accum) combiner(combiner) +static void my_char_half2_1_accum(int *accum, char a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_half4_0) accumulator(my_char_half4_0_accum) combiner(combiner) +static void my_char_half4_0_accum(int *accum, char a, half4 b) { } + +#pragma rs reduce(my_char_half4_1) accumulator(my_char_half4_1_accum) combiner(combiner) +static void my_char_half4_1_accum(int *accum, char a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_float_0) accumulator(my_char_float_0_accum) combiner(combiner) +static void my_char_float_0_accum(int *accum, char a, float b) { } + +#pragma rs reduce(my_char_float_1) accumulator(my_char_float_1_accum) combiner(combiner) +static void my_char_float_1_accum(int *accum, char a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_float2_0) accumulator(my_char_float2_0_accum) combiner(combiner) +static void my_char_float2_0_accum(int *accum, char a, float2 b) { } + +#pragma rs reduce(my_char_float2_1) accumulator(my_char_float2_1_accum) combiner(combiner) +static void my_char_float2_1_accum(int *accum, char a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_float4_0) accumulator(my_char_float4_0_accum) combiner(combiner) +static void my_char_float4_0_accum(int *accum, char a, float4 b) { } + +#pragma rs reduce(my_char_float4_1) accumulator(my_char_float4_1_accum) combiner(combiner) +static void my_char_float4_1_accum(int *accum, char a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_char_0) accumulator(my_char_char_0_accum) combiner(combiner) +static void my_char_char_0_accum(int *accum, char a, char b) { } + +#pragma rs reduce(my_char_char_1) accumulator(my_char_char_1_accum) combiner(combiner) +static void my_char_char_1_accum(int *accum, char a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_char2_0) accumulator(my_char_char2_0_accum) combiner(combiner) +static void my_char_char2_0_accum(int *accum, char a, char2 b) { } + +#pragma rs reduce(my_char_char2_1) accumulator(my_char_char2_1_accum) combiner(combiner) +static void my_char_char2_1_accum(int *accum, char a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_char4_0) accumulator(my_char_char4_0_accum) combiner(combiner) +static void my_char_char4_0_accum(int *accum, char a, char4 b) { } + +#pragma rs reduce(my_char_char4_1) accumulator(my_char_char4_1_accum) combiner(combiner) +static void my_char_char4_1_accum(int *accum, char a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_short_0) accumulator(my_char_short_0_accum) combiner(combiner) +static void my_char_short_0_accum(int *accum, char a, short b) { } + +#pragma rs reduce(my_char_short_1) accumulator(my_char_short_1_accum) combiner(combiner) +static void my_char_short_1_accum(int *accum, char a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_short2_0) accumulator(my_char_short2_0_accum) combiner(combiner) +static void my_char_short2_0_accum(int *accum, char a, short2 b) { } + +#pragma rs reduce(my_char_short2_1) accumulator(my_char_short2_1_accum) combiner(combiner) +static void my_char_short2_1_accum(int *accum, char a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_short4_0) accumulator(my_char_short4_0_accum) combiner(combiner) +static void my_char_short4_0_accum(int *accum, char a, short4 b) { } + +#pragma rs reduce(my_char_short4_1) accumulator(my_char_short4_1_accum) combiner(combiner) +static void my_char_short4_1_accum(int *accum, char a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_uchar_0) accumulator(my_char_uchar_0_accum) combiner(combiner) +static void my_char_uchar_0_accum(int *accum, char a, uchar b) { } + +#pragma rs reduce(my_char_uchar_1) accumulator(my_char_uchar_1_accum) combiner(combiner) +static void my_char_uchar_1_accum(int *accum, char a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_uchar2_0) accumulator(my_char_uchar2_0_accum) combiner(combiner) +static void my_char_uchar2_0_accum(int *accum, char a, uchar2 b) { } + +#pragma rs reduce(my_char_uchar2_1) accumulator(my_char_uchar2_1_accum) combiner(combiner) +static void my_char_uchar2_1_accum(int *accum, char a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_uchar4_0) accumulator(my_char_uchar4_0_accum) combiner(combiner) +static void my_char_uchar4_0_accum(int *accum, char a, uchar4 b) { } + +#pragma rs reduce(my_char_uchar4_1) accumulator(my_char_uchar4_1_accum) combiner(combiner) +static void my_char_uchar4_1_accum(int *accum, char a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_ushort_0) accumulator(my_char_ushort_0_accum) combiner(combiner) +static void my_char_ushort_0_accum(int *accum, char a, ushort b) { } + +#pragma rs reduce(my_char_ushort_1) accumulator(my_char_ushort_1_accum) combiner(combiner) +static void my_char_ushort_1_accum(int *accum, char a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_ushort2_0) accumulator(my_char_ushort2_0_accum) combiner(combiner) +static void my_char_ushort2_0_accum(int *accum, char a, ushort2 b) { } + +#pragma rs reduce(my_char_ushort2_1) accumulator(my_char_ushort2_1_accum) combiner(combiner) +static void my_char_ushort2_1_accum(int *accum, char a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_ushort4_0) accumulator(my_char_ushort4_0_accum) combiner(combiner) +static void my_char_ushort4_0_accum(int *accum, char a, ushort4 b) { } + +#pragma rs reduce(my_char_ushort4_1) accumulator(my_char_ushort4_1_accum) combiner(combiner) +static void my_char_ushort4_1_accum(int *accum, char a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_bool_0) accumulator(my_char_bool_0_accum) combiner(combiner) +static void my_char_bool_0_accum(int *accum, char a, bool b) { } + +#pragma rs reduce(my_char_bool_1) accumulator(my_char_bool_1_accum) combiner(combiner) +static void my_char_bool_1_accum(int *accum, char a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_rs_matrix2x2_0) accumulator(my_char_rs_matrix2x2_0_accum) combiner(combiner) +static void my_char_rs_matrix2x2_0_accum(int *accum, char a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_char_rs_matrix2x2_1) accumulator(my_char_rs_matrix2x2_1_accum) combiner(combiner) +static void my_char_rs_matrix2x2_1_accum(int *accum, char a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char_MyStruct_0) accumulator(my_char_MyStruct_0_accum) combiner(combiner) +static void my_char_MyStruct_0_accum(int *accum, char a, MyStruct b) { } + +#pragma rs reduce(my_char_MyStruct_1) accumulator(my_char_MyStruct_1_accum) combiner(combiner) +static void my_char_MyStruct_1_accum(int *accum, char a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_half_0) accumulator(my_char2_half_0_accum) combiner(combiner) +static void my_char2_half_0_accum(int *accum, char2 a, half b) { } + +#pragma rs reduce(my_char2_half_1) accumulator(my_char2_half_1_accum) combiner(combiner) +static void my_char2_half_1_accum(int *accum, char2 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_half2_0) accumulator(my_char2_half2_0_accum) combiner(combiner) +static void my_char2_half2_0_accum(int *accum, char2 a, half2 b) { } + +#pragma rs reduce(my_char2_half2_1) accumulator(my_char2_half2_1_accum) combiner(combiner) +static void my_char2_half2_1_accum(int *accum, char2 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_half4_0) accumulator(my_char2_half4_0_accum) combiner(combiner) +static void my_char2_half4_0_accum(int *accum, char2 a, half4 b) { } + +#pragma rs reduce(my_char2_half4_1) accumulator(my_char2_half4_1_accum) combiner(combiner) +static void my_char2_half4_1_accum(int *accum, char2 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_float_0) accumulator(my_char2_float_0_accum) combiner(combiner) +static void my_char2_float_0_accum(int *accum, char2 a, float b) { } + +#pragma rs reduce(my_char2_float_1) accumulator(my_char2_float_1_accum) combiner(combiner) +static void my_char2_float_1_accum(int *accum, char2 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_float2_0) accumulator(my_char2_float2_0_accum) combiner(combiner) +static void my_char2_float2_0_accum(int *accum, char2 a, float2 b) { } + +#pragma rs reduce(my_char2_float2_1) accumulator(my_char2_float2_1_accum) combiner(combiner) +static void my_char2_float2_1_accum(int *accum, char2 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_float4_0) accumulator(my_char2_float4_0_accum) combiner(combiner) +static void my_char2_float4_0_accum(int *accum, char2 a, float4 b) { } + +#pragma rs reduce(my_char2_float4_1) accumulator(my_char2_float4_1_accum) combiner(combiner) +static void my_char2_float4_1_accum(int *accum, char2 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_char_0) accumulator(my_char2_char_0_accum) combiner(combiner) +static void my_char2_char_0_accum(int *accum, char2 a, char b) { } + +#pragma rs reduce(my_char2_char_1) accumulator(my_char2_char_1_accum) combiner(combiner) +static void my_char2_char_1_accum(int *accum, char2 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_char2_0) accumulator(my_char2_char2_0_accum) combiner(combiner) +static void my_char2_char2_0_accum(int *accum, char2 a, char2 b) { } + +#pragma rs reduce(my_char2_char2_1) accumulator(my_char2_char2_1_accum) combiner(combiner) +static void my_char2_char2_1_accum(int *accum, char2 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_char4_0) accumulator(my_char2_char4_0_accum) combiner(combiner) +static void my_char2_char4_0_accum(int *accum, char2 a, char4 b) { } + +#pragma rs reduce(my_char2_char4_1) accumulator(my_char2_char4_1_accum) combiner(combiner) +static void my_char2_char4_1_accum(int *accum, char2 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_short_0) accumulator(my_char2_short_0_accum) combiner(combiner) +static void my_char2_short_0_accum(int *accum, char2 a, short b) { } + +#pragma rs reduce(my_char2_short_1) accumulator(my_char2_short_1_accum) combiner(combiner) +static void my_char2_short_1_accum(int *accum, char2 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_short2_0) accumulator(my_char2_short2_0_accum) combiner(combiner) +static void my_char2_short2_0_accum(int *accum, char2 a, short2 b) { } + +#pragma rs reduce(my_char2_short2_1) accumulator(my_char2_short2_1_accum) combiner(combiner) +static void my_char2_short2_1_accum(int *accum, char2 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_short4_0) accumulator(my_char2_short4_0_accum) combiner(combiner) +static void my_char2_short4_0_accum(int *accum, char2 a, short4 b) { } + +#pragma rs reduce(my_char2_short4_1) accumulator(my_char2_short4_1_accum) combiner(combiner) +static void my_char2_short4_1_accum(int *accum, char2 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_uchar_0) accumulator(my_char2_uchar_0_accum) combiner(combiner) +static void my_char2_uchar_0_accum(int *accum, char2 a, uchar b) { } + +#pragma rs reduce(my_char2_uchar_1) accumulator(my_char2_uchar_1_accum) combiner(combiner) +static void my_char2_uchar_1_accum(int *accum, char2 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_uchar2_0) accumulator(my_char2_uchar2_0_accum) combiner(combiner) +static void my_char2_uchar2_0_accum(int *accum, char2 a, uchar2 b) { } + +#pragma rs reduce(my_char2_uchar2_1) accumulator(my_char2_uchar2_1_accum) combiner(combiner) +static void my_char2_uchar2_1_accum(int *accum, char2 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_uchar4_0) accumulator(my_char2_uchar4_0_accum) combiner(combiner) +static void my_char2_uchar4_0_accum(int *accum, char2 a, uchar4 b) { } + +#pragma rs reduce(my_char2_uchar4_1) accumulator(my_char2_uchar4_1_accum) combiner(combiner) +static void my_char2_uchar4_1_accum(int *accum, char2 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_ushort_0) accumulator(my_char2_ushort_0_accum) combiner(combiner) +static void my_char2_ushort_0_accum(int *accum, char2 a, ushort b) { } + +#pragma rs reduce(my_char2_ushort_1) accumulator(my_char2_ushort_1_accum) combiner(combiner) +static void my_char2_ushort_1_accum(int *accum, char2 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_ushort2_0) accumulator(my_char2_ushort2_0_accum) combiner(combiner) +static void my_char2_ushort2_0_accum(int *accum, char2 a, ushort2 b) { } + +#pragma rs reduce(my_char2_ushort2_1) accumulator(my_char2_ushort2_1_accum) combiner(combiner) +static void my_char2_ushort2_1_accum(int *accum, char2 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_ushort4_0) accumulator(my_char2_ushort4_0_accum) combiner(combiner) +static void my_char2_ushort4_0_accum(int *accum, char2 a, ushort4 b) { } + +#pragma rs reduce(my_char2_ushort4_1) accumulator(my_char2_ushort4_1_accum) combiner(combiner) +static void my_char2_ushort4_1_accum(int *accum, char2 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_bool_0) accumulator(my_char2_bool_0_accum) combiner(combiner) +static void my_char2_bool_0_accum(int *accum, char2 a, bool b) { } + +#pragma rs reduce(my_char2_bool_1) accumulator(my_char2_bool_1_accum) combiner(combiner) +static void my_char2_bool_1_accum(int *accum, char2 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_rs_matrix2x2_0) accumulator(my_char2_rs_matrix2x2_0_accum) combiner(combiner) +static void my_char2_rs_matrix2x2_0_accum(int *accum, char2 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_char2_rs_matrix2x2_1) accumulator(my_char2_rs_matrix2x2_1_accum) combiner(combiner) +static void my_char2_rs_matrix2x2_1_accum(int *accum, char2 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char2_MyStruct_0) accumulator(my_char2_MyStruct_0_accum) combiner(combiner) +static void my_char2_MyStruct_0_accum(int *accum, char2 a, MyStruct b) { } + +#pragma rs reduce(my_char2_MyStruct_1) accumulator(my_char2_MyStruct_1_accum) combiner(combiner) +static void my_char2_MyStruct_1_accum(int *accum, char2 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_half_0) accumulator(my_char4_half_0_accum) combiner(combiner) +static void my_char4_half_0_accum(int *accum, char4 a, half b) { } + +#pragma rs reduce(my_char4_half_1) accumulator(my_char4_half_1_accum) combiner(combiner) +static void my_char4_half_1_accum(int *accum, char4 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_half2_0) accumulator(my_char4_half2_0_accum) combiner(combiner) +static void my_char4_half2_0_accum(int *accum, char4 a, half2 b) { } + +#pragma rs reduce(my_char4_half2_1) accumulator(my_char4_half2_1_accum) combiner(combiner) +static void my_char4_half2_1_accum(int *accum, char4 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_half4_0) accumulator(my_char4_half4_0_accum) combiner(combiner) +static void my_char4_half4_0_accum(int *accum, char4 a, half4 b) { } + +#pragma rs reduce(my_char4_half4_1) accumulator(my_char4_half4_1_accum) combiner(combiner) +static void my_char4_half4_1_accum(int *accum, char4 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_float_0) accumulator(my_char4_float_0_accum) combiner(combiner) +static void my_char4_float_0_accum(int *accum, char4 a, float b) { } + +#pragma rs reduce(my_char4_float_1) accumulator(my_char4_float_1_accum) combiner(combiner) +static void my_char4_float_1_accum(int *accum, char4 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_float2_0) accumulator(my_char4_float2_0_accum) combiner(combiner) +static void my_char4_float2_0_accum(int *accum, char4 a, float2 b) { } + +#pragma rs reduce(my_char4_float2_1) accumulator(my_char4_float2_1_accum) combiner(combiner) +static void my_char4_float2_1_accum(int *accum, char4 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_float4_0) accumulator(my_char4_float4_0_accum) combiner(combiner) +static void my_char4_float4_0_accum(int *accum, char4 a, float4 b) { } + +#pragma rs reduce(my_char4_float4_1) accumulator(my_char4_float4_1_accum) combiner(combiner) +static void my_char4_float4_1_accum(int *accum, char4 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_char_0) accumulator(my_char4_char_0_accum) combiner(combiner) +static void my_char4_char_0_accum(int *accum, char4 a, char b) { } + +#pragma rs reduce(my_char4_char_1) accumulator(my_char4_char_1_accum) combiner(combiner) +static void my_char4_char_1_accum(int *accum, char4 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_char2_0) accumulator(my_char4_char2_0_accum) combiner(combiner) +static void my_char4_char2_0_accum(int *accum, char4 a, char2 b) { } + +#pragma rs reduce(my_char4_char2_1) accumulator(my_char4_char2_1_accum) combiner(combiner) +static void my_char4_char2_1_accum(int *accum, char4 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_char4_0) accumulator(my_char4_char4_0_accum) combiner(combiner) +static void my_char4_char4_0_accum(int *accum, char4 a, char4 b) { } + +#pragma rs reduce(my_char4_char4_1) accumulator(my_char4_char4_1_accum) combiner(combiner) +static void my_char4_char4_1_accum(int *accum, char4 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_short_0) accumulator(my_char4_short_0_accum) combiner(combiner) +static void my_char4_short_0_accum(int *accum, char4 a, short b) { } + +#pragma rs reduce(my_char4_short_1) accumulator(my_char4_short_1_accum) combiner(combiner) +static void my_char4_short_1_accum(int *accum, char4 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_short2_0) accumulator(my_char4_short2_0_accum) combiner(combiner) +static void my_char4_short2_0_accum(int *accum, char4 a, short2 b) { } + +#pragma rs reduce(my_char4_short2_1) accumulator(my_char4_short2_1_accum) combiner(combiner) +static void my_char4_short2_1_accum(int *accum, char4 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_short4_0) accumulator(my_char4_short4_0_accum) combiner(combiner) +static void my_char4_short4_0_accum(int *accum, char4 a, short4 b) { } + +#pragma rs reduce(my_char4_short4_1) accumulator(my_char4_short4_1_accum) combiner(combiner) +static void my_char4_short4_1_accum(int *accum, char4 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_uchar_0) accumulator(my_char4_uchar_0_accum) combiner(combiner) +static void my_char4_uchar_0_accum(int *accum, char4 a, uchar b) { } + +#pragma rs reduce(my_char4_uchar_1) accumulator(my_char4_uchar_1_accum) combiner(combiner) +static void my_char4_uchar_1_accum(int *accum, char4 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_uchar2_0) accumulator(my_char4_uchar2_0_accum) combiner(combiner) +static void my_char4_uchar2_0_accum(int *accum, char4 a, uchar2 b) { } + +#pragma rs reduce(my_char4_uchar2_1) accumulator(my_char4_uchar2_1_accum) combiner(combiner) +static void my_char4_uchar2_1_accum(int *accum, char4 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_uchar4_0) accumulator(my_char4_uchar4_0_accum) combiner(combiner) +static void my_char4_uchar4_0_accum(int *accum, char4 a, uchar4 b) { } + +#pragma rs reduce(my_char4_uchar4_1) accumulator(my_char4_uchar4_1_accum) combiner(combiner) +static void my_char4_uchar4_1_accum(int *accum, char4 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_ushort_0) accumulator(my_char4_ushort_0_accum) combiner(combiner) +static void my_char4_ushort_0_accum(int *accum, char4 a, ushort b) { } + +#pragma rs reduce(my_char4_ushort_1) accumulator(my_char4_ushort_1_accum) combiner(combiner) +static void my_char4_ushort_1_accum(int *accum, char4 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_ushort2_0) accumulator(my_char4_ushort2_0_accum) combiner(combiner) +static void my_char4_ushort2_0_accum(int *accum, char4 a, ushort2 b) { } + +#pragma rs reduce(my_char4_ushort2_1) accumulator(my_char4_ushort2_1_accum) combiner(combiner) +static void my_char4_ushort2_1_accum(int *accum, char4 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_ushort4_0) accumulator(my_char4_ushort4_0_accum) combiner(combiner) +static void my_char4_ushort4_0_accum(int *accum, char4 a, ushort4 b) { } + +#pragma rs reduce(my_char4_ushort4_1) accumulator(my_char4_ushort4_1_accum) combiner(combiner) +static void my_char4_ushort4_1_accum(int *accum, char4 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_bool_0) accumulator(my_char4_bool_0_accum) combiner(combiner) +static void my_char4_bool_0_accum(int *accum, char4 a, bool b) { } + +#pragma rs reduce(my_char4_bool_1) accumulator(my_char4_bool_1_accum) combiner(combiner) +static void my_char4_bool_1_accum(int *accum, char4 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_rs_matrix2x2_0) accumulator(my_char4_rs_matrix2x2_0_accum) combiner(combiner) +static void my_char4_rs_matrix2x2_0_accum(int *accum, char4 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_char4_rs_matrix2x2_1) accumulator(my_char4_rs_matrix2x2_1_accum) combiner(combiner) +static void my_char4_rs_matrix2x2_1_accum(int *accum, char4 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_char4_MyStruct_0) accumulator(my_char4_MyStruct_0_accum) combiner(combiner) +static void my_char4_MyStruct_0_accum(int *accum, char4 a, MyStruct b) { } + +#pragma rs reduce(my_char4_MyStruct_1) accumulator(my_char4_MyStruct_1_accum) combiner(combiner) +static void my_char4_MyStruct_1_accum(int *accum, char4 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_half_0) accumulator(my_short_half_0_accum) combiner(combiner) +static void my_short_half_0_accum(int *accum, short a, half b) { } + +#pragma rs reduce(my_short_half_1) accumulator(my_short_half_1_accum) combiner(combiner) +static void my_short_half_1_accum(int *accum, short a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_half2_0) accumulator(my_short_half2_0_accum) combiner(combiner) +static void my_short_half2_0_accum(int *accum, short a, half2 b) { } + +#pragma rs reduce(my_short_half2_1) accumulator(my_short_half2_1_accum) combiner(combiner) +static void my_short_half2_1_accum(int *accum, short a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_half4_0) accumulator(my_short_half4_0_accum) combiner(combiner) +static void my_short_half4_0_accum(int *accum, short a, half4 b) { } + +#pragma rs reduce(my_short_half4_1) accumulator(my_short_half4_1_accum) combiner(combiner) +static void my_short_half4_1_accum(int *accum, short a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_float_0) accumulator(my_short_float_0_accum) combiner(combiner) +static void my_short_float_0_accum(int *accum, short a, float b) { } + +#pragma rs reduce(my_short_float_1) accumulator(my_short_float_1_accum) combiner(combiner) +static void my_short_float_1_accum(int *accum, short a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_float2_0) accumulator(my_short_float2_0_accum) combiner(combiner) +static void my_short_float2_0_accum(int *accum, short a, float2 b) { } + +#pragma rs reduce(my_short_float2_1) accumulator(my_short_float2_1_accum) combiner(combiner) +static void my_short_float2_1_accum(int *accum, short a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_float4_0) accumulator(my_short_float4_0_accum) combiner(combiner) +static void my_short_float4_0_accum(int *accum, short a, float4 b) { } + +#pragma rs reduce(my_short_float4_1) accumulator(my_short_float4_1_accum) combiner(combiner) +static void my_short_float4_1_accum(int *accum, short a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_char_0) accumulator(my_short_char_0_accum) combiner(combiner) +static void my_short_char_0_accum(int *accum, short a, char b) { } + +#pragma rs reduce(my_short_char_1) accumulator(my_short_char_1_accum) combiner(combiner) +static void my_short_char_1_accum(int *accum, short a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_char2_0) accumulator(my_short_char2_0_accum) combiner(combiner) +static void my_short_char2_0_accum(int *accum, short a, char2 b) { } + +#pragma rs reduce(my_short_char2_1) accumulator(my_short_char2_1_accum) combiner(combiner) +static void my_short_char2_1_accum(int *accum, short a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_char4_0) accumulator(my_short_char4_0_accum) combiner(combiner) +static void my_short_char4_0_accum(int *accum, short a, char4 b) { } + +#pragma rs reduce(my_short_char4_1) accumulator(my_short_char4_1_accum) combiner(combiner) +static void my_short_char4_1_accum(int *accum, short a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_short_0) accumulator(my_short_short_0_accum) combiner(combiner) +static void my_short_short_0_accum(int *accum, short a, short b) { } + +#pragma rs reduce(my_short_short_1) accumulator(my_short_short_1_accum) combiner(combiner) +static void my_short_short_1_accum(int *accum, short a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_short2_0) accumulator(my_short_short2_0_accum) combiner(combiner) +static void my_short_short2_0_accum(int *accum, short a, short2 b) { } + +#pragma rs reduce(my_short_short2_1) accumulator(my_short_short2_1_accum) combiner(combiner) +static void my_short_short2_1_accum(int *accum, short a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_short4_0) accumulator(my_short_short4_0_accum) combiner(combiner) +static void my_short_short4_0_accum(int *accum, short a, short4 b) { } + +#pragma rs reduce(my_short_short4_1) accumulator(my_short_short4_1_accum) combiner(combiner) +static void my_short_short4_1_accum(int *accum, short a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_uchar_0) accumulator(my_short_uchar_0_accum) combiner(combiner) +static void my_short_uchar_0_accum(int *accum, short a, uchar b) { } + +#pragma rs reduce(my_short_uchar_1) accumulator(my_short_uchar_1_accum) combiner(combiner) +static void my_short_uchar_1_accum(int *accum, short a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_uchar2_0) accumulator(my_short_uchar2_0_accum) combiner(combiner) +static void my_short_uchar2_0_accum(int *accum, short a, uchar2 b) { } + +#pragma rs reduce(my_short_uchar2_1) accumulator(my_short_uchar2_1_accum) combiner(combiner) +static void my_short_uchar2_1_accum(int *accum, short a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_uchar4_0) accumulator(my_short_uchar4_0_accum) combiner(combiner) +static void my_short_uchar4_0_accum(int *accum, short a, uchar4 b) { } + +#pragma rs reduce(my_short_uchar4_1) accumulator(my_short_uchar4_1_accum) combiner(combiner) +static void my_short_uchar4_1_accum(int *accum, short a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_ushort_0) accumulator(my_short_ushort_0_accum) combiner(combiner) +static void my_short_ushort_0_accum(int *accum, short a, ushort b) { } + +#pragma rs reduce(my_short_ushort_1) accumulator(my_short_ushort_1_accum) combiner(combiner) +static void my_short_ushort_1_accum(int *accum, short a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_ushort2_0) accumulator(my_short_ushort2_0_accum) combiner(combiner) +static void my_short_ushort2_0_accum(int *accum, short a, ushort2 b) { } + +#pragma rs reduce(my_short_ushort2_1) accumulator(my_short_ushort2_1_accum) combiner(combiner) +static void my_short_ushort2_1_accum(int *accum, short a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_ushort4_0) accumulator(my_short_ushort4_0_accum) combiner(combiner) +static void my_short_ushort4_0_accum(int *accum, short a, ushort4 b) { } + +#pragma rs reduce(my_short_ushort4_1) accumulator(my_short_ushort4_1_accum) combiner(combiner) +static void my_short_ushort4_1_accum(int *accum, short a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_bool_0) accumulator(my_short_bool_0_accum) combiner(combiner) +static void my_short_bool_0_accum(int *accum, short a, bool b) { } + +#pragma rs reduce(my_short_bool_1) accumulator(my_short_bool_1_accum) combiner(combiner) +static void my_short_bool_1_accum(int *accum, short a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_rs_matrix2x2_0) accumulator(my_short_rs_matrix2x2_0_accum) combiner(combiner) +static void my_short_rs_matrix2x2_0_accum(int *accum, short a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_short_rs_matrix2x2_1) accumulator(my_short_rs_matrix2x2_1_accum) combiner(combiner) +static void my_short_rs_matrix2x2_1_accum(int *accum, short a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short_MyStruct_0) accumulator(my_short_MyStruct_0_accum) combiner(combiner) +static void my_short_MyStruct_0_accum(int *accum, short a, MyStruct b) { } + +#pragma rs reduce(my_short_MyStruct_1) accumulator(my_short_MyStruct_1_accum) combiner(combiner) +static void my_short_MyStruct_1_accum(int *accum, short a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_half_0) accumulator(my_short2_half_0_accum) combiner(combiner) +static void my_short2_half_0_accum(int *accum, short2 a, half b) { } + +#pragma rs reduce(my_short2_half_1) accumulator(my_short2_half_1_accum) combiner(combiner) +static void my_short2_half_1_accum(int *accum, short2 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_half2_0) accumulator(my_short2_half2_0_accum) combiner(combiner) +static void my_short2_half2_0_accum(int *accum, short2 a, half2 b) { } + +#pragma rs reduce(my_short2_half2_1) accumulator(my_short2_half2_1_accum) combiner(combiner) +static void my_short2_half2_1_accum(int *accum, short2 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_half4_0) accumulator(my_short2_half4_0_accum) combiner(combiner) +static void my_short2_half4_0_accum(int *accum, short2 a, half4 b) { } + +#pragma rs reduce(my_short2_half4_1) accumulator(my_short2_half4_1_accum) combiner(combiner) +static void my_short2_half4_1_accum(int *accum, short2 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_float_0) accumulator(my_short2_float_0_accum) combiner(combiner) +static void my_short2_float_0_accum(int *accum, short2 a, float b) { } + +#pragma rs reduce(my_short2_float_1) accumulator(my_short2_float_1_accum) combiner(combiner) +static void my_short2_float_1_accum(int *accum, short2 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_float2_0) accumulator(my_short2_float2_0_accum) combiner(combiner) +static void my_short2_float2_0_accum(int *accum, short2 a, float2 b) { } + +#pragma rs reduce(my_short2_float2_1) accumulator(my_short2_float2_1_accum) combiner(combiner) +static void my_short2_float2_1_accum(int *accum, short2 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_float4_0) accumulator(my_short2_float4_0_accum) combiner(combiner) +static void my_short2_float4_0_accum(int *accum, short2 a, float4 b) { } + +#pragma rs reduce(my_short2_float4_1) accumulator(my_short2_float4_1_accum) combiner(combiner) +static void my_short2_float4_1_accum(int *accum, short2 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_char_0) accumulator(my_short2_char_0_accum) combiner(combiner) +static void my_short2_char_0_accum(int *accum, short2 a, char b) { } + +#pragma rs reduce(my_short2_char_1) accumulator(my_short2_char_1_accum) combiner(combiner) +static void my_short2_char_1_accum(int *accum, short2 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_char2_0) accumulator(my_short2_char2_0_accum) combiner(combiner) +static void my_short2_char2_0_accum(int *accum, short2 a, char2 b) { } + +#pragma rs reduce(my_short2_char2_1) accumulator(my_short2_char2_1_accum) combiner(combiner) +static void my_short2_char2_1_accum(int *accum, short2 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_char4_0) accumulator(my_short2_char4_0_accum) combiner(combiner) +static void my_short2_char4_0_accum(int *accum, short2 a, char4 b) { } + +#pragma rs reduce(my_short2_char4_1) accumulator(my_short2_char4_1_accum) combiner(combiner) +static void my_short2_char4_1_accum(int *accum, short2 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_short_0) accumulator(my_short2_short_0_accum) combiner(combiner) +static void my_short2_short_0_accum(int *accum, short2 a, short b) { } + +#pragma rs reduce(my_short2_short_1) accumulator(my_short2_short_1_accum) combiner(combiner) +static void my_short2_short_1_accum(int *accum, short2 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_short2_0) accumulator(my_short2_short2_0_accum) combiner(combiner) +static void my_short2_short2_0_accum(int *accum, short2 a, short2 b) { } + +#pragma rs reduce(my_short2_short2_1) accumulator(my_short2_short2_1_accum) combiner(combiner) +static void my_short2_short2_1_accum(int *accum, short2 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_short4_0) accumulator(my_short2_short4_0_accum) combiner(combiner) +static void my_short2_short4_0_accum(int *accum, short2 a, short4 b) { } + +#pragma rs reduce(my_short2_short4_1) accumulator(my_short2_short4_1_accum) combiner(combiner) +static void my_short2_short4_1_accum(int *accum, short2 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_uchar_0) accumulator(my_short2_uchar_0_accum) combiner(combiner) +static void my_short2_uchar_0_accum(int *accum, short2 a, uchar b) { } + +#pragma rs reduce(my_short2_uchar_1) accumulator(my_short2_uchar_1_accum) combiner(combiner) +static void my_short2_uchar_1_accum(int *accum, short2 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_uchar2_0) accumulator(my_short2_uchar2_0_accum) combiner(combiner) +static void my_short2_uchar2_0_accum(int *accum, short2 a, uchar2 b) { } + +#pragma rs reduce(my_short2_uchar2_1) accumulator(my_short2_uchar2_1_accum) combiner(combiner) +static void my_short2_uchar2_1_accum(int *accum, short2 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_uchar4_0) accumulator(my_short2_uchar4_0_accum) combiner(combiner) +static void my_short2_uchar4_0_accum(int *accum, short2 a, uchar4 b) { } + +#pragma rs reduce(my_short2_uchar4_1) accumulator(my_short2_uchar4_1_accum) combiner(combiner) +static void my_short2_uchar4_1_accum(int *accum, short2 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_ushort_0) accumulator(my_short2_ushort_0_accum) combiner(combiner) +static void my_short2_ushort_0_accum(int *accum, short2 a, ushort b) { } + +#pragma rs reduce(my_short2_ushort_1) accumulator(my_short2_ushort_1_accum) combiner(combiner) +static void my_short2_ushort_1_accum(int *accum, short2 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_ushort2_0) accumulator(my_short2_ushort2_0_accum) combiner(combiner) +static void my_short2_ushort2_0_accum(int *accum, short2 a, ushort2 b) { } + +#pragma rs reduce(my_short2_ushort2_1) accumulator(my_short2_ushort2_1_accum) combiner(combiner) +static void my_short2_ushort2_1_accum(int *accum, short2 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_ushort4_0) accumulator(my_short2_ushort4_0_accum) combiner(combiner) +static void my_short2_ushort4_0_accum(int *accum, short2 a, ushort4 b) { } + +#pragma rs reduce(my_short2_ushort4_1) accumulator(my_short2_ushort4_1_accum) combiner(combiner) +static void my_short2_ushort4_1_accum(int *accum, short2 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_bool_0) accumulator(my_short2_bool_0_accum) combiner(combiner) +static void my_short2_bool_0_accum(int *accum, short2 a, bool b) { } + +#pragma rs reduce(my_short2_bool_1) accumulator(my_short2_bool_1_accum) combiner(combiner) +static void my_short2_bool_1_accum(int *accum, short2 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_rs_matrix2x2_0) accumulator(my_short2_rs_matrix2x2_0_accum) combiner(combiner) +static void my_short2_rs_matrix2x2_0_accum(int *accum, short2 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_short2_rs_matrix2x2_1) accumulator(my_short2_rs_matrix2x2_1_accum) combiner(combiner) +static void my_short2_rs_matrix2x2_1_accum(int *accum, short2 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short2_MyStruct_0) accumulator(my_short2_MyStruct_0_accum) combiner(combiner) +static void my_short2_MyStruct_0_accum(int *accum, short2 a, MyStruct b) { } + +#pragma rs reduce(my_short2_MyStruct_1) accumulator(my_short2_MyStruct_1_accum) combiner(combiner) +static void my_short2_MyStruct_1_accum(int *accum, short2 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_half_0) accumulator(my_short4_half_0_accum) combiner(combiner) +static void my_short4_half_0_accum(int *accum, short4 a, half b) { } + +#pragma rs reduce(my_short4_half_1) accumulator(my_short4_half_1_accum) combiner(combiner) +static void my_short4_half_1_accum(int *accum, short4 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_half2_0) accumulator(my_short4_half2_0_accum) combiner(combiner) +static void my_short4_half2_0_accum(int *accum, short4 a, half2 b) { } + +#pragma rs reduce(my_short4_half2_1) accumulator(my_short4_half2_1_accum) combiner(combiner) +static void my_short4_half2_1_accum(int *accum, short4 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_half4_0) accumulator(my_short4_half4_0_accum) combiner(combiner) +static void my_short4_half4_0_accum(int *accum, short4 a, half4 b) { } + +#pragma rs reduce(my_short4_half4_1) accumulator(my_short4_half4_1_accum) combiner(combiner) +static void my_short4_half4_1_accum(int *accum, short4 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_float_0) accumulator(my_short4_float_0_accum) combiner(combiner) +static void my_short4_float_0_accum(int *accum, short4 a, float b) { } + +#pragma rs reduce(my_short4_float_1) accumulator(my_short4_float_1_accum) combiner(combiner) +static void my_short4_float_1_accum(int *accum, short4 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_float2_0) accumulator(my_short4_float2_0_accum) combiner(combiner) +static void my_short4_float2_0_accum(int *accum, short4 a, float2 b) { } + +#pragma rs reduce(my_short4_float2_1) accumulator(my_short4_float2_1_accum) combiner(combiner) +static void my_short4_float2_1_accum(int *accum, short4 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_float4_0) accumulator(my_short4_float4_0_accum) combiner(combiner) +static void my_short4_float4_0_accum(int *accum, short4 a, float4 b) { } + +#pragma rs reduce(my_short4_float4_1) accumulator(my_short4_float4_1_accum) combiner(combiner) +static void my_short4_float4_1_accum(int *accum, short4 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_char_0) accumulator(my_short4_char_0_accum) combiner(combiner) +static void my_short4_char_0_accum(int *accum, short4 a, char b) { } + +#pragma rs reduce(my_short4_char_1) accumulator(my_short4_char_1_accum) combiner(combiner) +static void my_short4_char_1_accum(int *accum, short4 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_char2_0) accumulator(my_short4_char2_0_accum) combiner(combiner) +static void my_short4_char2_0_accum(int *accum, short4 a, char2 b) { } + +#pragma rs reduce(my_short4_char2_1) accumulator(my_short4_char2_1_accum) combiner(combiner) +static void my_short4_char2_1_accum(int *accum, short4 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_char4_0) accumulator(my_short4_char4_0_accum) combiner(combiner) +static void my_short4_char4_0_accum(int *accum, short4 a, char4 b) { } + +#pragma rs reduce(my_short4_char4_1) accumulator(my_short4_char4_1_accum) combiner(combiner) +static void my_short4_char4_1_accum(int *accum, short4 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_short_0) accumulator(my_short4_short_0_accum) combiner(combiner) +static void my_short4_short_0_accum(int *accum, short4 a, short b) { } + +#pragma rs reduce(my_short4_short_1) accumulator(my_short4_short_1_accum) combiner(combiner) +static void my_short4_short_1_accum(int *accum, short4 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_short2_0) accumulator(my_short4_short2_0_accum) combiner(combiner) +static void my_short4_short2_0_accum(int *accum, short4 a, short2 b) { } + +#pragma rs reduce(my_short4_short2_1) accumulator(my_short4_short2_1_accum) combiner(combiner) +static void my_short4_short2_1_accum(int *accum, short4 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_short4_0) accumulator(my_short4_short4_0_accum) combiner(combiner) +static void my_short4_short4_0_accum(int *accum, short4 a, short4 b) { } + +#pragma rs reduce(my_short4_short4_1) accumulator(my_short4_short4_1_accum) combiner(combiner) +static void my_short4_short4_1_accum(int *accum, short4 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_uchar_0) accumulator(my_short4_uchar_0_accum) combiner(combiner) +static void my_short4_uchar_0_accum(int *accum, short4 a, uchar b) { } + +#pragma rs reduce(my_short4_uchar_1) accumulator(my_short4_uchar_1_accum) combiner(combiner) +static void my_short4_uchar_1_accum(int *accum, short4 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_uchar2_0) accumulator(my_short4_uchar2_0_accum) combiner(combiner) +static void my_short4_uchar2_0_accum(int *accum, short4 a, uchar2 b) { } + +#pragma rs reduce(my_short4_uchar2_1) accumulator(my_short4_uchar2_1_accum) combiner(combiner) +static void my_short4_uchar2_1_accum(int *accum, short4 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_uchar4_0) accumulator(my_short4_uchar4_0_accum) combiner(combiner) +static void my_short4_uchar4_0_accum(int *accum, short4 a, uchar4 b) { } + +#pragma rs reduce(my_short4_uchar4_1) accumulator(my_short4_uchar4_1_accum) combiner(combiner) +static void my_short4_uchar4_1_accum(int *accum, short4 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_ushort_0) accumulator(my_short4_ushort_0_accum) combiner(combiner) +static void my_short4_ushort_0_accum(int *accum, short4 a, ushort b) { } + +#pragma rs reduce(my_short4_ushort_1) accumulator(my_short4_ushort_1_accum) combiner(combiner) +static void my_short4_ushort_1_accum(int *accum, short4 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_ushort2_0) accumulator(my_short4_ushort2_0_accum) combiner(combiner) +static void my_short4_ushort2_0_accum(int *accum, short4 a, ushort2 b) { } + +#pragma rs reduce(my_short4_ushort2_1) accumulator(my_short4_ushort2_1_accum) combiner(combiner) +static void my_short4_ushort2_1_accum(int *accum, short4 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_ushort4_0) accumulator(my_short4_ushort4_0_accum) combiner(combiner) +static void my_short4_ushort4_0_accum(int *accum, short4 a, ushort4 b) { } + +#pragma rs reduce(my_short4_ushort4_1) accumulator(my_short4_ushort4_1_accum) combiner(combiner) +static void my_short4_ushort4_1_accum(int *accum, short4 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_bool_0) accumulator(my_short4_bool_0_accum) combiner(combiner) +static void my_short4_bool_0_accum(int *accum, short4 a, bool b) { } + +#pragma rs reduce(my_short4_bool_1) accumulator(my_short4_bool_1_accum) combiner(combiner) +static void my_short4_bool_1_accum(int *accum, short4 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_rs_matrix2x2_0) accumulator(my_short4_rs_matrix2x2_0_accum) combiner(combiner) +static void my_short4_rs_matrix2x2_0_accum(int *accum, short4 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_short4_rs_matrix2x2_1) accumulator(my_short4_rs_matrix2x2_1_accum) combiner(combiner) +static void my_short4_rs_matrix2x2_1_accum(int *accum, short4 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_short4_MyStruct_0) accumulator(my_short4_MyStruct_0_accum) combiner(combiner) +static void my_short4_MyStruct_0_accum(int *accum, short4 a, MyStruct b) { } + +#pragma rs reduce(my_short4_MyStruct_1) accumulator(my_short4_MyStruct_1_accum) combiner(combiner) +static void my_short4_MyStruct_1_accum(int *accum, short4 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_half_0) accumulator(my_uchar_half_0_accum) combiner(combiner) +static void my_uchar_half_0_accum(int *accum, uchar a, half b) { } + +#pragma rs reduce(my_uchar_half_1) accumulator(my_uchar_half_1_accum) combiner(combiner) +static void my_uchar_half_1_accum(int *accum, uchar a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_half2_0) accumulator(my_uchar_half2_0_accum) combiner(combiner) +static void my_uchar_half2_0_accum(int *accum, uchar a, half2 b) { } + +#pragma rs reduce(my_uchar_half2_1) accumulator(my_uchar_half2_1_accum) combiner(combiner) +static void my_uchar_half2_1_accum(int *accum, uchar a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_half4_0) accumulator(my_uchar_half4_0_accum) combiner(combiner) +static void my_uchar_half4_0_accum(int *accum, uchar a, half4 b) { } + +#pragma rs reduce(my_uchar_half4_1) accumulator(my_uchar_half4_1_accum) combiner(combiner) +static void my_uchar_half4_1_accum(int *accum, uchar a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_float_0) accumulator(my_uchar_float_0_accum) combiner(combiner) +static void my_uchar_float_0_accum(int *accum, uchar a, float b) { } + +#pragma rs reduce(my_uchar_float_1) accumulator(my_uchar_float_1_accum) combiner(combiner) +static void my_uchar_float_1_accum(int *accum, uchar a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_float2_0) accumulator(my_uchar_float2_0_accum) combiner(combiner) +static void my_uchar_float2_0_accum(int *accum, uchar a, float2 b) { } + +#pragma rs reduce(my_uchar_float2_1) accumulator(my_uchar_float2_1_accum) combiner(combiner) +static void my_uchar_float2_1_accum(int *accum, uchar a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_float4_0) accumulator(my_uchar_float4_0_accum) combiner(combiner) +static void my_uchar_float4_0_accum(int *accum, uchar a, float4 b) { } + +#pragma rs reduce(my_uchar_float4_1) accumulator(my_uchar_float4_1_accum) combiner(combiner) +static void my_uchar_float4_1_accum(int *accum, uchar a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_char_0) accumulator(my_uchar_char_0_accum) combiner(combiner) +static void my_uchar_char_0_accum(int *accum, uchar a, char b) { } + +#pragma rs reduce(my_uchar_char_1) accumulator(my_uchar_char_1_accum) combiner(combiner) +static void my_uchar_char_1_accum(int *accum, uchar a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_char2_0) accumulator(my_uchar_char2_0_accum) combiner(combiner) +static void my_uchar_char2_0_accum(int *accum, uchar a, char2 b) { } + +#pragma rs reduce(my_uchar_char2_1) accumulator(my_uchar_char2_1_accum) combiner(combiner) +static void my_uchar_char2_1_accum(int *accum, uchar a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_char4_0) accumulator(my_uchar_char4_0_accum) combiner(combiner) +static void my_uchar_char4_0_accum(int *accum, uchar a, char4 b) { } + +#pragma rs reduce(my_uchar_char4_1) accumulator(my_uchar_char4_1_accum) combiner(combiner) +static void my_uchar_char4_1_accum(int *accum, uchar a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_short_0) accumulator(my_uchar_short_0_accum) combiner(combiner) +static void my_uchar_short_0_accum(int *accum, uchar a, short b) { } + +#pragma rs reduce(my_uchar_short_1) accumulator(my_uchar_short_1_accum) combiner(combiner) +static void my_uchar_short_1_accum(int *accum, uchar a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_short2_0) accumulator(my_uchar_short2_0_accum) combiner(combiner) +static void my_uchar_short2_0_accum(int *accum, uchar a, short2 b) { } + +#pragma rs reduce(my_uchar_short2_1) accumulator(my_uchar_short2_1_accum) combiner(combiner) +static void my_uchar_short2_1_accum(int *accum, uchar a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_short4_0) accumulator(my_uchar_short4_0_accum) combiner(combiner) +static void my_uchar_short4_0_accum(int *accum, uchar a, short4 b) { } + +#pragma rs reduce(my_uchar_short4_1) accumulator(my_uchar_short4_1_accum) combiner(combiner) +static void my_uchar_short4_1_accum(int *accum, uchar a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_uchar_0) accumulator(my_uchar_uchar_0_accum) combiner(combiner) +static void my_uchar_uchar_0_accum(int *accum, uchar a, uchar b) { } + +#pragma rs reduce(my_uchar_uchar_1) accumulator(my_uchar_uchar_1_accum) combiner(combiner) +static void my_uchar_uchar_1_accum(int *accum, uchar a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_uchar2_0) accumulator(my_uchar_uchar2_0_accum) combiner(combiner) +static void my_uchar_uchar2_0_accum(int *accum, uchar a, uchar2 b) { } + +#pragma rs reduce(my_uchar_uchar2_1) accumulator(my_uchar_uchar2_1_accum) combiner(combiner) +static void my_uchar_uchar2_1_accum(int *accum, uchar a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_uchar4_0) accumulator(my_uchar_uchar4_0_accum) combiner(combiner) +static void my_uchar_uchar4_0_accum(int *accum, uchar a, uchar4 b) { } + +#pragma rs reduce(my_uchar_uchar4_1) accumulator(my_uchar_uchar4_1_accum) combiner(combiner) +static void my_uchar_uchar4_1_accum(int *accum, uchar a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_ushort_0) accumulator(my_uchar_ushort_0_accum) combiner(combiner) +static void my_uchar_ushort_0_accum(int *accum, uchar a, ushort b) { } + +#pragma rs reduce(my_uchar_ushort_1) accumulator(my_uchar_ushort_1_accum) combiner(combiner) +static void my_uchar_ushort_1_accum(int *accum, uchar a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_ushort2_0) accumulator(my_uchar_ushort2_0_accum) combiner(combiner) +static void my_uchar_ushort2_0_accum(int *accum, uchar a, ushort2 b) { } + +#pragma rs reduce(my_uchar_ushort2_1) accumulator(my_uchar_ushort2_1_accum) combiner(combiner) +static void my_uchar_ushort2_1_accum(int *accum, uchar a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_ushort4_0) accumulator(my_uchar_ushort4_0_accum) combiner(combiner) +static void my_uchar_ushort4_0_accum(int *accum, uchar a, ushort4 b) { } + +#pragma rs reduce(my_uchar_ushort4_1) accumulator(my_uchar_ushort4_1_accum) combiner(combiner) +static void my_uchar_ushort4_1_accum(int *accum, uchar a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_bool_0) accumulator(my_uchar_bool_0_accum) combiner(combiner) +static void my_uchar_bool_0_accum(int *accum, uchar a, bool b) { } + +#pragma rs reduce(my_uchar_bool_1) accumulator(my_uchar_bool_1_accum) combiner(combiner) +static void my_uchar_bool_1_accum(int *accum, uchar a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_rs_matrix2x2_0) accumulator(my_uchar_rs_matrix2x2_0_accum) combiner(combiner) +static void my_uchar_rs_matrix2x2_0_accum(int *accum, uchar a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_uchar_rs_matrix2x2_1) accumulator(my_uchar_rs_matrix2x2_1_accum) combiner(combiner) +static void my_uchar_rs_matrix2x2_1_accum(int *accum, uchar a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar_MyStruct_0) accumulator(my_uchar_MyStruct_0_accum) combiner(combiner) +static void my_uchar_MyStruct_0_accum(int *accum, uchar a, MyStruct b) { } + +#pragma rs reduce(my_uchar_MyStruct_1) accumulator(my_uchar_MyStruct_1_accum) combiner(combiner) +static void my_uchar_MyStruct_1_accum(int *accum, uchar a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_half_0) accumulator(my_uchar2_half_0_accum) combiner(combiner) +static void my_uchar2_half_0_accum(int *accum, uchar2 a, half b) { } + +#pragma rs reduce(my_uchar2_half_1) accumulator(my_uchar2_half_1_accum) combiner(combiner) +static void my_uchar2_half_1_accum(int *accum, uchar2 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_half2_0) accumulator(my_uchar2_half2_0_accum) combiner(combiner) +static void my_uchar2_half2_0_accum(int *accum, uchar2 a, half2 b) { } + +#pragma rs reduce(my_uchar2_half2_1) accumulator(my_uchar2_half2_1_accum) combiner(combiner) +static void my_uchar2_half2_1_accum(int *accum, uchar2 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_half4_0) accumulator(my_uchar2_half4_0_accum) combiner(combiner) +static void my_uchar2_half4_0_accum(int *accum, uchar2 a, half4 b) { } + +#pragma rs reduce(my_uchar2_half4_1) accumulator(my_uchar2_half4_1_accum) combiner(combiner) +static void my_uchar2_half4_1_accum(int *accum, uchar2 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_float_0) accumulator(my_uchar2_float_0_accum) combiner(combiner) +static void my_uchar2_float_0_accum(int *accum, uchar2 a, float b) { } + +#pragma rs reduce(my_uchar2_float_1) accumulator(my_uchar2_float_1_accum) combiner(combiner) +static void my_uchar2_float_1_accum(int *accum, uchar2 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_float2_0) accumulator(my_uchar2_float2_0_accum) combiner(combiner) +static void my_uchar2_float2_0_accum(int *accum, uchar2 a, float2 b) { } + +#pragma rs reduce(my_uchar2_float2_1) accumulator(my_uchar2_float2_1_accum) combiner(combiner) +static void my_uchar2_float2_1_accum(int *accum, uchar2 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_float4_0) accumulator(my_uchar2_float4_0_accum) combiner(combiner) +static void my_uchar2_float4_0_accum(int *accum, uchar2 a, float4 b) { } + +#pragma rs reduce(my_uchar2_float4_1) accumulator(my_uchar2_float4_1_accum) combiner(combiner) +static void my_uchar2_float4_1_accum(int *accum, uchar2 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_char_0) accumulator(my_uchar2_char_0_accum) combiner(combiner) +static void my_uchar2_char_0_accum(int *accum, uchar2 a, char b) { } + +#pragma rs reduce(my_uchar2_char_1) accumulator(my_uchar2_char_1_accum) combiner(combiner) +static void my_uchar2_char_1_accum(int *accum, uchar2 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_char2_0) accumulator(my_uchar2_char2_0_accum) combiner(combiner) +static void my_uchar2_char2_0_accum(int *accum, uchar2 a, char2 b) { } + +#pragma rs reduce(my_uchar2_char2_1) accumulator(my_uchar2_char2_1_accum) combiner(combiner) +static void my_uchar2_char2_1_accum(int *accum, uchar2 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_char4_0) accumulator(my_uchar2_char4_0_accum) combiner(combiner) +static void my_uchar2_char4_0_accum(int *accum, uchar2 a, char4 b) { } + +#pragma rs reduce(my_uchar2_char4_1) accumulator(my_uchar2_char4_1_accum) combiner(combiner) +static void my_uchar2_char4_1_accum(int *accum, uchar2 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_short_0) accumulator(my_uchar2_short_0_accum) combiner(combiner) +static void my_uchar2_short_0_accum(int *accum, uchar2 a, short b) { } + +#pragma rs reduce(my_uchar2_short_1) accumulator(my_uchar2_short_1_accum) combiner(combiner) +static void my_uchar2_short_1_accum(int *accum, uchar2 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_short2_0) accumulator(my_uchar2_short2_0_accum) combiner(combiner) +static void my_uchar2_short2_0_accum(int *accum, uchar2 a, short2 b) { } + +#pragma rs reduce(my_uchar2_short2_1) accumulator(my_uchar2_short2_1_accum) combiner(combiner) +static void my_uchar2_short2_1_accum(int *accum, uchar2 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_short4_0) accumulator(my_uchar2_short4_0_accum) combiner(combiner) +static void my_uchar2_short4_0_accum(int *accum, uchar2 a, short4 b) { } + +#pragma rs reduce(my_uchar2_short4_1) accumulator(my_uchar2_short4_1_accum) combiner(combiner) +static void my_uchar2_short4_1_accum(int *accum, uchar2 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_uchar_0) accumulator(my_uchar2_uchar_0_accum) combiner(combiner) +static void my_uchar2_uchar_0_accum(int *accum, uchar2 a, uchar b) { } + +#pragma rs reduce(my_uchar2_uchar_1) accumulator(my_uchar2_uchar_1_accum) combiner(combiner) +static void my_uchar2_uchar_1_accum(int *accum, uchar2 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_uchar2_0) accumulator(my_uchar2_uchar2_0_accum) combiner(combiner) +static void my_uchar2_uchar2_0_accum(int *accum, uchar2 a, uchar2 b) { } + +#pragma rs reduce(my_uchar2_uchar2_1) accumulator(my_uchar2_uchar2_1_accum) combiner(combiner) +static void my_uchar2_uchar2_1_accum(int *accum, uchar2 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_uchar4_0) accumulator(my_uchar2_uchar4_0_accum) combiner(combiner) +static void my_uchar2_uchar4_0_accum(int *accum, uchar2 a, uchar4 b) { } + +#pragma rs reduce(my_uchar2_uchar4_1) accumulator(my_uchar2_uchar4_1_accum) combiner(combiner) +static void my_uchar2_uchar4_1_accum(int *accum, uchar2 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_ushort_0) accumulator(my_uchar2_ushort_0_accum) combiner(combiner) +static void my_uchar2_ushort_0_accum(int *accum, uchar2 a, ushort b) { } + +#pragma rs reduce(my_uchar2_ushort_1) accumulator(my_uchar2_ushort_1_accum) combiner(combiner) +static void my_uchar2_ushort_1_accum(int *accum, uchar2 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_ushort2_0) accumulator(my_uchar2_ushort2_0_accum) combiner(combiner) +static void my_uchar2_ushort2_0_accum(int *accum, uchar2 a, ushort2 b) { } + +#pragma rs reduce(my_uchar2_ushort2_1) accumulator(my_uchar2_ushort2_1_accum) combiner(combiner) +static void my_uchar2_ushort2_1_accum(int *accum, uchar2 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_ushort4_0) accumulator(my_uchar2_ushort4_0_accum) combiner(combiner) +static void my_uchar2_ushort4_0_accum(int *accum, uchar2 a, ushort4 b) { } + +#pragma rs reduce(my_uchar2_ushort4_1) accumulator(my_uchar2_ushort4_1_accum) combiner(combiner) +static void my_uchar2_ushort4_1_accum(int *accum, uchar2 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_bool_0) accumulator(my_uchar2_bool_0_accum) combiner(combiner) +static void my_uchar2_bool_0_accum(int *accum, uchar2 a, bool b) { } + +#pragma rs reduce(my_uchar2_bool_1) accumulator(my_uchar2_bool_1_accum) combiner(combiner) +static void my_uchar2_bool_1_accum(int *accum, uchar2 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_rs_matrix2x2_0) accumulator(my_uchar2_rs_matrix2x2_0_accum) combiner(combiner) +static void my_uchar2_rs_matrix2x2_0_accum(int *accum, uchar2 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_uchar2_rs_matrix2x2_1) accumulator(my_uchar2_rs_matrix2x2_1_accum) combiner(combiner) +static void my_uchar2_rs_matrix2x2_1_accum(int *accum, uchar2 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar2_MyStruct_0) accumulator(my_uchar2_MyStruct_0_accum) combiner(combiner) +static void my_uchar2_MyStruct_0_accum(int *accum, uchar2 a, MyStruct b) { } + +#pragma rs reduce(my_uchar2_MyStruct_1) accumulator(my_uchar2_MyStruct_1_accum) combiner(combiner) +static void my_uchar2_MyStruct_1_accum(int *accum, uchar2 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_half_0) accumulator(my_uchar4_half_0_accum) combiner(combiner) +static void my_uchar4_half_0_accum(int *accum, uchar4 a, half b) { } + +#pragma rs reduce(my_uchar4_half_1) accumulator(my_uchar4_half_1_accum) combiner(combiner) +static void my_uchar4_half_1_accum(int *accum, uchar4 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_half2_0) accumulator(my_uchar4_half2_0_accum) combiner(combiner) +static void my_uchar4_half2_0_accum(int *accum, uchar4 a, half2 b) { } + +#pragma rs reduce(my_uchar4_half2_1) accumulator(my_uchar4_half2_1_accum) combiner(combiner) +static void my_uchar4_half2_1_accum(int *accum, uchar4 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_half4_0) accumulator(my_uchar4_half4_0_accum) combiner(combiner) +static void my_uchar4_half4_0_accum(int *accum, uchar4 a, half4 b) { } + +#pragma rs reduce(my_uchar4_half4_1) accumulator(my_uchar4_half4_1_accum) combiner(combiner) +static void my_uchar4_half4_1_accum(int *accum, uchar4 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_float_0) accumulator(my_uchar4_float_0_accum) combiner(combiner) +static void my_uchar4_float_0_accum(int *accum, uchar4 a, float b) { } + +#pragma rs reduce(my_uchar4_float_1) accumulator(my_uchar4_float_1_accum) combiner(combiner) +static void my_uchar4_float_1_accum(int *accum, uchar4 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_float2_0) accumulator(my_uchar4_float2_0_accum) combiner(combiner) +static void my_uchar4_float2_0_accum(int *accum, uchar4 a, float2 b) { } + +#pragma rs reduce(my_uchar4_float2_1) accumulator(my_uchar4_float2_1_accum) combiner(combiner) +static void my_uchar4_float2_1_accum(int *accum, uchar4 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_float4_0) accumulator(my_uchar4_float4_0_accum) combiner(combiner) +static void my_uchar4_float4_0_accum(int *accum, uchar4 a, float4 b) { } + +#pragma rs reduce(my_uchar4_float4_1) accumulator(my_uchar4_float4_1_accum) combiner(combiner) +static void my_uchar4_float4_1_accum(int *accum, uchar4 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_char_0) accumulator(my_uchar4_char_0_accum) combiner(combiner) +static void my_uchar4_char_0_accum(int *accum, uchar4 a, char b) { } + +#pragma rs reduce(my_uchar4_char_1) accumulator(my_uchar4_char_1_accum) combiner(combiner) +static void my_uchar4_char_1_accum(int *accum, uchar4 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_char2_0) accumulator(my_uchar4_char2_0_accum) combiner(combiner) +static void my_uchar4_char2_0_accum(int *accum, uchar4 a, char2 b) { } + +#pragma rs reduce(my_uchar4_char2_1) accumulator(my_uchar4_char2_1_accum) combiner(combiner) +static void my_uchar4_char2_1_accum(int *accum, uchar4 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_char4_0) accumulator(my_uchar4_char4_0_accum) combiner(combiner) +static void my_uchar4_char4_0_accum(int *accum, uchar4 a, char4 b) { } + +#pragma rs reduce(my_uchar4_char4_1) accumulator(my_uchar4_char4_1_accum) combiner(combiner) +static void my_uchar4_char4_1_accum(int *accum, uchar4 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_short_0) accumulator(my_uchar4_short_0_accum) combiner(combiner) +static void my_uchar4_short_0_accum(int *accum, uchar4 a, short b) { } + +#pragma rs reduce(my_uchar4_short_1) accumulator(my_uchar4_short_1_accum) combiner(combiner) +static void my_uchar4_short_1_accum(int *accum, uchar4 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_short2_0) accumulator(my_uchar4_short2_0_accum) combiner(combiner) +static void my_uchar4_short2_0_accum(int *accum, uchar4 a, short2 b) { } + +#pragma rs reduce(my_uchar4_short2_1) accumulator(my_uchar4_short2_1_accum) combiner(combiner) +static void my_uchar4_short2_1_accum(int *accum, uchar4 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_short4_0) accumulator(my_uchar4_short4_0_accum) combiner(combiner) +static void my_uchar4_short4_0_accum(int *accum, uchar4 a, short4 b) { } + +#pragma rs reduce(my_uchar4_short4_1) accumulator(my_uchar4_short4_1_accum) combiner(combiner) +static void my_uchar4_short4_1_accum(int *accum, uchar4 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_uchar_0) accumulator(my_uchar4_uchar_0_accum) combiner(combiner) +static void my_uchar4_uchar_0_accum(int *accum, uchar4 a, uchar b) { } + +#pragma rs reduce(my_uchar4_uchar_1) accumulator(my_uchar4_uchar_1_accum) combiner(combiner) +static void my_uchar4_uchar_1_accum(int *accum, uchar4 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_uchar2_0) accumulator(my_uchar4_uchar2_0_accum) combiner(combiner) +static void my_uchar4_uchar2_0_accum(int *accum, uchar4 a, uchar2 b) { } + +#pragma rs reduce(my_uchar4_uchar2_1) accumulator(my_uchar4_uchar2_1_accum) combiner(combiner) +static void my_uchar4_uchar2_1_accum(int *accum, uchar4 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_uchar4_0) accumulator(my_uchar4_uchar4_0_accum) combiner(combiner) +static void my_uchar4_uchar4_0_accum(int *accum, uchar4 a, uchar4 b) { } + +#pragma rs reduce(my_uchar4_uchar4_1) accumulator(my_uchar4_uchar4_1_accum) combiner(combiner) +static void my_uchar4_uchar4_1_accum(int *accum, uchar4 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_ushort_0) accumulator(my_uchar4_ushort_0_accum) combiner(combiner) +static void my_uchar4_ushort_0_accum(int *accum, uchar4 a, ushort b) { } + +#pragma rs reduce(my_uchar4_ushort_1) accumulator(my_uchar4_ushort_1_accum) combiner(combiner) +static void my_uchar4_ushort_1_accum(int *accum, uchar4 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_ushort2_0) accumulator(my_uchar4_ushort2_0_accum) combiner(combiner) +static void my_uchar4_ushort2_0_accum(int *accum, uchar4 a, ushort2 b) { } + +#pragma rs reduce(my_uchar4_ushort2_1) accumulator(my_uchar4_ushort2_1_accum) combiner(combiner) +static void my_uchar4_ushort2_1_accum(int *accum, uchar4 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_ushort4_0) accumulator(my_uchar4_ushort4_0_accum) combiner(combiner) +static void my_uchar4_ushort4_0_accum(int *accum, uchar4 a, ushort4 b) { } + +#pragma rs reduce(my_uchar4_ushort4_1) accumulator(my_uchar4_ushort4_1_accum) combiner(combiner) +static void my_uchar4_ushort4_1_accum(int *accum, uchar4 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_bool_0) accumulator(my_uchar4_bool_0_accum) combiner(combiner) +static void my_uchar4_bool_0_accum(int *accum, uchar4 a, bool b) { } + +#pragma rs reduce(my_uchar4_bool_1) accumulator(my_uchar4_bool_1_accum) combiner(combiner) +static void my_uchar4_bool_1_accum(int *accum, uchar4 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_rs_matrix2x2_0) accumulator(my_uchar4_rs_matrix2x2_0_accum) combiner(combiner) +static void my_uchar4_rs_matrix2x2_0_accum(int *accum, uchar4 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_uchar4_rs_matrix2x2_1) accumulator(my_uchar4_rs_matrix2x2_1_accum) combiner(combiner) +static void my_uchar4_rs_matrix2x2_1_accum(int *accum, uchar4 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_uchar4_MyStruct_0) accumulator(my_uchar4_MyStruct_0_accum) combiner(combiner) +static void my_uchar4_MyStruct_0_accum(int *accum, uchar4 a, MyStruct b) { } + +#pragma rs reduce(my_uchar4_MyStruct_1) accumulator(my_uchar4_MyStruct_1_accum) combiner(combiner) +static void my_uchar4_MyStruct_1_accum(int *accum, uchar4 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_half_0) accumulator(my_ushort_half_0_accum) combiner(combiner) +static void my_ushort_half_0_accum(int *accum, ushort a, half b) { } + +#pragma rs reduce(my_ushort_half_1) accumulator(my_ushort_half_1_accum) combiner(combiner) +static void my_ushort_half_1_accum(int *accum, ushort a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_half2_0) accumulator(my_ushort_half2_0_accum) combiner(combiner) +static void my_ushort_half2_0_accum(int *accum, ushort a, half2 b) { } + +#pragma rs reduce(my_ushort_half2_1) accumulator(my_ushort_half2_1_accum) combiner(combiner) +static void my_ushort_half2_1_accum(int *accum, ushort a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_half4_0) accumulator(my_ushort_half4_0_accum) combiner(combiner) +static void my_ushort_half4_0_accum(int *accum, ushort a, half4 b) { } + +#pragma rs reduce(my_ushort_half4_1) accumulator(my_ushort_half4_1_accum) combiner(combiner) +static void my_ushort_half4_1_accum(int *accum, ushort a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_float_0) accumulator(my_ushort_float_0_accum) combiner(combiner) +static void my_ushort_float_0_accum(int *accum, ushort a, float b) { } + +#pragma rs reduce(my_ushort_float_1) accumulator(my_ushort_float_1_accum) combiner(combiner) +static void my_ushort_float_1_accum(int *accum, ushort a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_float2_0) accumulator(my_ushort_float2_0_accum) combiner(combiner) +static void my_ushort_float2_0_accum(int *accum, ushort a, float2 b) { } + +#pragma rs reduce(my_ushort_float2_1) accumulator(my_ushort_float2_1_accum) combiner(combiner) +static void my_ushort_float2_1_accum(int *accum, ushort a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_float4_0) accumulator(my_ushort_float4_0_accum) combiner(combiner) +static void my_ushort_float4_0_accum(int *accum, ushort a, float4 b) { } + +#pragma rs reduce(my_ushort_float4_1) accumulator(my_ushort_float4_1_accum) combiner(combiner) +static void my_ushort_float4_1_accum(int *accum, ushort a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_char_0) accumulator(my_ushort_char_0_accum) combiner(combiner) +static void my_ushort_char_0_accum(int *accum, ushort a, char b) { } + +#pragma rs reduce(my_ushort_char_1) accumulator(my_ushort_char_1_accum) combiner(combiner) +static void my_ushort_char_1_accum(int *accum, ushort a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_char2_0) accumulator(my_ushort_char2_0_accum) combiner(combiner) +static void my_ushort_char2_0_accum(int *accum, ushort a, char2 b) { } + +#pragma rs reduce(my_ushort_char2_1) accumulator(my_ushort_char2_1_accum) combiner(combiner) +static void my_ushort_char2_1_accum(int *accum, ushort a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_char4_0) accumulator(my_ushort_char4_0_accum) combiner(combiner) +static void my_ushort_char4_0_accum(int *accum, ushort a, char4 b) { } + +#pragma rs reduce(my_ushort_char4_1) accumulator(my_ushort_char4_1_accum) combiner(combiner) +static void my_ushort_char4_1_accum(int *accum, ushort a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_short_0) accumulator(my_ushort_short_0_accum) combiner(combiner) +static void my_ushort_short_0_accum(int *accum, ushort a, short b) { } + +#pragma rs reduce(my_ushort_short_1) accumulator(my_ushort_short_1_accum) combiner(combiner) +static void my_ushort_short_1_accum(int *accum, ushort a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_short2_0) accumulator(my_ushort_short2_0_accum) combiner(combiner) +static void my_ushort_short2_0_accum(int *accum, ushort a, short2 b) { } + +#pragma rs reduce(my_ushort_short2_1) accumulator(my_ushort_short2_1_accum) combiner(combiner) +static void my_ushort_short2_1_accum(int *accum, ushort a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_short4_0) accumulator(my_ushort_short4_0_accum) combiner(combiner) +static void my_ushort_short4_0_accum(int *accum, ushort a, short4 b) { } + +#pragma rs reduce(my_ushort_short4_1) accumulator(my_ushort_short4_1_accum) combiner(combiner) +static void my_ushort_short4_1_accum(int *accum, ushort a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_uchar_0) accumulator(my_ushort_uchar_0_accum) combiner(combiner) +static void my_ushort_uchar_0_accum(int *accum, ushort a, uchar b) { } + +#pragma rs reduce(my_ushort_uchar_1) accumulator(my_ushort_uchar_1_accum) combiner(combiner) +static void my_ushort_uchar_1_accum(int *accum, ushort a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_uchar2_0) accumulator(my_ushort_uchar2_0_accum) combiner(combiner) +static void my_ushort_uchar2_0_accum(int *accum, ushort a, uchar2 b) { } + +#pragma rs reduce(my_ushort_uchar2_1) accumulator(my_ushort_uchar2_1_accum) combiner(combiner) +static void my_ushort_uchar2_1_accum(int *accum, ushort a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_uchar4_0) accumulator(my_ushort_uchar4_0_accum) combiner(combiner) +static void my_ushort_uchar4_0_accum(int *accum, ushort a, uchar4 b) { } + +#pragma rs reduce(my_ushort_uchar4_1) accumulator(my_ushort_uchar4_1_accum) combiner(combiner) +static void my_ushort_uchar4_1_accum(int *accum, ushort a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_ushort_0) accumulator(my_ushort_ushort_0_accum) combiner(combiner) +static void my_ushort_ushort_0_accum(int *accum, ushort a, ushort b) { } + +#pragma rs reduce(my_ushort_ushort_1) accumulator(my_ushort_ushort_1_accum) combiner(combiner) +static void my_ushort_ushort_1_accum(int *accum, ushort a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_ushort2_0) accumulator(my_ushort_ushort2_0_accum) combiner(combiner) +static void my_ushort_ushort2_0_accum(int *accum, ushort a, ushort2 b) { } + +#pragma rs reduce(my_ushort_ushort2_1) accumulator(my_ushort_ushort2_1_accum) combiner(combiner) +static void my_ushort_ushort2_1_accum(int *accum, ushort a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_ushort4_0) accumulator(my_ushort_ushort4_0_accum) combiner(combiner) +static void my_ushort_ushort4_0_accum(int *accum, ushort a, ushort4 b) { } + +#pragma rs reduce(my_ushort_ushort4_1) accumulator(my_ushort_ushort4_1_accum) combiner(combiner) +static void my_ushort_ushort4_1_accum(int *accum, ushort a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_bool_0) accumulator(my_ushort_bool_0_accum) combiner(combiner) +static void my_ushort_bool_0_accum(int *accum, ushort a, bool b) { } + +#pragma rs reduce(my_ushort_bool_1) accumulator(my_ushort_bool_1_accum) combiner(combiner) +static void my_ushort_bool_1_accum(int *accum, ushort a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_rs_matrix2x2_0) accumulator(my_ushort_rs_matrix2x2_0_accum) combiner(combiner) +static void my_ushort_rs_matrix2x2_0_accum(int *accum, ushort a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_ushort_rs_matrix2x2_1) accumulator(my_ushort_rs_matrix2x2_1_accum) combiner(combiner) +static void my_ushort_rs_matrix2x2_1_accum(int *accum, ushort a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort_MyStruct_0) accumulator(my_ushort_MyStruct_0_accum) combiner(combiner) +static void my_ushort_MyStruct_0_accum(int *accum, ushort a, MyStruct b) { } + +#pragma rs reduce(my_ushort_MyStruct_1) accumulator(my_ushort_MyStruct_1_accum) combiner(combiner) +static void my_ushort_MyStruct_1_accum(int *accum, ushort a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_half_0) accumulator(my_ushort2_half_0_accum) combiner(combiner) +static void my_ushort2_half_0_accum(int *accum, ushort2 a, half b) { } + +#pragma rs reduce(my_ushort2_half_1) accumulator(my_ushort2_half_1_accum) combiner(combiner) +static void my_ushort2_half_1_accum(int *accum, ushort2 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_half2_0) accumulator(my_ushort2_half2_0_accum) combiner(combiner) +static void my_ushort2_half2_0_accum(int *accum, ushort2 a, half2 b) { } + +#pragma rs reduce(my_ushort2_half2_1) accumulator(my_ushort2_half2_1_accum) combiner(combiner) +static void my_ushort2_half2_1_accum(int *accum, ushort2 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_half4_0) accumulator(my_ushort2_half4_0_accum) combiner(combiner) +static void my_ushort2_half4_0_accum(int *accum, ushort2 a, half4 b) { } + +#pragma rs reduce(my_ushort2_half4_1) accumulator(my_ushort2_half4_1_accum) combiner(combiner) +static void my_ushort2_half4_1_accum(int *accum, ushort2 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_float_0) accumulator(my_ushort2_float_0_accum) combiner(combiner) +static void my_ushort2_float_0_accum(int *accum, ushort2 a, float b) { } + +#pragma rs reduce(my_ushort2_float_1) accumulator(my_ushort2_float_1_accum) combiner(combiner) +static void my_ushort2_float_1_accum(int *accum, ushort2 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_float2_0) accumulator(my_ushort2_float2_0_accum) combiner(combiner) +static void my_ushort2_float2_0_accum(int *accum, ushort2 a, float2 b) { } + +#pragma rs reduce(my_ushort2_float2_1) accumulator(my_ushort2_float2_1_accum) combiner(combiner) +static void my_ushort2_float2_1_accum(int *accum, ushort2 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_float4_0) accumulator(my_ushort2_float4_0_accum) combiner(combiner) +static void my_ushort2_float4_0_accum(int *accum, ushort2 a, float4 b) { } + +#pragma rs reduce(my_ushort2_float4_1) accumulator(my_ushort2_float4_1_accum) combiner(combiner) +static void my_ushort2_float4_1_accum(int *accum, ushort2 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_char_0) accumulator(my_ushort2_char_0_accum) combiner(combiner) +static void my_ushort2_char_0_accum(int *accum, ushort2 a, char b) { } + +#pragma rs reduce(my_ushort2_char_1) accumulator(my_ushort2_char_1_accum) combiner(combiner) +static void my_ushort2_char_1_accum(int *accum, ushort2 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_char2_0) accumulator(my_ushort2_char2_0_accum) combiner(combiner) +static void my_ushort2_char2_0_accum(int *accum, ushort2 a, char2 b) { } + +#pragma rs reduce(my_ushort2_char2_1) accumulator(my_ushort2_char2_1_accum) combiner(combiner) +static void my_ushort2_char2_1_accum(int *accum, ushort2 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_char4_0) accumulator(my_ushort2_char4_0_accum) combiner(combiner) +static void my_ushort2_char4_0_accum(int *accum, ushort2 a, char4 b) { } + +#pragma rs reduce(my_ushort2_char4_1) accumulator(my_ushort2_char4_1_accum) combiner(combiner) +static void my_ushort2_char4_1_accum(int *accum, ushort2 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_short_0) accumulator(my_ushort2_short_0_accum) combiner(combiner) +static void my_ushort2_short_0_accum(int *accum, ushort2 a, short b) { } + +#pragma rs reduce(my_ushort2_short_1) accumulator(my_ushort2_short_1_accum) combiner(combiner) +static void my_ushort2_short_1_accum(int *accum, ushort2 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_short2_0) accumulator(my_ushort2_short2_0_accum) combiner(combiner) +static void my_ushort2_short2_0_accum(int *accum, ushort2 a, short2 b) { } + +#pragma rs reduce(my_ushort2_short2_1) accumulator(my_ushort2_short2_1_accum) combiner(combiner) +static void my_ushort2_short2_1_accum(int *accum, ushort2 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_short4_0) accumulator(my_ushort2_short4_0_accum) combiner(combiner) +static void my_ushort2_short4_0_accum(int *accum, ushort2 a, short4 b) { } + +#pragma rs reduce(my_ushort2_short4_1) accumulator(my_ushort2_short4_1_accum) combiner(combiner) +static void my_ushort2_short4_1_accum(int *accum, ushort2 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_uchar_0) accumulator(my_ushort2_uchar_0_accum) combiner(combiner) +static void my_ushort2_uchar_0_accum(int *accum, ushort2 a, uchar b) { } + +#pragma rs reduce(my_ushort2_uchar_1) accumulator(my_ushort2_uchar_1_accum) combiner(combiner) +static void my_ushort2_uchar_1_accum(int *accum, ushort2 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_uchar2_0) accumulator(my_ushort2_uchar2_0_accum) combiner(combiner) +static void my_ushort2_uchar2_0_accum(int *accum, ushort2 a, uchar2 b) { } + +#pragma rs reduce(my_ushort2_uchar2_1) accumulator(my_ushort2_uchar2_1_accum) combiner(combiner) +static void my_ushort2_uchar2_1_accum(int *accum, ushort2 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_uchar4_0) accumulator(my_ushort2_uchar4_0_accum) combiner(combiner) +static void my_ushort2_uchar4_0_accum(int *accum, ushort2 a, uchar4 b) { } + +#pragma rs reduce(my_ushort2_uchar4_1) accumulator(my_ushort2_uchar4_1_accum) combiner(combiner) +static void my_ushort2_uchar4_1_accum(int *accum, ushort2 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_ushort_0) accumulator(my_ushort2_ushort_0_accum) combiner(combiner) +static void my_ushort2_ushort_0_accum(int *accum, ushort2 a, ushort b) { } + +#pragma rs reduce(my_ushort2_ushort_1) accumulator(my_ushort2_ushort_1_accum) combiner(combiner) +static void my_ushort2_ushort_1_accum(int *accum, ushort2 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_ushort2_0) accumulator(my_ushort2_ushort2_0_accum) combiner(combiner) +static void my_ushort2_ushort2_0_accum(int *accum, ushort2 a, ushort2 b) { } + +#pragma rs reduce(my_ushort2_ushort2_1) accumulator(my_ushort2_ushort2_1_accum) combiner(combiner) +static void my_ushort2_ushort2_1_accum(int *accum, ushort2 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_ushort4_0) accumulator(my_ushort2_ushort4_0_accum) combiner(combiner) +static void my_ushort2_ushort4_0_accum(int *accum, ushort2 a, ushort4 b) { } + +#pragma rs reduce(my_ushort2_ushort4_1) accumulator(my_ushort2_ushort4_1_accum) combiner(combiner) +static void my_ushort2_ushort4_1_accum(int *accum, ushort2 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_bool_0) accumulator(my_ushort2_bool_0_accum) combiner(combiner) +static void my_ushort2_bool_0_accum(int *accum, ushort2 a, bool b) { } + +#pragma rs reduce(my_ushort2_bool_1) accumulator(my_ushort2_bool_1_accum) combiner(combiner) +static void my_ushort2_bool_1_accum(int *accum, ushort2 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_rs_matrix2x2_0) accumulator(my_ushort2_rs_matrix2x2_0_accum) combiner(combiner) +static void my_ushort2_rs_matrix2x2_0_accum(int *accum, ushort2 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_ushort2_rs_matrix2x2_1) accumulator(my_ushort2_rs_matrix2x2_1_accum) combiner(combiner) +static void my_ushort2_rs_matrix2x2_1_accum(int *accum, ushort2 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort2_MyStruct_0) accumulator(my_ushort2_MyStruct_0_accum) combiner(combiner) +static void my_ushort2_MyStruct_0_accum(int *accum, ushort2 a, MyStruct b) { } + +#pragma rs reduce(my_ushort2_MyStruct_1) accumulator(my_ushort2_MyStruct_1_accum) combiner(combiner) +static void my_ushort2_MyStruct_1_accum(int *accum, ushort2 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_half_0) accumulator(my_ushort4_half_0_accum) combiner(combiner) +static void my_ushort4_half_0_accum(int *accum, ushort4 a, half b) { } + +#pragma rs reduce(my_ushort4_half_1) accumulator(my_ushort4_half_1_accum) combiner(combiner) +static void my_ushort4_half_1_accum(int *accum, ushort4 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_half2_0) accumulator(my_ushort4_half2_0_accum) combiner(combiner) +static void my_ushort4_half2_0_accum(int *accum, ushort4 a, half2 b) { } + +#pragma rs reduce(my_ushort4_half2_1) accumulator(my_ushort4_half2_1_accum) combiner(combiner) +static void my_ushort4_half2_1_accum(int *accum, ushort4 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_half4_0) accumulator(my_ushort4_half4_0_accum) combiner(combiner) +static void my_ushort4_half4_0_accum(int *accum, ushort4 a, half4 b) { } + +#pragma rs reduce(my_ushort4_half4_1) accumulator(my_ushort4_half4_1_accum) combiner(combiner) +static void my_ushort4_half4_1_accum(int *accum, ushort4 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_float_0) accumulator(my_ushort4_float_0_accum) combiner(combiner) +static void my_ushort4_float_0_accum(int *accum, ushort4 a, float b) { } + +#pragma rs reduce(my_ushort4_float_1) accumulator(my_ushort4_float_1_accum) combiner(combiner) +static void my_ushort4_float_1_accum(int *accum, ushort4 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_float2_0) accumulator(my_ushort4_float2_0_accum) combiner(combiner) +static void my_ushort4_float2_0_accum(int *accum, ushort4 a, float2 b) { } + +#pragma rs reduce(my_ushort4_float2_1) accumulator(my_ushort4_float2_1_accum) combiner(combiner) +static void my_ushort4_float2_1_accum(int *accum, ushort4 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_float4_0) accumulator(my_ushort4_float4_0_accum) combiner(combiner) +static void my_ushort4_float4_0_accum(int *accum, ushort4 a, float4 b) { } + +#pragma rs reduce(my_ushort4_float4_1) accumulator(my_ushort4_float4_1_accum) combiner(combiner) +static void my_ushort4_float4_1_accum(int *accum, ushort4 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_char_0) accumulator(my_ushort4_char_0_accum) combiner(combiner) +static void my_ushort4_char_0_accum(int *accum, ushort4 a, char b) { } + +#pragma rs reduce(my_ushort4_char_1) accumulator(my_ushort4_char_1_accum) combiner(combiner) +static void my_ushort4_char_1_accum(int *accum, ushort4 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_char2_0) accumulator(my_ushort4_char2_0_accum) combiner(combiner) +static void my_ushort4_char2_0_accum(int *accum, ushort4 a, char2 b) { } + +#pragma rs reduce(my_ushort4_char2_1) accumulator(my_ushort4_char2_1_accum) combiner(combiner) +static void my_ushort4_char2_1_accum(int *accum, ushort4 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_char4_0) accumulator(my_ushort4_char4_0_accum) combiner(combiner) +static void my_ushort4_char4_0_accum(int *accum, ushort4 a, char4 b) { } + +#pragma rs reduce(my_ushort4_char4_1) accumulator(my_ushort4_char4_1_accum) combiner(combiner) +static void my_ushort4_char4_1_accum(int *accum, ushort4 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_short_0) accumulator(my_ushort4_short_0_accum) combiner(combiner) +static void my_ushort4_short_0_accum(int *accum, ushort4 a, short b) { } + +#pragma rs reduce(my_ushort4_short_1) accumulator(my_ushort4_short_1_accum) combiner(combiner) +static void my_ushort4_short_1_accum(int *accum, ushort4 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_short2_0) accumulator(my_ushort4_short2_0_accum) combiner(combiner) +static void my_ushort4_short2_0_accum(int *accum, ushort4 a, short2 b) { } + +#pragma rs reduce(my_ushort4_short2_1) accumulator(my_ushort4_short2_1_accum) combiner(combiner) +static void my_ushort4_short2_1_accum(int *accum, ushort4 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_short4_0) accumulator(my_ushort4_short4_0_accum) combiner(combiner) +static void my_ushort4_short4_0_accum(int *accum, ushort4 a, short4 b) { } + +#pragma rs reduce(my_ushort4_short4_1) accumulator(my_ushort4_short4_1_accum) combiner(combiner) +static void my_ushort4_short4_1_accum(int *accum, ushort4 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_uchar_0) accumulator(my_ushort4_uchar_0_accum) combiner(combiner) +static void my_ushort4_uchar_0_accum(int *accum, ushort4 a, uchar b) { } + +#pragma rs reduce(my_ushort4_uchar_1) accumulator(my_ushort4_uchar_1_accum) combiner(combiner) +static void my_ushort4_uchar_1_accum(int *accum, ushort4 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_uchar2_0) accumulator(my_ushort4_uchar2_0_accum) combiner(combiner) +static void my_ushort4_uchar2_0_accum(int *accum, ushort4 a, uchar2 b) { } + +#pragma rs reduce(my_ushort4_uchar2_1) accumulator(my_ushort4_uchar2_1_accum) combiner(combiner) +static void my_ushort4_uchar2_1_accum(int *accum, ushort4 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_uchar4_0) accumulator(my_ushort4_uchar4_0_accum) combiner(combiner) +static void my_ushort4_uchar4_0_accum(int *accum, ushort4 a, uchar4 b) { } + +#pragma rs reduce(my_ushort4_uchar4_1) accumulator(my_ushort4_uchar4_1_accum) combiner(combiner) +static void my_ushort4_uchar4_1_accum(int *accum, ushort4 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_ushort_0) accumulator(my_ushort4_ushort_0_accum) combiner(combiner) +static void my_ushort4_ushort_0_accum(int *accum, ushort4 a, ushort b) { } + +#pragma rs reduce(my_ushort4_ushort_1) accumulator(my_ushort4_ushort_1_accum) combiner(combiner) +static void my_ushort4_ushort_1_accum(int *accum, ushort4 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_ushort2_0) accumulator(my_ushort4_ushort2_0_accum) combiner(combiner) +static void my_ushort4_ushort2_0_accum(int *accum, ushort4 a, ushort2 b) { } + +#pragma rs reduce(my_ushort4_ushort2_1) accumulator(my_ushort4_ushort2_1_accum) combiner(combiner) +static void my_ushort4_ushort2_1_accum(int *accum, ushort4 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_ushort4_0) accumulator(my_ushort4_ushort4_0_accum) combiner(combiner) +static void my_ushort4_ushort4_0_accum(int *accum, ushort4 a, ushort4 b) { } + +#pragma rs reduce(my_ushort4_ushort4_1) accumulator(my_ushort4_ushort4_1_accum) combiner(combiner) +static void my_ushort4_ushort4_1_accum(int *accum, ushort4 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_bool_0) accumulator(my_ushort4_bool_0_accum) combiner(combiner) +static void my_ushort4_bool_0_accum(int *accum, ushort4 a, bool b) { } + +#pragma rs reduce(my_ushort4_bool_1) accumulator(my_ushort4_bool_1_accum) combiner(combiner) +static void my_ushort4_bool_1_accum(int *accum, ushort4 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_rs_matrix2x2_0) accumulator(my_ushort4_rs_matrix2x2_0_accum) combiner(combiner) +static void my_ushort4_rs_matrix2x2_0_accum(int *accum, ushort4 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_ushort4_rs_matrix2x2_1) accumulator(my_ushort4_rs_matrix2x2_1_accum) combiner(combiner) +static void my_ushort4_rs_matrix2x2_1_accum(int *accum, ushort4 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_ushort4_MyStruct_0) accumulator(my_ushort4_MyStruct_0_accum) combiner(combiner) +static void my_ushort4_MyStruct_0_accum(int *accum, ushort4 a, MyStruct b) { } + +#pragma rs reduce(my_ushort4_MyStruct_1) accumulator(my_ushort4_MyStruct_1_accum) combiner(combiner) +static void my_ushort4_MyStruct_1_accum(int *accum, ushort4 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_half_0) accumulator(my_bool_half_0_accum) combiner(combiner) +static void my_bool_half_0_accum(int *accum, bool a, half b) { } + +#pragma rs reduce(my_bool_half_1) accumulator(my_bool_half_1_accum) combiner(combiner) +static void my_bool_half_1_accum(int *accum, bool a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_half2_0) accumulator(my_bool_half2_0_accum) combiner(combiner) +static void my_bool_half2_0_accum(int *accum, bool a, half2 b) { } + +#pragma rs reduce(my_bool_half2_1) accumulator(my_bool_half2_1_accum) combiner(combiner) +static void my_bool_half2_1_accum(int *accum, bool a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_half4_0) accumulator(my_bool_half4_0_accum) combiner(combiner) +static void my_bool_half4_0_accum(int *accum, bool a, half4 b) { } + +#pragma rs reduce(my_bool_half4_1) accumulator(my_bool_half4_1_accum) combiner(combiner) +static void my_bool_half4_1_accum(int *accum, bool a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_float_0) accumulator(my_bool_float_0_accum) combiner(combiner) +static void my_bool_float_0_accum(int *accum, bool a, float b) { } + +#pragma rs reduce(my_bool_float_1) accumulator(my_bool_float_1_accum) combiner(combiner) +static void my_bool_float_1_accum(int *accum, bool a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_float2_0) accumulator(my_bool_float2_0_accum) combiner(combiner) +static void my_bool_float2_0_accum(int *accum, bool a, float2 b) { } + +#pragma rs reduce(my_bool_float2_1) accumulator(my_bool_float2_1_accum) combiner(combiner) +static void my_bool_float2_1_accum(int *accum, bool a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_float4_0) accumulator(my_bool_float4_0_accum) combiner(combiner) +static void my_bool_float4_0_accum(int *accum, bool a, float4 b) { } + +#pragma rs reduce(my_bool_float4_1) accumulator(my_bool_float4_1_accum) combiner(combiner) +static void my_bool_float4_1_accum(int *accum, bool a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_char_0) accumulator(my_bool_char_0_accum) combiner(combiner) +static void my_bool_char_0_accum(int *accum, bool a, char b) { } + +#pragma rs reduce(my_bool_char_1) accumulator(my_bool_char_1_accum) combiner(combiner) +static void my_bool_char_1_accum(int *accum, bool a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_char2_0) accumulator(my_bool_char2_0_accum) combiner(combiner) +static void my_bool_char2_0_accum(int *accum, bool a, char2 b) { } + +#pragma rs reduce(my_bool_char2_1) accumulator(my_bool_char2_1_accum) combiner(combiner) +static void my_bool_char2_1_accum(int *accum, bool a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_char4_0) accumulator(my_bool_char4_0_accum) combiner(combiner) +static void my_bool_char4_0_accum(int *accum, bool a, char4 b) { } + +#pragma rs reduce(my_bool_char4_1) accumulator(my_bool_char4_1_accum) combiner(combiner) +static void my_bool_char4_1_accum(int *accum, bool a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_short_0) accumulator(my_bool_short_0_accum) combiner(combiner) +static void my_bool_short_0_accum(int *accum, bool a, short b) { } + +#pragma rs reduce(my_bool_short_1) accumulator(my_bool_short_1_accum) combiner(combiner) +static void my_bool_short_1_accum(int *accum, bool a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_short2_0) accumulator(my_bool_short2_0_accum) combiner(combiner) +static void my_bool_short2_0_accum(int *accum, bool a, short2 b) { } + +#pragma rs reduce(my_bool_short2_1) accumulator(my_bool_short2_1_accum) combiner(combiner) +static void my_bool_short2_1_accum(int *accum, bool a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_short4_0) accumulator(my_bool_short4_0_accum) combiner(combiner) +static void my_bool_short4_0_accum(int *accum, bool a, short4 b) { } + +#pragma rs reduce(my_bool_short4_1) accumulator(my_bool_short4_1_accum) combiner(combiner) +static void my_bool_short4_1_accum(int *accum, bool a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_uchar_0) accumulator(my_bool_uchar_0_accum) combiner(combiner) +static void my_bool_uchar_0_accum(int *accum, bool a, uchar b) { } + +#pragma rs reduce(my_bool_uchar_1) accumulator(my_bool_uchar_1_accum) combiner(combiner) +static void my_bool_uchar_1_accum(int *accum, bool a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_uchar2_0) accumulator(my_bool_uchar2_0_accum) combiner(combiner) +static void my_bool_uchar2_0_accum(int *accum, bool a, uchar2 b) { } + +#pragma rs reduce(my_bool_uchar2_1) accumulator(my_bool_uchar2_1_accum) combiner(combiner) +static void my_bool_uchar2_1_accum(int *accum, bool a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_uchar4_0) accumulator(my_bool_uchar4_0_accum) combiner(combiner) +static void my_bool_uchar4_0_accum(int *accum, bool a, uchar4 b) { } + +#pragma rs reduce(my_bool_uchar4_1) accumulator(my_bool_uchar4_1_accum) combiner(combiner) +static void my_bool_uchar4_1_accum(int *accum, bool a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_ushort_0) accumulator(my_bool_ushort_0_accum) combiner(combiner) +static void my_bool_ushort_0_accum(int *accum, bool a, ushort b) { } + +#pragma rs reduce(my_bool_ushort_1) accumulator(my_bool_ushort_1_accum) combiner(combiner) +static void my_bool_ushort_1_accum(int *accum, bool a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_ushort2_0) accumulator(my_bool_ushort2_0_accum) combiner(combiner) +static void my_bool_ushort2_0_accum(int *accum, bool a, ushort2 b) { } + +#pragma rs reduce(my_bool_ushort2_1) accumulator(my_bool_ushort2_1_accum) combiner(combiner) +static void my_bool_ushort2_1_accum(int *accum, bool a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_ushort4_0) accumulator(my_bool_ushort4_0_accum) combiner(combiner) +static void my_bool_ushort4_0_accum(int *accum, bool a, ushort4 b) { } + +#pragma rs reduce(my_bool_ushort4_1) accumulator(my_bool_ushort4_1_accum) combiner(combiner) +static void my_bool_ushort4_1_accum(int *accum, bool a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_bool_0) accumulator(my_bool_bool_0_accum) combiner(combiner) +static void my_bool_bool_0_accum(int *accum, bool a, bool b) { } + +#pragma rs reduce(my_bool_bool_1) accumulator(my_bool_bool_1_accum) combiner(combiner) +static void my_bool_bool_1_accum(int *accum, bool a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_rs_matrix2x2_0) accumulator(my_bool_rs_matrix2x2_0_accum) combiner(combiner) +static void my_bool_rs_matrix2x2_0_accum(int *accum, bool a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_bool_rs_matrix2x2_1) accumulator(my_bool_rs_matrix2x2_1_accum) combiner(combiner) +static void my_bool_rs_matrix2x2_1_accum(int *accum, bool a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_bool_MyStruct_0) accumulator(my_bool_MyStruct_0_accum) combiner(combiner) +static void my_bool_MyStruct_0_accum(int *accum, bool a, MyStruct b) { } + +#pragma rs reduce(my_bool_MyStruct_1) accumulator(my_bool_MyStruct_1_accum) combiner(combiner) +static void my_bool_MyStruct_1_accum(int *accum, bool a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_half_0) accumulator(my_rs_matrix2x2_half_0_accum) combiner(combiner) +static void my_rs_matrix2x2_half_0_accum(int *accum, rs_matrix2x2 a, half b) { } + +#pragma rs reduce(my_rs_matrix2x2_half_1) accumulator(my_rs_matrix2x2_half_1_accum) combiner(combiner) +static void my_rs_matrix2x2_half_1_accum(int *accum, rs_matrix2x2 a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_half2_0) accumulator(my_rs_matrix2x2_half2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_half2_0_accum(int *accum, rs_matrix2x2 a, half2 b) { } + +#pragma rs reduce(my_rs_matrix2x2_half2_1) accumulator(my_rs_matrix2x2_half2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_half2_1_accum(int *accum, rs_matrix2x2 a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_half4_0) accumulator(my_rs_matrix2x2_half4_0_accum) combiner(combiner) +static void my_rs_matrix2x2_half4_0_accum(int *accum, rs_matrix2x2 a, half4 b) { } + +#pragma rs reduce(my_rs_matrix2x2_half4_1) accumulator(my_rs_matrix2x2_half4_1_accum) combiner(combiner) +static void my_rs_matrix2x2_half4_1_accum(int *accum, rs_matrix2x2 a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_float_0) accumulator(my_rs_matrix2x2_float_0_accum) combiner(combiner) +static void my_rs_matrix2x2_float_0_accum(int *accum, rs_matrix2x2 a, float b) { } + +#pragma rs reduce(my_rs_matrix2x2_float_1) accumulator(my_rs_matrix2x2_float_1_accum) combiner(combiner) +static void my_rs_matrix2x2_float_1_accum(int *accum, rs_matrix2x2 a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_float2_0) accumulator(my_rs_matrix2x2_float2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_float2_0_accum(int *accum, rs_matrix2x2 a, float2 b) { } + +#pragma rs reduce(my_rs_matrix2x2_float2_1) accumulator(my_rs_matrix2x2_float2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_float2_1_accum(int *accum, rs_matrix2x2 a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_float4_0) accumulator(my_rs_matrix2x2_float4_0_accum) combiner(combiner) +static void my_rs_matrix2x2_float4_0_accum(int *accum, rs_matrix2x2 a, float4 b) { } + +#pragma rs reduce(my_rs_matrix2x2_float4_1) accumulator(my_rs_matrix2x2_float4_1_accum) combiner(combiner) +static void my_rs_matrix2x2_float4_1_accum(int *accum, rs_matrix2x2 a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_char_0) accumulator(my_rs_matrix2x2_char_0_accum) combiner(combiner) +static void my_rs_matrix2x2_char_0_accum(int *accum, rs_matrix2x2 a, char b) { } + +#pragma rs reduce(my_rs_matrix2x2_char_1) accumulator(my_rs_matrix2x2_char_1_accum) combiner(combiner) +static void my_rs_matrix2x2_char_1_accum(int *accum, rs_matrix2x2 a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_char2_0) accumulator(my_rs_matrix2x2_char2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_char2_0_accum(int *accum, rs_matrix2x2 a, char2 b) { } + +#pragma rs reduce(my_rs_matrix2x2_char2_1) accumulator(my_rs_matrix2x2_char2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_char2_1_accum(int *accum, rs_matrix2x2 a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_char4_0) accumulator(my_rs_matrix2x2_char4_0_accum) combiner(combiner) +static void my_rs_matrix2x2_char4_0_accum(int *accum, rs_matrix2x2 a, char4 b) { } + +#pragma rs reduce(my_rs_matrix2x2_char4_1) accumulator(my_rs_matrix2x2_char4_1_accum) combiner(combiner) +static void my_rs_matrix2x2_char4_1_accum(int *accum, rs_matrix2x2 a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_short_0) accumulator(my_rs_matrix2x2_short_0_accum) combiner(combiner) +static void my_rs_matrix2x2_short_0_accum(int *accum, rs_matrix2x2 a, short b) { } + +#pragma rs reduce(my_rs_matrix2x2_short_1) accumulator(my_rs_matrix2x2_short_1_accum) combiner(combiner) +static void my_rs_matrix2x2_short_1_accum(int *accum, rs_matrix2x2 a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_short2_0) accumulator(my_rs_matrix2x2_short2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_short2_0_accum(int *accum, rs_matrix2x2 a, short2 b) { } + +#pragma rs reduce(my_rs_matrix2x2_short2_1) accumulator(my_rs_matrix2x2_short2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_short2_1_accum(int *accum, rs_matrix2x2 a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_short4_0) accumulator(my_rs_matrix2x2_short4_0_accum) combiner(combiner) +static void my_rs_matrix2x2_short4_0_accum(int *accum, rs_matrix2x2 a, short4 b) { } + +#pragma rs reduce(my_rs_matrix2x2_short4_1) accumulator(my_rs_matrix2x2_short4_1_accum) combiner(combiner) +static void my_rs_matrix2x2_short4_1_accum(int *accum, rs_matrix2x2 a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_uchar_0) accumulator(my_rs_matrix2x2_uchar_0_accum) combiner(combiner) +static void my_rs_matrix2x2_uchar_0_accum(int *accum, rs_matrix2x2 a, uchar b) { } + +#pragma rs reduce(my_rs_matrix2x2_uchar_1) accumulator(my_rs_matrix2x2_uchar_1_accum) combiner(combiner) +static void my_rs_matrix2x2_uchar_1_accum(int *accum, rs_matrix2x2 a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_uchar2_0) accumulator(my_rs_matrix2x2_uchar2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_uchar2_0_accum(int *accum, rs_matrix2x2 a, uchar2 b) { } + +#pragma rs reduce(my_rs_matrix2x2_uchar2_1) accumulator(my_rs_matrix2x2_uchar2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_uchar2_1_accum(int *accum, rs_matrix2x2 a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_uchar4_0) accumulator(my_rs_matrix2x2_uchar4_0_accum) combiner(combiner) +static void my_rs_matrix2x2_uchar4_0_accum(int *accum, rs_matrix2x2 a, uchar4 b) { } + +#pragma rs reduce(my_rs_matrix2x2_uchar4_1) accumulator(my_rs_matrix2x2_uchar4_1_accum) combiner(combiner) +static void my_rs_matrix2x2_uchar4_1_accum(int *accum, rs_matrix2x2 a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_ushort_0) accumulator(my_rs_matrix2x2_ushort_0_accum) combiner(combiner) +static void my_rs_matrix2x2_ushort_0_accum(int *accum, rs_matrix2x2 a, ushort b) { } + +#pragma rs reduce(my_rs_matrix2x2_ushort_1) accumulator(my_rs_matrix2x2_ushort_1_accum) combiner(combiner) +static void my_rs_matrix2x2_ushort_1_accum(int *accum, rs_matrix2x2 a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_ushort2_0) accumulator(my_rs_matrix2x2_ushort2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_ushort2_0_accum(int *accum, rs_matrix2x2 a, ushort2 b) { } + +#pragma rs reduce(my_rs_matrix2x2_ushort2_1) accumulator(my_rs_matrix2x2_ushort2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_ushort2_1_accum(int *accum, rs_matrix2x2 a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_ushort4_0) accumulator(my_rs_matrix2x2_ushort4_0_accum) combiner(combiner) +static void my_rs_matrix2x2_ushort4_0_accum(int *accum, rs_matrix2x2 a, ushort4 b) { } + +#pragma rs reduce(my_rs_matrix2x2_ushort4_1) accumulator(my_rs_matrix2x2_ushort4_1_accum) combiner(combiner) +static void my_rs_matrix2x2_ushort4_1_accum(int *accum, rs_matrix2x2 a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_bool_0) accumulator(my_rs_matrix2x2_bool_0_accum) combiner(combiner) +static void my_rs_matrix2x2_bool_0_accum(int *accum, rs_matrix2x2 a, bool b) { } + +#pragma rs reduce(my_rs_matrix2x2_bool_1) accumulator(my_rs_matrix2x2_bool_1_accum) combiner(combiner) +static void my_rs_matrix2x2_bool_1_accum(int *accum, rs_matrix2x2 a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_rs_matrix2x2_0) accumulator(my_rs_matrix2x2_rs_matrix2x2_0_accum) combiner(combiner) +static void my_rs_matrix2x2_rs_matrix2x2_0_accum(int *accum, rs_matrix2x2 a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_rs_matrix2x2_rs_matrix2x2_1) accumulator(my_rs_matrix2x2_rs_matrix2x2_1_accum) combiner(combiner) +static void my_rs_matrix2x2_rs_matrix2x2_1_accum(int *accum, rs_matrix2x2 a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_rs_matrix2x2_MyStruct_0) accumulator(my_rs_matrix2x2_MyStruct_0_accum) combiner(combiner) +static void my_rs_matrix2x2_MyStruct_0_accum(int *accum, rs_matrix2x2 a, MyStruct b) { } + +#pragma rs reduce(my_rs_matrix2x2_MyStruct_1) accumulator(my_rs_matrix2x2_MyStruct_1_accum) combiner(combiner) +static void my_rs_matrix2x2_MyStruct_1_accum(int *accum, rs_matrix2x2 a, MyStruct b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_half_0) accumulator(my_MyStruct_half_0_accum) combiner(combiner) +static void my_MyStruct_half_0_accum(int *accum, MyStruct a, half b) { } + +#pragma rs reduce(my_MyStruct_half_1) accumulator(my_MyStruct_half_1_accum) combiner(combiner) +static void my_MyStruct_half_1_accum(int *accum, MyStruct a, half b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_half2_0) accumulator(my_MyStruct_half2_0_accum) combiner(combiner) +static void my_MyStruct_half2_0_accum(int *accum, MyStruct a, half2 b) { } + +#pragma rs reduce(my_MyStruct_half2_1) accumulator(my_MyStruct_half2_1_accum) combiner(combiner) +static void my_MyStruct_half2_1_accum(int *accum, MyStruct a, half2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_half4_0) accumulator(my_MyStruct_half4_0_accum) combiner(combiner) +static void my_MyStruct_half4_0_accum(int *accum, MyStruct a, half4 b) { } + +#pragma rs reduce(my_MyStruct_half4_1) accumulator(my_MyStruct_half4_1_accum) combiner(combiner) +static void my_MyStruct_half4_1_accum(int *accum, MyStruct a, half4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_float_0) accumulator(my_MyStruct_float_0_accum) combiner(combiner) +static void my_MyStruct_float_0_accum(int *accum, MyStruct a, float b) { } + +#pragma rs reduce(my_MyStruct_float_1) accumulator(my_MyStruct_float_1_accum) combiner(combiner) +static void my_MyStruct_float_1_accum(int *accum, MyStruct a, float b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_float2_0) accumulator(my_MyStruct_float2_0_accum) combiner(combiner) +static void my_MyStruct_float2_0_accum(int *accum, MyStruct a, float2 b) { } + +#pragma rs reduce(my_MyStruct_float2_1) accumulator(my_MyStruct_float2_1_accum) combiner(combiner) +static void my_MyStruct_float2_1_accum(int *accum, MyStruct a, float2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_float4_0) accumulator(my_MyStruct_float4_0_accum) combiner(combiner) +static void my_MyStruct_float4_0_accum(int *accum, MyStruct a, float4 b) { } + +#pragma rs reduce(my_MyStruct_float4_1) accumulator(my_MyStruct_float4_1_accum) combiner(combiner) +static void my_MyStruct_float4_1_accum(int *accum, MyStruct a, float4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_char_0) accumulator(my_MyStruct_char_0_accum) combiner(combiner) +static void my_MyStruct_char_0_accum(int *accum, MyStruct a, char b) { } + +#pragma rs reduce(my_MyStruct_char_1) accumulator(my_MyStruct_char_1_accum) combiner(combiner) +static void my_MyStruct_char_1_accum(int *accum, MyStruct a, char b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_char2_0) accumulator(my_MyStruct_char2_0_accum) combiner(combiner) +static void my_MyStruct_char2_0_accum(int *accum, MyStruct a, char2 b) { } + +#pragma rs reduce(my_MyStruct_char2_1) accumulator(my_MyStruct_char2_1_accum) combiner(combiner) +static void my_MyStruct_char2_1_accum(int *accum, MyStruct a, char2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_char4_0) accumulator(my_MyStruct_char4_0_accum) combiner(combiner) +static void my_MyStruct_char4_0_accum(int *accum, MyStruct a, char4 b) { } + +#pragma rs reduce(my_MyStruct_char4_1) accumulator(my_MyStruct_char4_1_accum) combiner(combiner) +static void my_MyStruct_char4_1_accum(int *accum, MyStruct a, char4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_short_0) accumulator(my_MyStruct_short_0_accum) combiner(combiner) +static void my_MyStruct_short_0_accum(int *accum, MyStruct a, short b) { } + +#pragma rs reduce(my_MyStruct_short_1) accumulator(my_MyStruct_short_1_accum) combiner(combiner) +static void my_MyStruct_short_1_accum(int *accum, MyStruct a, short b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_short2_0) accumulator(my_MyStruct_short2_0_accum) combiner(combiner) +static void my_MyStruct_short2_0_accum(int *accum, MyStruct a, short2 b) { } + +#pragma rs reduce(my_MyStruct_short2_1) accumulator(my_MyStruct_short2_1_accum) combiner(combiner) +static void my_MyStruct_short2_1_accum(int *accum, MyStruct a, short2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_short4_0) accumulator(my_MyStruct_short4_0_accum) combiner(combiner) +static void my_MyStruct_short4_0_accum(int *accum, MyStruct a, short4 b) { } + +#pragma rs reduce(my_MyStruct_short4_1) accumulator(my_MyStruct_short4_1_accum) combiner(combiner) +static void my_MyStruct_short4_1_accum(int *accum, MyStruct a, short4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_uchar_0) accumulator(my_MyStruct_uchar_0_accum) combiner(combiner) +static void my_MyStruct_uchar_0_accum(int *accum, MyStruct a, uchar b) { } + +#pragma rs reduce(my_MyStruct_uchar_1) accumulator(my_MyStruct_uchar_1_accum) combiner(combiner) +static void my_MyStruct_uchar_1_accum(int *accum, MyStruct a, uchar b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_uchar2_0) accumulator(my_MyStruct_uchar2_0_accum) combiner(combiner) +static void my_MyStruct_uchar2_0_accum(int *accum, MyStruct a, uchar2 b) { } + +#pragma rs reduce(my_MyStruct_uchar2_1) accumulator(my_MyStruct_uchar2_1_accum) combiner(combiner) +static void my_MyStruct_uchar2_1_accum(int *accum, MyStruct a, uchar2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_uchar4_0) accumulator(my_MyStruct_uchar4_0_accum) combiner(combiner) +static void my_MyStruct_uchar4_0_accum(int *accum, MyStruct a, uchar4 b) { } + +#pragma rs reduce(my_MyStruct_uchar4_1) accumulator(my_MyStruct_uchar4_1_accum) combiner(combiner) +static void my_MyStruct_uchar4_1_accum(int *accum, MyStruct a, uchar4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_ushort_0) accumulator(my_MyStruct_ushort_0_accum) combiner(combiner) +static void my_MyStruct_ushort_0_accum(int *accum, MyStruct a, ushort b) { } + +#pragma rs reduce(my_MyStruct_ushort_1) accumulator(my_MyStruct_ushort_1_accum) combiner(combiner) +static void my_MyStruct_ushort_1_accum(int *accum, MyStruct a, ushort b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_ushort2_0) accumulator(my_MyStruct_ushort2_0_accum) combiner(combiner) +static void my_MyStruct_ushort2_0_accum(int *accum, MyStruct a, ushort2 b) { } + +#pragma rs reduce(my_MyStruct_ushort2_1) accumulator(my_MyStruct_ushort2_1_accum) combiner(combiner) +static void my_MyStruct_ushort2_1_accum(int *accum, MyStruct a, ushort2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_ushort4_0) accumulator(my_MyStruct_ushort4_0_accum) combiner(combiner) +static void my_MyStruct_ushort4_0_accum(int *accum, MyStruct a, ushort4 b) { } + +#pragma rs reduce(my_MyStruct_ushort4_1) accumulator(my_MyStruct_ushort4_1_accum) combiner(combiner) +static void my_MyStruct_ushort4_1_accum(int *accum, MyStruct a, ushort4 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_bool_0) accumulator(my_MyStruct_bool_0_accum) combiner(combiner) +static void my_MyStruct_bool_0_accum(int *accum, MyStruct a, bool b) { } + +#pragma rs reduce(my_MyStruct_bool_1) accumulator(my_MyStruct_bool_1_accum) combiner(combiner) +static void my_MyStruct_bool_1_accum(int *accum, MyStruct a, bool b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_rs_matrix2x2_0) accumulator(my_MyStruct_rs_matrix2x2_0_accum) combiner(combiner) +static void my_MyStruct_rs_matrix2x2_0_accum(int *accum, MyStruct a, rs_matrix2x2 b) { } + +#pragma rs reduce(my_MyStruct_rs_matrix2x2_1) accumulator(my_MyStruct_rs_matrix2x2_1_accum) combiner(combiner) +static void my_MyStruct_rs_matrix2x2_1_accum(int *accum, MyStruct a, rs_matrix2x2 b, rs_kernel_context context) { } + +#pragma rs reduce(my_MyStruct_MyStruct_0) accumulator(my_MyStruct_MyStruct_0_accum) combiner(combiner) +static void my_MyStruct_MyStruct_0_accum(int *accum, MyStruct a, MyStruct b) { } + +#pragma rs reduce(my_MyStruct_MyStruct_1) accumulator(my_MyStruct_MyStruct_1_accum) combiner(combiner) +static void my_MyStruct_MyStruct_1_accum(int *accum, MyStruct a, MyStruct b, rs_kernel_context context) { }
diff --git a/slang/tests/P_reduce_general_inputs/stderr.txt.expect b/slang/tests/P_reduce_general_inputs/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_inputs/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_inputs/stdout.txt.expect b/slang/tests/P_reduce_general_inputs/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_inputs/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_reflect/reduce_general_reflect.rs b/slang/tests/P_reduce_general_reflect/reduce_general_reflect.rs new file mode 100644 index 0000000..a7ef619 --- /dev/null +++ b/slang/tests/P_reduce_general_reflect/reduce_general_reflect.rs
@@ -0,0 +1,30 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(reflect) + +// A few interesting reflection cases + +////////////////////////////////////////////////////////////////// + +// A given result type should only be reflected once + +#pragma rs reduce(d1) accumulator(d1_accum) outconverter(d1_out) +static void d1_accum(float *accum, float val) { } +static void d1_out(double *out, const float *val) { } + +#pragma rs reduce(d2) accumulator(d2_accum) +static void d2_accum(double *accum, double val) { } + +////////////////////////////////////////////////////////////////// + +// Arrays of different sizes are reflected separately + +#pragma rs reduce(a3) accumulator(a3_accum) combiner(a3_comb) +typedef int IntA3[3]; +static void a3_accum(IntA3 *accum, int val) { } +static void a3_comb(IntA3 *accum, const IntA3 *other) { } + +#pragma rs reduce(a7) accumulator(a7_accum) combiner(a7_comb) +typedef int IntA7[7]; +static void a7_accum(IntA7 *accum, int val) { } +static void a7_comb(IntA7 *accum, const IntA7 *other) { }
diff --git a/slang/tests/P_reduce_general_reflect/stderr.txt.expect b/slang/tests/P_reduce_general_reflect/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_reflect/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_reflect/stdout.txt.expect b/slang/tests/P_reduce_general_reflect/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_reflect/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_result/ScriptC_reduce_general_result.java.expect b/slang/tests/P_reduce_general_result/ScriptC_reduce_general_result.java.expect new file mode 100644 index 0000000..c1bd6d5 --- /dev/null +++ b/slang/tests/P_reduce_general_result/ScriptC_reduce_general_result.java.expect
@@ -0,0 +1,5136 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_result.rs + */ + +package result; + +import android.renderscript.*; +import result.reduce_general_resultBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_result extends ScriptC { + private static final String __rs_resource_name = "reduce_general_result"; + // Constructor + public ScriptC_reduce_general_result(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_resultBitCode.getBitCode32(), + reduce_general_resultBitCode.getBitCode64()); + mRSLocal = rs; + __F16 = Element.F16(rs); + __F16_2 = Element.F16_2(rs); + __F16_4 = Element.F16_4(rs); + __F32 = Element.F32(rs); + __F32_2 = Element.F32_2(rs); + __F32_4 = Element.F32_4(rs); + __F64 = Element.F64(rs); + __F64_2 = Element.F64_2(rs); + __F64_4 = Element.F64_4(rs); + __I8 = Element.I8(rs); + __I8_2 = Element.I8_2(rs); + __I8_4 = Element.I8_4(rs); + __I16 = Element.I16(rs); + __I16_2 = Element.I16_2(rs); + __I16_4 = Element.I16_4(rs); + __I32 = Element.I32(rs); + __I32_2 = Element.I32_2(rs); + __I32_4 = Element.I32_4(rs); + __I64 = Element.I64(rs); + __I64_2 = Element.I64_2(rs); + __I64_4 = Element.I64_4(rs); + __U8 = Element.U8(rs); + __U8_2 = Element.U8_2(rs); + __U8_4 = Element.U8_4(rs); + __U16 = Element.U16(rs); + __U16_2 = Element.U16_2(rs); + __U16_4 = Element.U16_4(rs); + __U32 = Element.U32(rs); + __U32_2 = Element.U32_2(rs); + __U32_4 = Element.U32_4(rs); + __U64 = Element.U64(rs); + __U64_2 = Element.U64_2(rs); + __U64_4 = Element.U64_4(rs); + __BOOLEAN = Element.BOOLEAN(rs); + } + + private Element __BOOLEAN; + private Element __F16; + private Element __F16_2; + private Element __F16_4; + private Element __F32; + private Element __F32_2; + private Element __F32_4; + private Element __F64; + private Element __F64_2; + private Element __F64_4; + private Element __I16; + private Element __I16_2; + private Element __I16_4; + private Element __I32; + private Element __I32_2; + private Element __I32_4; + private Element __I64; + private Element __I64_2; + private Element __I64_4; + private Element __I8; + private Element __I8_2; + private Element __I8_4; + private Element __U16; + private Element __U16_2; + private Element __U16_4; + private Element __U32; + private Element __U32_2; + private Element __U32_4; + private Element __U64; + private Element __U64_2; + private Element __U64_4; + private Element __U8; + private Element __U8_2; + private Element __U8_4; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_bool { + public boolean[] get() { + if (!mGotResult) { + byte[] outArray = new byte[7]; + mOut.copyTo(outArray); + boolean[] result = new boolean[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = outArray[Idx] != 0; + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_bool(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private boolean[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_char { + public byte[] get() { + if (!mGotResult) { + byte[] outArray = new byte[7]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_char(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private byte[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_char2 { + public Byte2[] get() { + if (!mGotResult) { + byte[] outArray = new byte[14]; + mOut.copyTo(outArray); + Byte2[] result = new Byte2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Byte2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_char2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Byte2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_char4 { + public Byte4[] get() { + if (!mGotResult) { + byte[] outArray = new byte[28]; + mOut.copyTo(outArray); + Byte4[] result = new Byte4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Byte4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_char4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Byte4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_double { + public double[] get() { + if (!mGotResult) { + double[] outArray = new double[7]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_double(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private double[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_double2 { + public Double2[] get() { + if (!mGotResult) { + double[] outArray = new double[14]; + mOut.copyTo(outArray); + Double2[] result = new Double2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Double2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_double2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Double2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_double4 { + public Double4[] get() { + if (!mGotResult) { + double[] outArray = new double[28]; + mOut.copyTo(outArray); + Double4[] result = new Double4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Double4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_double4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Double4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_float { + public float[] get() { + if (!mGotResult) { + float[] outArray = new float[7]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_float(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private float[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_float2 { + public Float2[] get() { + if (!mGotResult) { + float[] outArray = new float[14]; + mOut.copyTo(outArray); + Float2[] result = new Float2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Float2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_float2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Float2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_float4 { + public Float4[] get() { + if (!mGotResult) { + float[] outArray = new float[28]; + mOut.copyTo(outArray); + Float4[] result = new Float4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Float4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_float4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Float4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_half { + public short[] get() { + if (!mGotResult) { + short[] outArray = new short[7]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_half(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private short[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_half2 { + public Short2[] get() { + if (!mGotResult) { + short[] outArray = new short[14]; + mOut.copyTo(outArray); + Short2[] result = new Short2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Short2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_half2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_half4 { + public Short4[] get() { + if (!mGotResult) { + short[] outArray = new short[28]; + mOut.copyTo(outArray); + Short4[] result = new Short4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Short4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_half4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_int { + public int[] get() { + if (!mGotResult) { + int[] outArray = new int[7]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_int2 { + public Int2[] get() { + if (!mGotResult) { + int[] outArray = new int[14]; + mOut.copyTo(outArray); + Int2[] result = new Int2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Int2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_int2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_int4 { + public Int4[] get() { + if (!mGotResult) { + int[] outArray = new int[28]; + mOut.copyTo(outArray); + Int4[] result = new Int4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Int4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_int4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_long { + public long[] get() { + if (!mGotResult) { + long[] outArray = new long[7]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_long(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_long2 { + public Long2[] get() { + if (!mGotResult) { + long[] outArray = new long[14]; + mOut.copyTo(outArray); + Long2[] result = new Long2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Long2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_long2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_long4 { + public Long4[] get() { + if (!mGotResult) { + long[] outArray = new long[28]; + mOut.copyTo(outArray); + Long4[] result = new Long4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Long4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_long4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_short { + public short[] get() { + if (!mGotResult) { + short[] outArray = new short[7]; + mOut.copyTo(outArray); + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_short(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private short[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_short2 { + public Short2[] get() { + if (!mGotResult) { + short[] outArray = new short[14]; + mOut.copyTo(outArray); + Short2[] result = new Short2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Short2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_short2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_short4 { + public Short4[] get() { + if (!mGotResult) { + short[] outArray = new short[28]; + mOut.copyTo(outArray); + Short4[] result = new Short4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Short4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_short4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_uchar { + public short[] get() { + if (!mGotResult) { + byte[] outArray = new byte[7]; + mOut.copyTo(outArray); + short[] result = new short[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = ((short) ((outArray[Idx]) & (short) 0xff)); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_uchar(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private short[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_uchar2 { + public Short2[] get() { + if (!mGotResult) { + byte[] outArray = new byte[14]; + mOut.copyTo(outArray); + Short2[] result = new Short2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Short2(((short) ((outArray[2*Idx+0]) & (short) 0xff)), ((short) ((outArray[2*Idx+1]) & (short) 0xff))); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_uchar2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_uchar4 { + public Short4[] get() { + if (!mGotResult) { + byte[] outArray = new byte[28]; + mOut.copyTo(outArray); + Short4[] result = new Short4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + 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))); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_uchar4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_uint { + public long[] get() { + if (!mGotResult) { + int[] outArray = new int[7]; + mOut.copyTo(outArray); + long[] result = new long[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = ((long) ((outArray[Idx]) & 0xffffffffL)); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_uint(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_uint2 { + public Long2[] get() { + if (!mGotResult) { + int[] outArray = new int[14]; + mOut.copyTo(outArray); + Long2[] result = new Long2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Long2(((long) ((outArray[2*Idx+0]) & 0xffffffffL)), ((long) ((outArray[2*Idx+1]) & 0xffffffffL))); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_uint2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_uint4 { + public Long4[] get() { + if (!mGotResult) { + int[] outArray = new int[28]; + mOut.copyTo(outArray); + Long4[] result = new Long4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + 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))); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_uint4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_ulong { + public long[] get() { + if (!mGotResult) { + long[] outArray = new long[7]; + mOut.copyTo(outArray); + for (int Idx = 0; Idx < 7; ++Idx) { + if (outArray[Idx] < 0) + throw new RSRuntimeException("Result is not representible in Java"); + } + + mResult = outArray; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_ulong(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_ulong2 { + public Long2[] get() { + if (!mGotResult) { + long[] outArray = new long[14]; + mOut.copyTo(outArray); + for (int Idx = 0; Idx < 14; ++Idx) { + if (outArray[Idx] < 0) + throw new RSRuntimeException("Result is not representible in Java"); + } + + Long2[] result = new Long2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Long2(outArray[2*Idx+0], outArray[2*Idx+1]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_ulong2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_ulong4 { + public Long4[] get() { + if (!mGotResult) { + long[] outArray = new long[28]; + mOut.copyTo(outArray); + for (int Idx = 0; Idx < 28; ++Idx) { + if (outArray[Idx] < 0) + throw new RSRuntimeException("Result is not representible in Java"); + } + + Long4[] result = new Long4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Long4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_ulong4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_ushort { + public int[] get() { + if (!mGotResult) { + short[] outArray = new short[7]; + mOut.copyTo(outArray); + int[] result = new int[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = ((int) ((outArray[Idx]) & 0xffff)); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_ushort(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_ushort2 { + public Int2[] get() { + if (!mGotResult) { + short[] outArray = new short[14]; + mOut.copyTo(outArray); + Int2[] result = new Int2[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + result[Idx] = new Int2(((int) ((outArray[2*Idx+0]) & 0xffff)), ((int) ((outArray[2*Idx+1]) & 0xffff))); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_ushort2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int2[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class resultArray7_ushort4 { + public Int4[] get() { + if (!mGotResult) { + short[] outArray = new short[28]; + mOut.copyTo(outArray); + Int4[] result = new Int4[7]; + for (int Idx = 0; Idx < 7; ++Idx) { + 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))); + } + + mResult = result; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private resultArray7_ushort4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int4[] mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_bool { + public boolean get() { + if (!mGotResult) { + byte[] outArray = new byte[1]; + mOut.copyTo(outArray); + mResult = outArray[0] != 0; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_bool(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private boolean mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_char { + public byte get() { + if (!mGotResult) { + byte[] outArray = new byte[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_char(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private byte mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_char2 { + public Byte2 get() { + if (!mGotResult) { + byte[] outArray = new byte[2]; + mOut.copyTo(outArray); + mResult = new Byte2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_char2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Byte2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_char4 { + public Byte4 get() { + if (!mGotResult) { + byte[] outArray = new byte[4]; + mOut.copyTo(outArray); + mResult = new Byte4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_char4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Byte4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_double { + public double get() { + if (!mGotResult) { + double[] outArray = new double[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_double(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private double mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_double2 { + public Double2 get() { + if (!mGotResult) { + double[] outArray = new double[2]; + mOut.copyTo(outArray); + mResult = new Double2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_double2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Double2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_double4 { + public Double4 get() { + if (!mGotResult) { + double[] outArray = new double[4]; + mOut.copyTo(outArray); + mResult = new Double4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_double4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Double4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_float { + public float get() { + if (!mGotResult) { + float[] outArray = new float[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_float(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private float mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_float2 { + public Float2 get() { + if (!mGotResult) { + float[] outArray = new float[2]; + mOut.copyTo(outArray); + mResult = new Float2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_float2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Float2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_float4 { + public Float4 get() { + if (!mGotResult) { + float[] outArray = new float[4]; + mOut.copyTo(outArray); + mResult = new Float4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_float4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Float4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_half { + public short get() { + if (!mGotResult) { + short[] outArray = new short[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_half(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private short mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_half2 { + public Short2 get() { + if (!mGotResult) { + short[] outArray = new short[2]; + mOut.copyTo(outArray); + mResult = new Short2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_half2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_half4 { + public Short4 get() { + if (!mGotResult) { + short[] outArray = new short[4]; + mOut.copyTo(outArray); + mResult = new Short4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_half4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int2 { + public Int2 get() { + if (!mGotResult) { + int[] outArray = new int[2]; + mOut.copyTo(outArray); + mResult = new Int2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int4 { + public Int4 get() { + if (!mGotResult) { + int[] outArray = new int[4]; + mOut.copyTo(outArray); + mResult = new Int4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_long { + public long get() { + if (!mGotResult) { + long[] outArray = new long[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_long(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_long2 { + public Long2 get() { + if (!mGotResult) { + long[] outArray = new long[2]; + mOut.copyTo(outArray); + mResult = new Long2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_long2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_long4 { + public Long4 get() { + if (!mGotResult) { + long[] outArray = new long[4]; + mOut.copyTo(outArray); + mResult = new Long4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_long4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_short { + public short get() { + if (!mGotResult) { + short[] outArray = new short[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_short(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private short mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_short2 { + public Short2 get() { + if (!mGotResult) { + short[] outArray = new short[2]; + mOut.copyTo(outArray); + mResult = new Short2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_short2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_short4 { + public Short4 get() { + if (!mGotResult) { + short[] outArray = new short[4]; + mOut.copyTo(outArray); + mResult = new Short4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_short4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_uchar { + public short get() { + if (!mGotResult) { + byte[] outArray = new byte[1]; + mOut.copyTo(outArray); + mResult = ((short) ((outArray[0]) & (short) 0xff)); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_uchar(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private short mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_uchar2 { + public Short2 get() { + if (!mGotResult) { + byte[] outArray = new byte[2]; + mOut.copyTo(outArray); + mResult = new Short2(((short) ((outArray[0]) & (short) 0xff)), ((short) ((outArray[1]) & (short) 0xff))); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_uchar2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_uchar4 { + public Short4 get() { + if (!mGotResult) { + byte[] outArray = new byte[4]; + mOut.copyTo(outArray); + mResult = new Short4(((short) ((outArray[0]) & (short) 0xff)), ((short) ((outArray[1]) & (short) 0xff)), ((short) ((outArray[2]) & (short) 0xff)), ((short) ((outArray[3]) & (short) 0xff))); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_uchar4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Short4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_uint { + public long get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = ((long) ((outArray[0]) & 0xffffffffL)); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_uint(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_uint2 { + public Long2 get() { + if (!mGotResult) { + int[] outArray = new int[2]; + mOut.copyTo(outArray); + mResult = new Long2(((long) ((outArray[0]) & 0xffffffffL)), ((long) ((outArray[1]) & 0xffffffffL))); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_uint2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_uint4 { + public Long4 get() { + if (!mGotResult) { + int[] outArray = new int[4]; + mOut.copyTo(outArray); + mResult = new Long4(((long) ((outArray[0]) & 0xffffffffL)), ((long) ((outArray[1]) & 0xffffffffL)), ((long) ((outArray[2]) & 0xffffffffL)), ((long) ((outArray[3]) & 0xffffffffL))); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_uint4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_ulong { + public long get() { + if (!mGotResult) { + long[] outArray = new long[1]; + mOut.copyTo(outArray); + if (outArray[0] < 0) + throw new RSRuntimeException("Result is not representible in Java"); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_ulong(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private long mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_ulong2 { + public Long2 get() { + if (!mGotResult) { + long[] outArray = new long[2]; + mOut.copyTo(outArray); + for (int Idx = 0; Idx < 2; ++Idx) { + if (outArray[Idx] < 0) + throw new RSRuntimeException("Result is not representible in Java"); + } + + mResult = new Long2(outArray[0], outArray[1]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_ulong2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_ulong4 { + public Long4 get() { + if (!mGotResult) { + long[] outArray = new long[4]; + mOut.copyTo(outArray); + for (int Idx = 0; Idx < 4; ++Idx) { + if (outArray[Idx] < 0) + throw new RSRuntimeException("Result is not representible in Java"); + } + + mResult = new Long4(outArray[0], outArray[1], outArray[2], outArray[3]); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_ulong4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Long4 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_ushort { + public int get() { + if (!mGotResult) { + short[] outArray = new short[1]; + mOut.copyTo(outArray); + mResult = ((int) ((outArray[0]) & 0xffff)); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_ushort(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_ushort2 { + public Int2 get() { + if (!mGotResult) { + short[] outArray = new short[2]; + mOut.copyTo(outArray); + mResult = new Int2(((int) ((outArray[0]) & 0xffff)), ((int) ((outArray[1]) & 0xffff))); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_ushort2(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int2 mResult; + } + + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_ushort4 { + public Int4 get() { + if (!mGotResult) { + short[] outArray = new short[4]; + mOut.copyTo(outArray); + mResult = new Int4(((int) ((outArray[0]) & 0xffff)), ((int) ((outArray[1]) & 0xffff)), ((int) ((outArray[2]) & 0xffff)), ((int) ((outArray[3]) & 0xffff))); + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_ushort4(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private Int4 mResult; + } + + private final static int mExportReduceIdx_my_half = 0; + // in1 = "val" + public result_half reduce_my_half(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_half result = reduce_my_half(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half val" + public result_half reduce_my_half(Allocation ain1) { + return reduce_my_half(ain1, null); + } + + // ain1 = "half val" + public result_half reduce_my_half(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F16, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half, new Allocation[]{ain1}, aout, sc); + return new result_half(aout); + } + + private final static int mExportReduceIdx_my_half2 = 1; + // in1 = "val", flattened 2-vectors + public result_half2 reduce_my_half2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_half2 result = reduce_my_half2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 val" + public result_half2 reduce_my_half2(Allocation ain1) { + return reduce_my_half2(ain1, null); + } + + // ain1 = "half2 val" + public result_half2 reduce_my_half2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F16_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half2, new Allocation[]{ain1}, aout, sc); + return new result_half2(aout); + } + + private final static int mExportReduceIdx_my_half4 = 2; + // in1 = "val", flattened 4-vectors + public result_half4 reduce_my_half4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_half4 result = reduce_my_half4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 val" + public result_half4 reduce_my_half4(Allocation ain1) { + return reduce_my_half4(ain1, null); + } + + // ain1 = "half4 val" + public result_half4 reduce_my_half4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F16_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_half4, new Allocation[]{ain1}, aout, sc); + return new result_half4(aout); + } + + private final static int mExportReduceIdx_my_array_half = 3; + // in1 = "val" + public resultArray7_half reduce_my_array_half(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_half result = reduce_my_array_half(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half val" + public resultArray7_half reduce_my_array_half(Allocation ain1) { + return reduce_my_array_half(ain1, null); + } + + // ain1 = "half val" + public resultArray7_half reduce_my_array_half(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16)) { + throw new RSRuntimeException("Type mismatch with F16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F16, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_half, new Allocation[]{ain1}, aout, sc); + return new resultArray7_half(aout); + } + + private final static int mExportReduceIdx_my_array_half2 = 4; + // in1 = "val", flattened 2-vectors + public resultArray7_half2 reduce_my_array_half2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_half2 result = reduce_my_array_half2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half2 val" + public resultArray7_half2 reduce_my_array_half2(Allocation ain1) { + return reduce_my_array_half2(ain1, null); + } + + // ain1 = "half2 val" + public resultArray7_half2 reduce_my_array_half2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_2)) { + throw new RSRuntimeException("Type mismatch with F16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F16_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_half2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_half2(aout); + } + + private final static int mExportReduceIdx_my_array_half4 = 5; + // in1 = "val", flattened 4-vectors + public resultArray7_half4 reduce_my_array_half4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_half4 result = reduce_my_array_half4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "half4 val" + public resultArray7_half4 reduce_my_array_half4(Allocation ain1) { + return reduce_my_array_half4(ain1, null); + } + + // ain1 = "half4 val" + public resultArray7_half4 reduce_my_array_half4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F16_4)) { + throw new RSRuntimeException("Type mismatch with F16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F16_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_half4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_half4(aout); + } + + private final static int mExportReduceIdx_my_float = 6; + // in1 = "val" + public result_float reduce_my_float(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_float result = reduce_my_float(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float val" + public result_float reduce_my_float(Allocation ain1) { + return reduce_my_float(ain1, null); + } + + // ain1 = "float val" + public result_float reduce_my_float(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float, new Allocation[]{ain1}, aout, sc); + return new result_float(aout); + } + + private final static int mExportReduceIdx_my_float2 = 7; + // in1 = "val", flattened 2-vectors + public result_float2 reduce_my_float2(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_float2 result = reduce_my_float2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 val" + public result_float2 reduce_my_float2(Allocation ain1) { + return reduce_my_float2(ain1, null); + } + + // ain1 = "float2 val" + public result_float2 reduce_my_float2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float2, new Allocation[]{ain1}, aout, sc); + return new result_float2(aout); + } + + private final static int mExportReduceIdx_my_float4 = 8; + // in1 = "val", flattened 4-vectors + public result_float4 reduce_my_float4(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_float4 result = reduce_my_float4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 val" + public result_float4 reduce_my_float4(Allocation ain1) { + return reduce_my_float4(ain1, null); + } + + // ain1 = "float4 val" + public result_float4 reduce_my_float4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F32_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_float4, new Allocation[]{ain1}, aout, sc); + return new result_float4(aout); + } + + private final static int mExportReduceIdx_my_array_float = 9; + // in1 = "val" + public resultArray7_float reduce_my_array_float(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_float result = reduce_my_array_float(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float val" + public resultArray7_float reduce_my_array_float(Allocation ain1) { + return reduce_my_array_float(ain1, null); + } + + // ain1 = "float val" + public resultArray7_float reduce_my_array_float(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32)) { + throw new RSRuntimeException("Type mismatch with F32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F32, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_float, new Allocation[]{ain1}, aout, sc); + return new resultArray7_float(aout); + } + + private final static int mExportReduceIdx_my_array_float2 = 10; + // in1 = "val", flattened 2-vectors + public resultArray7_float2 reduce_my_array_float2(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_float2 result = reduce_my_array_float2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float2 val" + public resultArray7_float2 reduce_my_array_float2(Allocation ain1) { + return reduce_my_array_float2(ain1, null); + } + + // ain1 = "float2 val" + public resultArray7_float2 reduce_my_array_float2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_2)) { + throw new RSRuntimeException("Type mismatch with F32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F32_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_float2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_float2(aout); + } + + private final static int mExportReduceIdx_my_array_float4 = 11; + // in1 = "val", flattened 4-vectors + public resultArray7_float4 reduce_my_array_float4(float[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_float4 result = reduce_my_array_float4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "float4 val" + public resultArray7_float4 reduce_my_array_float4(Allocation ain1) { + return reduce_my_array_float4(ain1, null); + } + + // ain1 = "float4 val" + public resultArray7_float4 reduce_my_array_float4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F32_4)) { + throw new RSRuntimeException("Type mismatch with F32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F32_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_float4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_float4(aout); + } + + private final static int mExportReduceIdx_my_double = 12; + // in1 = "val" + public result_double reduce_my_double(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_double result = reduce_my_double(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double val" + public result_double reduce_my_double(Allocation ain1) { + return reduce_my_double(ain1, null); + } + + // ain1 = "double val" + public result_double reduce_my_double(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F64, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double, new Allocation[]{ain1}, aout, sc); + return new result_double(aout); + } + + private final static int mExportReduceIdx_my_double2 = 13; + // in1 = "val", flattened 2-vectors + public result_double2 reduce_my_double2(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_double2 result = reduce_my_double2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 val" + public result_double2 reduce_my_double2(Allocation ain1) { + return reduce_my_double2(ain1, null); + } + + // ain1 = "double2 val" + public result_double2 reduce_my_double2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F64_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double2, new Allocation[]{ain1}, aout, sc); + return new result_double2(aout); + } + + private final static int mExportReduceIdx_my_double4 = 14; + // in1 = "val", flattened 4-vectors + public result_double4 reduce_my_double4(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_double4 result = reduce_my_double4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 val" + public result_double4 reduce_my_double4(Allocation ain1) { + return reduce_my_double4(ain1, null); + } + + // ain1 = "double4 val" + public result_double4 reduce_my_double4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F64_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_double4, new Allocation[]{ain1}, aout, sc); + return new result_double4(aout); + } + + private final static int mExportReduceIdx_my_array_double = 15; + // in1 = "val" + public resultArray7_double reduce_my_array_double(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_double result = reduce_my_array_double(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double val" + public resultArray7_double reduce_my_array_double(Allocation ain1) { + return reduce_my_array_double(ain1, null); + } + + // ain1 = "double val" + public resultArray7_double reduce_my_array_double(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64)) { + throw new RSRuntimeException("Type mismatch with F64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F64, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_double, new Allocation[]{ain1}, aout, sc); + return new resultArray7_double(aout); + } + + private final static int mExportReduceIdx_my_array_double2 = 16; + // in1 = "val", flattened 2-vectors + public resultArray7_double2 reduce_my_array_double2(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_double2 result = reduce_my_array_double2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double2 val" + public resultArray7_double2 reduce_my_array_double2(Allocation ain1) { + return reduce_my_array_double2(ain1, null); + } + + // ain1 = "double2 val" + public resultArray7_double2 reduce_my_array_double2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_2)) { + throw new RSRuntimeException("Type mismatch with F64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F64_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_double2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_double2(aout); + } + + private final static int mExportReduceIdx_my_array_double4 = 17; + // in1 = "val", flattened 4-vectors + public resultArray7_double4 reduce_my_array_double4(double[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_double4 result = reduce_my_array_double4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "double4 val" + public resultArray7_double4 reduce_my_array_double4(Allocation ain1) { + return reduce_my_array_double4(ain1, null); + } + + // ain1 = "double4 val" + public resultArray7_double4 reduce_my_array_double4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__F64_4)) { + throw new RSRuntimeException("Type mismatch with F64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __F64_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_double4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_double4(aout); + } + + private final static int mExportReduceIdx_my_char = 18; + // in1 = "val" + public result_char reduce_my_char(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_char result = reduce_my_char(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char val" + public result_char reduce_my_char(Allocation ain1) { + return reduce_my_char(ain1, null); + } + + // ain1 = "char val" + public result_char reduce_my_char(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I8, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char, new Allocation[]{ain1}, aout, sc); + return new result_char(aout); + } + + private final static int mExportReduceIdx_my_char2 = 19; + // in1 = "val", flattened 2-vectors + public result_char2 reduce_my_char2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_char2 result = reduce_my_char2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 val" + public result_char2 reduce_my_char2(Allocation ain1) { + return reduce_my_char2(ain1, null); + } + + // ain1 = "char2 val" + public result_char2 reduce_my_char2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I8_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char2, new Allocation[]{ain1}, aout, sc); + return new result_char2(aout); + } + + private final static int mExportReduceIdx_my_char4 = 20; + // in1 = "val", flattened 4-vectors + public result_char4 reduce_my_char4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_char4 result = reduce_my_char4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 val" + public result_char4 reduce_my_char4(Allocation ain1) { + return reduce_my_char4(ain1, null); + } + + // ain1 = "char4 val" + public result_char4 reduce_my_char4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I8_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_char4, new Allocation[]{ain1}, aout, sc); + return new result_char4(aout); + } + + private final static int mExportReduceIdx_my_array_char = 21; + // in1 = "val" + public resultArray7_char reduce_my_array_char(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_char result = reduce_my_array_char(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char val" + public resultArray7_char reduce_my_array_char(Allocation ain1) { + return reduce_my_array_char(ain1, null); + } + + // ain1 = "char val" + public resultArray7_char reduce_my_array_char(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8)) { + throw new RSRuntimeException("Type mismatch with I8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I8, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_char, new Allocation[]{ain1}, aout, sc); + return new resultArray7_char(aout); + } + + private final static int mExportReduceIdx_my_array_char2 = 22; + // in1 = "val", flattened 2-vectors + public resultArray7_char2 reduce_my_array_char2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_char2 result = reduce_my_array_char2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char2 val" + public resultArray7_char2 reduce_my_array_char2(Allocation ain1) { + return reduce_my_array_char2(ain1, null); + } + + // ain1 = "char2 val" + public resultArray7_char2 reduce_my_array_char2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_2)) { + throw new RSRuntimeException("Type mismatch with I8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I8_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_char2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_char2(aout); + } + + private final static int mExportReduceIdx_my_array_char4 = 23; + // in1 = "val", flattened 4-vectors + public resultArray7_char4 reduce_my_array_char4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_char4 result = reduce_my_array_char4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "char4 val" + public resultArray7_char4 reduce_my_array_char4(Allocation ain1) { + return reduce_my_array_char4(ain1, null); + } + + // ain1 = "char4 val" + public resultArray7_char4 reduce_my_array_char4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I8_4)) { + throw new RSRuntimeException("Type mismatch with I8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I8_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_char4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_char4(aout); + } + + private final static int mExportReduceIdx_my_short = 24; + // in1 = "val" + public result_short reduce_my_short(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_short result = reduce_my_short(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short val" + public result_short reduce_my_short(Allocation ain1) { + return reduce_my_short(ain1, null); + } + + // ain1 = "short val" + public result_short reduce_my_short(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I16, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short, new Allocation[]{ain1}, aout, sc); + return new result_short(aout); + } + + private final static int mExportReduceIdx_my_short2 = 25; + // in1 = "val", flattened 2-vectors + public result_short2 reduce_my_short2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_short2 result = reduce_my_short2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 val" + public result_short2 reduce_my_short2(Allocation ain1) { + return reduce_my_short2(ain1, null); + } + + // ain1 = "short2 val" + public result_short2 reduce_my_short2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I16_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short2, new Allocation[]{ain1}, aout, sc); + return new result_short2(aout); + } + + private final static int mExportReduceIdx_my_short4 = 26; + // in1 = "val", flattened 4-vectors + public result_short4 reduce_my_short4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_short4 result = reduce_my_short4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 val" + public result_short4 reduce_my_short4(Allocation ain1) { + return reduce_my_short4(ain1, null); + } + + // ain1 = "short4 val" + public result_short4 reduce_my_short4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I16_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_short4, new Allocation[]{ain1}, aout, sc); + return new result_short4(aout); + } + + private final static int mExportReduceIdx_my_array_short = 27; + // in1 = "val" + public resultArray7_short reduce_my_array_short(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_short result = reduce_my_array_short(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short val" + public resultArray7_short reduce_my_array_short(Allocation ain1) { + return reduce_my_array_short(ain1, null); + } + + // ain1 = "short val" + public resultArray7_short reduce_my_array_short(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16)) { + throw new RSRuntimeException("Type mismatch with I16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I16, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_short, new Allocation[]{ain1}, aout, sc); + return new resultArray7_short(aout); + } + + private final static int mExportReduceIdx_my_array_short2 = 28; + // in1 = "val", flattened 2-vectors + public resultArray7_short2 reduce_my_array_short2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_short2 result = reduce_my_array_short2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short2 val" + public resultArray7_short2 reduce_my_array_short2(Allocation ain1) { + return reduce_my_array_short2(ain1, null); + } + + // ain1 = "short2 val" + public resultArray7_short2 reduce_my_array_short2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_2)) { + throw new RSRuntimeException("Type mismatch with I16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I16_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_short2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_short2(aout); + } + + private final static int mExportReduceIdx_my_array_short4 = 29; + // in1 = "val", flattened 4-vectors + public resultArray7_short4 reduce_my_array_short4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_short4 result = reduce_my_array_short4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "short4 val" + public resultArray7_short4 reduce_my_array_short4(Allocation ain1) { + return reduce_my_array_short4(ain1, null); + } + + // ain1 = "short4 val" + public resultArray7_short4 reduce_my_array_short4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I16_4)) { + throw new RSRuntimeException("Type mismatch with I16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I16_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_short4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_short4(aout); + } + + private final static int mExportReduceIdx_my_int = 30; + // in1 = "val" + public result_int reduce_my_int(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int result = reduce_my_int(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public result_int reduce_my_int(Allocation ain1) { + return reduce_my_int(ain1, null); + } + + // ain1 = "int val" + public result_int reduce_my_int(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + + private final static int mExportReduceIdx_my_int2 = 31; + // in1 = "val", flattened 2-vectors + public result_int2 reduce_my_int2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int2 result = reduce_my_int2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 val" + public result_int2 reduce_my_int2(Allocation ain1) { + return reduce_my_int2(ain1, null); + } + + // ain1 = "int2 val" + public result_int2 reduce_my_int2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int2, new Allocation[]{ain1}, aout, sc); + return new result_int2(aout); + } + + private final static int mExportReduceIdx_my_int4 = 32; + // in1 = "val", flattened 4-vectors + public result_int4 reduce_my_int4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_int4 result = reduce_my_int4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 val" + public result_int4 reduce_my_int4(Allocation ain1) { + return reduce_my_int4(ain1, null); + } + + // ain1 = "int4 val" + public result_int4 reduce_my_int4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_int4, new Allocation[]{ain1}, aout, sc); + return new result_int4(aout); + } + + private final static int mExportReduceIdx_my_array_int = 33; + // in1 = "val" + public resultArray7_int reduce_my_array_int(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_int result = reduce_my_array_int(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int val" + public resultArray7_int reduce_my_array_int(Allocation ain1) { + return reduce_my_array_int(ain1, null); + } + + // ain1 = "int val" + public resultArray7_int reduce_my_array_int(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32)) { + throw new RSRuntimeException("Type mismatch with I32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_int, new Allocation[]{ain1}, aout, sc); + return new resultArray7_int(aout); + } + + private final static int mExportReduceIdx_my_array_int2 = 34; + // in1 = "val", flattened 2-vectors + public resultArray7_int2 reduce_my_array_int2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_int2 result = reduce_my_array_int2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int2 val" + public resultArray7_int2 reduce_my_array_int2(Allocation ain1) { + return reduce_my_array_int2(ain1, null); + } + + // ain1 = "int2 val" + public resultArray7_int2 reduce_my_array_int2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_2)) { + throw new RSRuntimeException("Type mismatch with I32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_int2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_int2(aout); + } + + private final static int mExportReduceIdx_my_array_int4 = 35; + // in1 = "val", flattened 4-vectors + public resultArray7_int4 reduce_my_array_int4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_int4 result = reduce_my_array_int4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "int4 val" + public resultArray7_int4 reduce_my_array_int4(Allocation ain1) { + return reduce_my_array_int4(ain1, null); + } + + // ain1 = "int4 val" + public resultArray7_int4 reduce_my_array_int4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I32_4)) { + throw new RSRuntimeException("Type mismatch with I32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_int4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_int4(aout); + } + + private final static int mExportReduceIdx_my_long = 36; + // in1 = "val" + public result_long reduce_my_long(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_long result = reduce_my_long(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long val" + public result_long reduce_my_long(Allocation ain1) { + return reduce_my_long(ain1, null); + } + + // ain1 = "long val" + public result_long reduce_my_long(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I64, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long, new Allocation[]{ain1}, aout, sc); + return new result_long(aout); + } + + private final static int mExportReduceIdx_my_long2 = 37; + // in1 = "val", flattened 2-vectors + public result_long2 reduce_my_long2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_long2 result = reduce_my_long2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 val" + public result_long2 reduce_my_long2(Allocation ain1) { + return reduce_my_long2(ain1, null); + } + + // ain1 = "long2 val" + public result_long2 reduce_my_long2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I64_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long2, new Allocation[]{ain1}, aout, sc); + return new result_long2(aout); + } + + private final static int mExportReduceIdx_my_long4 = 38; + // in1 = "val", flattened 4-vectors + public result_long4 reduce_my_long4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_long4 result = reduce_my_long4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 val" + public result_long4 reduce_my_long4(Allocation ain1) { + return reduce_my_long4(ain1, null); + } + + // ain1 = "long4 val" + public result_long4 reduce_my_long4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I64_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_long4, new Allocation[]{ain1}, aout, sc); + return new result_long4(aout); + } + + private final static int mExportReduceIdx_my_array_long = 39; + // in1 = "val" + public resultArray7_long reduce_my_array_long(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_long result = reduce_my_array_long(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long val" + public resultArray7_long reduce_my_array_long(Allocation ain1) { + return reduce_my_array_long(ain1, null); + } + + // ain1 = "long val" + public resultArray7_long reduce_my_array_long(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64)) { + throw new RSRuntimeException("Type mismatch with I64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I64, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_long, new Allocation[]{ain1}, aout, sc); + return new resultArray7_long(aout); + } + + private final static int mExportReduceIdx_my_array_long2 = 40; + // in1 = "val", flattened 2-vectors + public resultArray7_long2 reduce_my_array_long2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_long2 result = reduce_my_array_long2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long2 val" + public resultArray7_long2 reduce_my_array_long2(Allocation ain1) { + return reduce_my_array_long2(ain1, null); + } + + // ain1 = "long2 val" + public resultArray7_long2 reduce_my_array_long2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_2)) { + throw new RSRuntimeException("Type mismatch with I64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I64_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_long2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_long2(aout); + } + + private final static int mExportReduceIdx_my_array_long4 = 41; + // in1 = "val", flattened 4-vectors + public resultArray7_long4 reduce_my_array_long4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_long4 result = reduce_my_array_long4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "long4 val" + public resultArray7_long4 reduce_my_array_long4(Allocation ain1) { + return reduce_my_array_long4(ain1, null); + } + + // ain1 = "long4 val" + public resultArray7_long4 reduce_my_array_long4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__I64_4)) { + throw new RSRuntimeException("Type mismatch with I64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I64_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_long4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_long4(aout); + } + + private final static int mExportReduceIdx_my_uchar = 42; + // in1 = "val" + public result_uchar reduce_my_uchar(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_uchar result = reduce_my_uchar(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar val" + public result_uchar reduce_my_uchar(Allocation ain1) { + return reduce_my_uchar(ain1, null); + } + + // ain1 = "uchar val" + public result_uchar reduce_my_uchar(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U8, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar, new Allocation[]{ain1}, aout, sc); + return new result_uchar(aout); + } + + private final static int mExportReduceIdx_my_uchar2 = 43; + // in1 = "val", flattened 2-vectors + public result_uchar2 reduce_my_uchar2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_uchar2 result = reduce_my_uchar2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 val" + public result_uchar2 reduce_my_uchar2(Allocation ain1) { + return reduce_my_uchar2(ain1, null); + } + + // ain1 = "uchar2 val" + public result_uchar2 reduce_my_uchar2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U8_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar2, new Allocation[]{ain1}, aout, sc); + return new result_uchar2(aout); + } + + private final static int mExportReduceIdx_my_uchar4 = 44; + // in1 = "val", flattened 4-vectors + public result_uchar4 reduce_my_uchar4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_uchar4 result = reduce_my_uchar4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 val" + public result_uchar4 reduce_my_uchar4(Allocation ain1) { + return reduce_my_uchar4(ain1, null); + } + + // ain1 = "uchar4 val" + public result_uchar4 reduce_my_uchar4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U8_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uchar4, new Allocation[]{ain1}, aout, sc); + return new result_uchar4(aout); + } + + private final static int mExportReduceIdx_my_array_uchar = 45; + // in1 = "val" + public resultArray7_uchar reduce_my_array_uchar(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_uchar result = reduce_my_array_uchar(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar val" + public resultArray7_uchar reduce_my_array_uchar(Allocation ain1) { + return reduce_my_array_uchar(ain1, null); + } + + // ain1 = "uchar val" + public resultArray7_uchar reduce_my_array_uchar(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8)) { + throw new RSRuntimeException("Type mismatch with U8!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U8, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uchar, new Allocation[]{ain1}, aout, sc); + return new resultArray7_uchar(aout); + } + + private final static int mExportReduceIdx_my_array_uchar2 = 46; + // in1 = "val", flattened 2-vectors + public resultArray7_uchar2 reduce_my_array_uchar2(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_uchar2 result = reduce_my_array_uchar2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar2 val" + public resultArray7_uchar2 reduce_my_array_uchar2(Allocation ain1) { + return reduce_my_array_uchar2(ain1, null); + } + + // ain1 = "uchar2 val" + public resultArray7_uchar2 reduce_my_array_uchar2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_2)) { + throw new RSRuntimeException("Type mismatch with U8_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U8_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uchar2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_uchar2(aout); + } + + private final static int mExportReduceIdx_my_array_uchar4 = 47; + // in1 = "val", flattened 4-vectors + public resultArray7_uchar4 reduce_my_array_uchar4(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_uchar4 result = reduce_my_array_uchar4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uchar4 val" + public resultArray7_uchar4 reduce_my_array_uchar4(Allocation ain1) { + return reduce_my_array_uchar4(ain1, null); + } + + // ain1 = "uchar4 val" + public resultArray7_uchar4 reduce_my_array_uchar4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U8_4)) { + throw new RSRuntimeException("Type mismatch with U8_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U8_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uchar4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_uchar4(aout); + } + + private final static int mExportReduceIdx_my_ushort = 48; + // in1 = "val" + public result_ushort reduce_my_ushort(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_ushort result = reduce_my_ushort(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort val" + public result_ushort reduce_my_ushort(Allocation ain1) { + return reduce_my_ushort(ain1, null); + } + + // ain1 = "ushort val" + public result_ushort reduce_my_ushort(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U16, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort, new Allocation[]{ain1}, aout, sc); + return new result_ushort(aout); + } + + private final static int mExportReduceIdx_my_ushort2 = 49; + // in1 = "val", flattened 2-vectors + public result_ushort2 reduce_my_ushort2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_ushort2 result = reduce_my_ushort2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 val" + public result_ushort2 reduce_my_ushort2(Allocation ain1) { + return reduce_my_ushort2(ain1, null); + } + + // ain1 = "ushort2 val" + public result_ushort2 reduce_my_ushort2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U16_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort2, new Allocation[]{ain1}, aout, sc); + return new result_ushort2(aout); + } + + private final static int mExportReduceIdx_my_ushort4 = 50; + // in1 = "val", flattened 4-vectors + public result_ushort4 reduce_my_ushort4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_ushort4 result = reduce_my_ushort4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 val" + public result_ushort4 reduce_my_ushort4(Allocation ain1) { + return reduce_my_ushort4(ain1, null); + } + + // ain1 = "ushort4 val" + public result_ushort4 reduce_my_ushort4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U16_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ushort4, new Allocation[]{ain1}, aout, sc); + return new result_ushort4(aout); + } + + private final static int mExportReduceIdx_my_array_ushort = 51; + // in1 = "val" + public resultArray7_ushort reduce_my_array_ushort(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_ushort result = reduce_my_array_ushort(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort val" + public resultArray7_ushort reduce_my_array_ushort(Allocation ain1) { + return reduce_my_array_ushort(ain1, null); + } + + // ain1 = "ushort val" + public resultArray7_ushort reduce_my_array_ushort(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16)) { + throw new RSRuntimeException("Type mismatch with U16!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U16, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ushort, new Allocation[]{ain1}, aout, sc); + return new resultArray7_ushort(aout); + } + + private final static int mExportReduceIdx_my_array_ushort2 = 52; + // in1 = "val", flattened 2-vectors + public resultArray7_ushort2 reduce_my_array_ushort2(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_ushort2 result = reduce_my_array_ushort2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort2 val" + public resultArray7_ushort2 reduce_my_array_ushort2(Allocation ain1) { + return reduce_my_array_ushort2(ain1, null); + } + + // ain1 = "ushort2 val" + public resultArray7_ushort2 reduce_my_array_ushort2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_2)) { + throw new RSRuntimeException("Type mismatch with U16_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U16_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ushort2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_ushort2(aout); + } + + private final static int mExportReduceIdx_my_array_ushort4 = 53; + // in1 = "val", flattened 4-vectors + public resultArray7_ushort4 reduce_my_array_ushort4(short[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_ushort4 result = reduce_my_array_ushort4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ushort4 val" + public resultArray7_ushort4 reduce_my_array_ushort4(Allocation ain1) { + return reduce_my_array_ushort4(ain1, null); + } + + // ain1 = "ushort4 val" + public resultArray7_ushort4 reduce_my_array_ushort4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U16_4)) { + throw new RSRuntimeException("Type mismatch with U16_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U16_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ushort4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_ushort4(aout); + } + + private final static int mExportReduceIdx_my_uint = 54; + // in1 = "val" + public result_uint reduce_my_uint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_uint result = reduce_my_uint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint val" + public result_uint reduce_my_uint(Allocation ain1) { + return reduce_my_uint(ain1, null); + } + + // ain1 = "uint val" + public result_uint reduce_my_uint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint, new Allocation[]{ain1}, aout, sc); + return new result_uint(aout); + } + + private final static int mExportReduceIdx_my_uint2 = 55; + // in1 = "val", flattened 2-vectors + public result_uint2 reduce_my_uint2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_uint2 result = reduce_my_uint2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 val" + public result_uint2 reduce_my_uint2(Allocation ain1) { + return reduce_my_uint2(ain1, null); + } + + // ain1 = "uint2 val" + public result_uint2 reduce_my_uint2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint2, new Allocation[]{ain1}, aout, sc); + return new result_uint2(aout); + } + + private final static int mExportReduceIdx_my_uint4 = 56; + // in1 = "val", flattened 4-vectors + public result_uint4 reduce_my_uint4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_uint4 result = reduce_my_uint4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 val" + public result_uint4 reduce_my_uint4(Allocation ain1) { + return reduce_my_uint4(ain1, null); + } + + // ain1 = "uint4 val" + public result_uint4 reduce_my_uint4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_uint4, new Allocation[]{ain1}, aout, sc); + return new result_uint4(aout); + } + + private final static int mExportReduceIdx_my_array_uint = 57; + // in1 = "val" + public resultArray7_uint reduce_my_array_uint(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_uint result = reduce_my_array_uint(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint val" + public resultArray7_uint reduce_my_array_uint(Allocation ain1) { + return reduce_my_array_uint(ain1, null); + } + + // ain1 = "uint val" + public resultArray7_uint reduce_my_array_uint(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32)) { + throw new RSRuntimeException("Type mismatch with U32!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uint, new Allocation[]{ain1}, aout, sc); + return new resultArray7_uint(aout); + } + + private final static int mExportReduceIdx_my_array_uint2 = 58; + // in1 = "val", flattened 2-vectors + public resultArray7_uint2 reduce_my_array_uint2(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_uint2 result = reduce_my_array_uint2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint2 val" + public resultArray7_uint2 reduce_my_array_uint2(Allocation ain1) { + return reduce_my_array_uint2(ain1, null); + } + + // ain1 = "uint2 val" + public resultArray7_uint2 reduce_my_array_uint2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_2)) { + throw new RSRuntimeException("Type mismatch with U32_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uint2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_uint2(aout); + } + + private final static int mExportReduceIdx_my_array_uint4 = 59; + // in1 = "val", flattened 4-vectors + public resultArray7_uint4 reduce_my_array_uint4(int[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_uint4 result = reduce_my_array_uint4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "uint4 val" + public resultArray7_uint4 reduce_my_array_uint4(Allocation ain1) { + return reduce_my_array_uint4(ain1, null); + } + + // ain1 = "uint4 val" + public resultArray7_uint4 reduce_my_array_uint4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U32_4)) { + throw new RSRuntimeException("Type mismatch with U32_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U32_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_uint4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_uint4(aout); + } + + private final static int mExportReduceIdx_my_ulong = 60; + // in1 = "val" + public result_ulong reduce_my_ulong(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_ulong result = reduce_my_ulong(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong val" + public result_ulong reduce_my_ulong(Allocation ain1) { + return reduce_my_ulong(ain1, null); + } + + // ain1 = "ulong val" + public result_ulong reduce_my_ulong(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U64, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong, new Allocation[]{ain1}, aout, sc); + return new result_ulong(aout); + } + + private final static int mExportReduceIdx_my_ulong2 = 61; + // in1 = "val", flattened 2-vectors + public result_ulong2 reduce_my_ulong2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_ulong2 result = reduce_my_ulong2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 val" + public result_ulong2 reduce_my_ulong2(Allocation ain1) { + return reduce_my_ulong2(ain1, null); + } + + // ain1 = "ulong2 val" + public result_ulong2 reduce_my_ulong2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U64_2, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong2, new Allocation[]{ain1}, aout, sc); + return new result_ulong2(aout); + } + + private final static int mExportReduceIdx_my_ulong4 = 62; + // in1 = "val", flattened 4-vectors + public result_ulong4 reduce_my_ulong4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_ulong4 result = reduce_my_ulong4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 val" + public result_ulong4 reduce_my_ulong4(Allocation ain1) { + return reduce_my_ulong4(ain1, null); + } + + // ain1 = "ulong4 val" + public result_ulong4 reduce_my_ulong4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U64_4, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_ulong4, new Allocation[]{ain1}, aout, sc); + return new result_ulong4(aout); + } + + private final static int mExportReduceIdx_my_array_ulong = 63; + // in1 = "val" + public resultArray7_ulong reduce_my_array_ulong(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_ulong result = reduce_my_array_ulong(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong val" + public resultArray7_ulong reduce_my_array_ulong(Allocation ain1) { + return reduce_my_array_ulong(ain1, null); + } + + // ain1 = "ulong val" + public resultArray7_ulong reduce_my_array_ulong(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64)) { + throw new RSRuntimeException("Type mismatch with U64!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U64, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ulong, new Allocation[]{ain1}, aout, sc); + return new resultArray7_ulong(aout); + } + + private final static int mExportReduceIdx_my_array_ulong2 = 64; + // in1 = "val", flattened 2-vectors + public resultArray7_ulong2 reduce_my_array_ulong2(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 2 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_ulong2 result = reduce_my_array_ulong2(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong2 val" + public resultArray7_ulong2 reduce_my_array_ulong2(Allocation ain1) { + return reduce_my_array_ulong2(ain1, null); + } + + // ain1 = "ulong2 val" + public resultArray7_ulong2 reduce_my_array_ulong2(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_2)) { + throw new RSRuntimeException("Type mismatch with U64_2!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U64_2, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ulong2, new Allocation[]{ain1}, aout, sc); + return new resultArray7_ulong2(aout); + } + + private final static int mExportReduceIdx_my_array_ulong4 = 65; + // in1 = "val", flattened 4-vectors + public resultArray7_ulong4 reduce_my_array_ulong4(long[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + // Verify that the array length is a multiple of the vector size. + if (in1.length % 4 != 0) { + throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_ulong4 result = reduce_my_array_ulong4(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "ulong4 val" + public resultArray7_ulong4 reduce_my_array_ulong4(Allocation ain1) { + return reduce_my_array_ulong4(ain1, null); + } + + // ain1 = "ulong4 val" + public resultArray7_ulong4 reduce_my_array_ulong4(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__U64_4)) { + throw new RSRuntimeException("Type mismatch with U64_4!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __U64_4, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_ulong4, new Allocation[]{ain1}, aout, sc); + return new resultArray7_ulong4(aout); + } + + private final static int mExportReduceIdx_my_bool = 66; + // in1 = "val" + public result_bool reduce_my_bool(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + result_bool result = reduce_my_bool(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool val" + public result_bool reduce_my_bool(Allocation ain1) { + return reduce_my_bool(ain1, null); + } + + // ain1 = "bool val" + public result_bool reduce_my_bool(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __BOOLEAN, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_bool, new Allocation[]{ain1}, aout, sc); + return new result_bool(aout); + } + + private final static int mExportReduceIdx_my_array_bool = 67; + // in1 = "val" + public resultArray7_bool reduce_my_array_bool(byte[] in1) { + // Verify that "in1" is non-null. + if (in1 == null) { + throw new RSIllegalArgumentException("Array \"in1\" is null!"); + } + Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); + ain1.setAutoPadding(true); + ain1.copyFrom(in1); + + resultArray7_bool result = reduce_my_array_bool(ain1, null); + result.mTempIns = new Allocation[]{ain1}; + return result; + } + + // ain1 = "bool val" + public resultArray7_bool reduce_my_array_bool(Allocation ain1) { + return reduce_my_array_bool(ain1, null); + } + + // ain1 = "bool val" + public resultArray7_bool reduce_my_array_bool(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { + throw new RSRuntimeException("Type mismatch with BOOLEAN!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __BOOLEAN, 7); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_my_array_bool, new Allocation[]{ain1}, aout, sc); + return new resultArray7_bool(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_result/ScriptField_MyStruct.java.expect b/slang/tests/P_reduce_general_result/ScriptField_MyStruct.java.expect new file mode 100644 index 0000000..9943781 --- /dev/null +++ b/slang/tests/P_reduce_general_result/ScriptField_MyStruct.java.expect
@@ -0,0 +1,200 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_result.rs + */ + +package result; + +import android.renderscript.*; +import result.reduce_general_resultBitCode; + +/** + * @hide + */ +public class ScriptField_MyStruct extends android.renderscript.Script.FieldBase { + static public class Item { + + float f; + double d; + + Item() { + } + + } + + private Item mItemArray[]; + private FieldPacker mIOBuffer; + private static java.lang.ref.WeakReference<Element> mElementCache = new java.lang.ref.WeakReference<Element>(null); + public static Element createElement(RenderScript rs) { + Element.Builder eb = new Element.Builder(rs); + eb.add(Element.F32(rs), "f"); + eb.add(Element.U32(rs), "#rs_padding_1"); + eb.add(Element.F64(rs), "d"); + return eb.create(); + } + + private ScriptField_MyStruct(RenderScript rs) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + } + + public ScriptField_MyStruct(RenderScript rs, int count) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + init(rs, count); + } + + public ScriptField_MyStruct(RenderScript rs, int count, int usages) { + mItemArray = null; + mIOBuffer = null; + mElement = createElement(rs); + init(rs, count, usages); + } + + public static ScriptField_MyStruct create1D(RenderScript rs, int dimX, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + obj.mAllocation = Allocation.createSized(rs, obj.mElement, dimX, usages); + return obj; + } + + public static ScriptField_MyStruct create1D(RenderScript rs, int dimX) { + return create1D(rs, dimX, Allocation.USAGE_SCRIPT); + } + + public static ScriptField_MyStruct create2D(RenderScript rs, int dimX, int dimY) { + return create2D(rs, dimX, dimY, Allocation.USAGE_SCRIPT); + } + + public static ScriptField_MyStruct create2D(RenderScript rs, int dimX, int dimY, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + Type.Builder b = new Type.Builder(rs, obj.mElement); + b.setX(dimX); + b.setY(dimY); + Type t = b.create(); + obj.mAllocation = Allocation.createTyped(rs, t, usages); + return obj; + } + + public static Type.Builder createTypeBuilder(RenderScript rs) { + Element e = createElement(rs); + return new Type.Builder(rs, e); + } + + public static ScriptField_MyStruct createCustom(RenderScript rs, Type.Builder tb, int usages) { + ScriptField_MyStruct obj = new ScriptField_MyStruct(rs); + Type t = tb.create(); + if (t.getElement() != obj.mElement) { + throw new RSIllegalArgumentException("Type.Builder did not match expected element type."); + } + obj.mAllocation = Allocation.createTyped(rs, t, usages); + return obj; + } + + private void copyToArrayLocal(Item i, FieldPacker fp) { + fp.addF32(i.f); + fp.skip(4); + fp.addF64(i.d); + } + + private void copyToArray(Item i, int index) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + mIOBuffer.reset(index * mElement.getBytesSize()); + copyToArrayLocal(i, mIOBuffer); + } + + public synchronized void set(Item i, int index, boolean copyNow) { + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + mItemArray[index] = i; + if (copyNow) { + copyToArray(i, index); + FieldPacker fp = new FieldPacker(mElement.getBytesSize()); + copyToArrayLocal(i, fp); + mAllocation.setFromFieldPacker(index, fp); + } + + } + + public synchronized Item get(int index) { + if (mItemArray == null) return null; + return mItemArray[index]; + } + + public synchronized void set_f(int index, float v, boolean copyNow) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + if (mItemArray[index] == null) mItemArray[index] = new Item(); + mItemArray[index].f = v; + if (copyNow) { + mIOBuffer.reset(index * mElement.getBytesSize()); + mIOBuffer.addF32(v); + FieldPacker fp = new FieldPacker(4); + fp.addF32(v); + mAllocation.setFromFieldPacker(index, 0, fp); + } + + } + + public synchronized void set_d(int index, double v, boolean copyNow) { + if (mIOBuffer == null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */]; + if (mItemArray[index] == null) mItemArray[index] = new Item(); + mItemArray[index].d = v; + if (copyNow) { + mIOBuffer.reset(index * mElement.getBytesSize() + 8); + mIOBuffer.addF64(v); + FieldPacker fp = new FieldPacker(8); + fp.addF64(v); + mAllocation.setFromFieldPacker(index, 2, fp); + } + + } + + public synchronized float get_f(int index) { + if (mItemArray == null) return 0; + return mItemArray[index].f; + } + + public synchronized double get_d(int index) { + if (mItemArray == null) return 0; + return mItemArray[index].d; + } + + public synchronized void copyAll() { + for (int ct = 0; ct < mItemArray.length; ct++) copyToArray(mItemArray[ct], ct); + mAllocation.setFromFieldPacker(0, mIOBuffer); + } + + public synchronized void resize(int newSize) { + if (mItemArray != null) { + int oldSize = mItemArray.length; + int copySize = Math.min(oldSize, newSize); + if (newSize == oldSize) return; + Item ni[] = new Item[newSize]; + System.arraycopy(mItemArray, 0, ni, 0, copySize); + mItemArray = ni; + } + + mAllocation.resize(newSize); + if (mIOBuffer != null) mIOBuffer = new FieldPacker(mElement.getBytesSize() * getType().getX()/* count */); + } + +} +
diff --git a/slang/tests/P_reduce_general_result/gen-result.pl b/slang/tests/P_reduce_general_result/gen-result.pl new file mode 100755 index 0000000..66dad34 --- /dev/null +++ b/slang/tests/P_reduce_general_result/gen-result.pl
@@ -0,0 +1,47 @@ +#!/usr/bin/perl -w + +# Generate trivial test cases to exercise result types. + +use strict; + +my @basicTypes = ("half", "float", "double", + "char", "short", "int", "long", + "uchar", "ushort", "uint", "ulong", + "bool", + "MyStruct"); + +# 1 signifies non-vector +# 3 is not supported for exported types +my @vecLengths = (1, 2, 4); + +print "// -Wall -Werror\n"; +print "#pragma version(1)\n"; +print "#pragma rs java_package_name(result)\n\n"; +print "// This test case was created by $0.\n"; +print "// It exercises all legal Java-reflectable result types, so that we can ensure\n"; +print "// (a) We do not choke when compiling them\n"; +print "// (b) We reflect them correctly\n\n"; +print "// One example struct type\n"; +print "typedef struct MyStruct { float f; double d; } MyStruct;\n"; + +foreach my $basicType (@basicTypes) { + for (my $isArray = 0; $isArray <= 1; ++$isArray) { + foreach my $vecLen (@vecLengths) { + + # There are no bool vectors or struct vectors + next if ($vecLen > 1) && (($basicType eq "bool") || ($basicType eq "MyStruct")); + + my $eltName = $basicType; + $eltName .= $vecLen if ($vecLen > 1); + my $resultName = ($isArray ? "array_${eltName}" : $eltName); + my $reduceName = "my_${resultName}"; + my $accumName = "${reduceName}_accum"; + my $combName = "${reduceName}_comb"; + print "\n"; + print "#pragma rs reduce(${reduceName}) accumulator(${accumName}) combiner(${combName})\n"; + print "typedef ${eltName} ${resultName}[7];\n" if ($isArray); + print "static void ${accumName}(${resultName} *accum, ${eltName} val) { }\n"; + print "static void ${combName}(${resultName} *accum, const ${resultName} *other) { }\n"; + } + } +}
diff --git a/slang/tests/P_reduce_general_result/reduce_general_result.rs b/slang/tests/P_reduce_general_result/reduce_general_result.rs new file mode 100644 index 0000000..06c38bc --- /dev/null +++ b/slang/tests/P_reduce_general_result/reduce_general_result.rs
@@ -0,0 +1,326 @@ +// -Wall -Werror +#pragma version(1) +#pragma rs java_package_name(result) + +// This test case was created by ./gen-result.pl. +// It exercises all legal Java-reflectable result types, so that we can ensure +// (a) We do not choke when compiling them +// (b) We reflect them correctly + +// One example struct type +typedef struct MyStruct { float f; double d; } MyStruct; + +#pragma rs reduce(my_half) accumulator(my_half_accum) combiner(my_half_comb) +static void my_half_accum(half *accum, half val) { } +static void my_half_comb(half *accum, const half *other) { } + +#pragma rs reduce(my_half2) accumulator(my_half2_accum) combiner(my_half2_comb) +static void my_half2_accum(half2 *accum, half2 val) { } +static void my_half2_comb(half2 *accum, const half2 *other) { } + +#pragma rs reduce(my_half4) accumulator(my_half4_accum) combiner(my_half4_comb) +static void my_half4_accum(half4 *accum, half4 val) { } +static void my_half4_comb(half4 *accum, const half4 *other) { } + +#pragma rs reduce(my_array_half) accumulator(my_array_half_accum) combiner(my_array_half_comb) +typedef half array_half[7]; +static void my_array_half_accum(array_half *accum, half val) { } +static void my_array_half_comb(array_half *accum, const array_half *other) { } + +#pragma rs reduce(my_array_half2) accumulator(my_array_half2_accum) combiner(my_array_half2_comb) +typedef half2 array_half2[7]; +static void my_array_half2_accum(array_half2 *accum, half2 val) { } +static void my_array_half2_comb(array_half2 *accum, const array_half2 *other) { } + +#pragma rs reduce(my_array_half4) accumulator(my_array_half4_accum) combiner(my_array_half4_comb) +typedef half4 array_half4[7]; +static void my_array_half4_accum(array_half4 *accum, half4 val) { } +static void my_array_half4_comb(array_half4 *accum, const array_half4 *other) { } + +#pragma rs reduce(my_float) accumulator(my_float_accum) combiner(my_float_comb) +static void my_float_accum(float *accum, float val) { } +static void my_float_comb(float *accum, const float *other) { } + +#pragma rs reduce(my_float2) accumulator(my_float2_accum) combiner(my_float2_comb) +static void my_float2_accum(float2 *accum, float2 val) { } +static void my_float2_comb(float2 *accum, const float2 *other) { } + +#pragma rs reduce(my_float4) accumulator(my_float4_accum) combiner(my_float4_comb) +static void my_float4_accum(float4 *accum, float4 val) { } +static void my_float4_comb(float4 *accum, const float4 *other) { } + +#pragma rs reduce(my_array_float) accumulator(my_array_float_accum) combiner(my_array_float_comb) +typedef float array_float[7]; +static void my_array_float_accum(array_float *accum, float val) { } +static void my_array_float_comb(array_float *accum, const array_float *other) { } + +#pragma rs reduce(my_array_float2) accumulator(my_array_float2_accum) combiner(my_array_float2_comb) +typedef float2 array_float2[7]; +static void my_array_float2_accum(array_float2 *accum, float2 val) { } +static void my_array_float2_comb(array_float2 *accum, const array_float2 *other) { } + +#pragma rs reduce(my_array_float4) accumulator(my_array_float4_accum) combiner(my_array_float4_comb) +typedef float4 array_float4[7]; +static void my_array_float4_accum(array_float4 *accum, float4 val) { } +static void my_array_float4_comb(array_float4 *accum, const array_float4 *other) { } + +#pragma rs reduce(my_double) accumulator(my_double_accum) combiner(my_double_comb) +static void my_double_accum(double *accum, double val) { } +static void my_double_comb(double *accum, const double *other) { } + +#pragma rs reduce(my_double2) accumulator(my_double2_accum) combiner(my_double2_comb) +static void my_double2_accum(double2 *accum, double2 val) { } +static void my_double2_comb(double2 *accum, const double2 *other) { } + +#pragma rs reduce(my_double4) accumulator(my_double4_accum) combiner(my_double4_comb) +static void my_double4_accum(double4 *accum, double4 val) { } +static void my_double4_comb(double4 *accum, const double4 *other) { } + +#pragma rs reduce(my_array_double) accumulator(my_array_double_accum) combiner(my_array_double_comb) +typedef double array_double[7]; +static void my_array_double_accum(array_double *accum, double val) { } +static void my_array_double_comb(array_double *accum, const array_double *other) { } + +#pragma rs reduce(my_array_double2) accumulator(my_array_double2_accum) combiner(my_array_double2_comb) +typedef double2 array_double2[7]; +static void my_array_double2_accum(array_double2 *accum, double2 val) { } +static void my_array_double2_comb(array_double2 *accum, const array_double2 *other) { } + +#pragma rs reduce(my_array_double4) accumulator(my_array_double4_accum) combiner(my_array_double4_comb) +typedef double4 array_double4[7]; +static void my_array_double4_accum(array_double4 *accum, double4 val) { } +static void my_array_double4_comb(array_double4 *accum, const array_double4 *other) { } + +#pragma rs reduce(my_char) accumulator(my_char_accum) combiner(my_char_comb) +static void my_char_accum(char *accum, char val) { } +static void my_char_comb(char *accum, const char *other) { } + +#pragma rs reduce(my_char2) accumulator(my_char2_accum) combiner(my_char2_comb) +static void my_char2_accum(char2 *accum, char2 val) { } +static void my_char2_comb(char2 *accum, const char2 *other) { } + +#pragma rs reduce(my_char4) accumulator(my_char4_accum) combiner(my_char4_comb) +static void my_char4_accum(char4 *accum, char4 val) { } +static void my_char4_comb(char4 *accum, const char4 *other) { } + +#pragma rs reduce(my_array_char) accumulator(my_array_char_accum) combiner(my_array_char_comb) +typedef char array_char[7]; +static void my_array_char_accum(array_char *accum, char val) { } +static void my_array_char_comb(array_char *accum, const array_char *other) { } + +#pragma rs reduce(my_array_char2) accumulator(my_array_char2_accum) combiner(my_array_char2_comb) +typedef char2 array_char2[7]; +static void my_array_char2_accum(array_char2 *accum, char2 val) { } +static void my_array_char2_comb(array_char2 *accum, const array_char2 *other) { } + +#pragma rs reduce(my_array_char4) accumulator(my_array_char4_accum) combiner(my_array_char4_comb) +typedef char4 array_char4[7]; +static void my_array_char4_accum(array_char4 *accum, char4 val) { } +static void my_array_char4_comb(array_char4 *accum, const array_char4 *other) { } + +#pragma rs reduce(my_short) accumulator(my_short_accum) combiner(my_short_comb) +static void my_short_accum(short *accum, short val) { } +static void my_short_comb(short *accum, const short *other) { } + +#pragma rs reduce(my_short2) accumulator(my_short2_accum) combiner(my_short2_comb) +static void my_short2_accum(short2 *accum, short2 val) { } +static void my_short2_comb(short2 *accum, const short2 *other) { } + +#pragma rs reduce(my_short4) accumulator(my_short4_accum) combiner(my_short4_comb) +static void my_short4_accum(short4 *accum, short4 val) { } +static void my_short4_comb(short4 *accum, const short4 *other) { } + +#pragma rs reduce(my_array_short) accumulator(my_array_short_accum) combiner(my_array_short_comb) +typedef short array_short[7]; +static void my_array_short_accum(array_short *accum, short val) { } +static void my_array_short_comb(array_short *accum, const array_short *other) { } + +#pragma rs reduce(my_array_short2) accumulator(my_array_short2_accum) combiner(my_array_short2_comb) +typedef short2 array_short2[7]; +static void my_array_short2_accum(array_short2 *accum, short2 val) { } +static void my_array_short2_comb(array_short2 *accum, const array_short2 *other) { } + +#pragma rs reduce(my_array_short4) accumulator(my_array_short4_accum) combiner(my_array_short4_comb) +typedef short4 array_short4[7]; +static void my_array_short4_accum(array_short4 *accum, short4 val) { } +static void my_array_short4_comb(array_short4 *accum, const array_short4 *other) { } + +#pragma rs reduce(my_int) accumulator(my_int_accum) combiner(my_int_comb) +static void my_int_accum(int *accum, int val) { } +static void my_int_comb(int *accum, const int *other) { } + +#pragma rs reduce(my_int2) accumulator(my_int2_accum) combiner(my_int2_comb) +static void my_int2_accum(int2 *accum, int2 val) { } +static void my_int2_comb(int2 *accum, const int2 *other) { } + +#pragma rs reduce(my_int4) accumulator(my_int4_accum) combiner(my_int4_comb) +static void my_int4_accum(int4 *accum, int4 val) { } +static void my_int4_comb(int4 *accum, const int4 *other) { } + +#pragma rs reduce(my_array_int) accumulator(my_array_int_accum) combiner(my_array_int_comb) +typedef int array_int[7]; +static void my_array_int_accum(array_int *accum, int val) { } +static void my_array_int_comb(array_int *accum, const array_int *other) { } + +#pragma rs reduce(my_array_int2) accumulator(my_array_int2_accum) combiner(my_array_int2_comb) +typedef int2 array_int2[7]; +static void my_array_int2_accum(array_int2 *accum, int2 val) { } +static void my_array_int2_comb(array_int2 *accum, const array_int2 *other) { } + +#pragma rs reduce(my_array_int4) accumulator(my_array_int4_accum) combiner(my_array_int4_comb) +typedef int4 array_int4[7]; +static void my_array_int4_accum(array_int4 *accum, int4 val) { } +static void my_array_int4_comb(array_int4 *accum, const array_int4 *other) { } + +#pragma rs reduce(my_long) accumulator(my_long_accum) combiner(my_long_comb) +static void my_long_accum(long *accum, long val) { } +static void my_long_comb(long *accum, const long *other) { } + +#pragma rs reduce(my_long2) accumulator(my_long2_accum) combiner(my_long2_comb) +static void my_long2_accum(long2 *accum, long2 val) { } +static void my_long2_comb(long2 *accum, const long2 *other) { } + +#pragma rs reduce(my_long4) accumulator(my_long4_accum) combiner(my_long4_comb) +static void my_long4_accum(long4 *accum, long4 val) { } +static void my_long4_comb(long4 *accum, const long4 *other) { } + +#pragma rs reduce(my_array_long) accumulator(my_array_long_accum) combiner(my_array_long_comb) +typedef long array_long[7]; +static void my_array_long_accum(array_long *accum, long val) { } +static void my_array_long_comb(array_long *accum, const array_long *other) { } + +#pragma rs reduce(my_array_long2) accumulator(my_array_long2_accum) combiner(my_array_long2_comb) +typedef long2 array_long2[7]; +static void my_array_long2_accum(array_long2 *accum, long2 val) { } +static void my_array_long2_comb(array_long2 *accum, const array_long2 *other) { } + +#pragma rs reduce(my_array_long4) accumulator(my_array_long4_accum) combiner(my_array_long4_comb) +typedef long4 array_long4[7]; +static void my_array_long4_accum(array_long4 *accum, long4 val) { } +static void my_array_long4_comb(array_long4 *accum, const array_long4 *other) { } + +#pragma rs reduce(my_uchar) accumulator(my_uchar_accum) combiner(my_uchar_comb) +static void my_uchar_accum(uchar *accum, uchar val) { } +static void my_uchar_comb(uchar *accum, const uchar *other) { } + +#pragma rs reduce(my_uchar2) accumulator(my_uchar2_accum) combiner(my_uchar2_comb) +static void my_uchar2_accum(uchar2 *accum, uchar2 val) { } +static void my_uchar2_comb(uchar2 *accum, const uchar2 *other) { } + +#pragma rs reduce(my_uchar4) accumulator(my_uchar4_accum) combiner(my_uchar4_comb) +static void my_uchar4_accum(uchar4 *accum, uchar4 val) { } +static void my_uchar4_comb(uchar4 *accum, const uchar4 *other) { } + +#pragma rs reduce(my_array_uchar) accumulator(my_array_uchar_accum) combiner(my_array_uchar_comb) +typedef uchar array_uchar[7]; +static void my_array_uchar_accum(array_uchar *accum, uchar val) { } +static void my_array_uchar_comb(array_uchar *accum, const array_uchar *other) { } + +#pragma rs reduce(my_array_uchar2) accumulator(my_array_uchar2_accum) combiner(my_array_uchar2_comb) +typedef uchar2 array_uchar2[7]; +static void my_array_uchar2_accum(array_uchar2 *accum, uchar2 val) { } +static void my_array_uchar2_comb(array_uchar2 *accum, const array_uchar2 *other) { } + +#pragma rs reduce(my_array_uchar4) accumulator(my_array_uchar4_accum) combiner(my_array_uchar4_comb) +typedef uchar4 array_uchar4[7]; +static void my_array_uchar4_accum(array_uchar4 *accum, uchar4 val) { } +static void my_array_uchar4_comb(array_uchar4 *accum, const array_uchar4 *other) { } + +#pragma rs reduce(my_ushort) accumulator(my_ushort_accum) combiner(my_ushort_comb) +static void my_ushort_accum(ushort *accum, ushort val) { } +static void my_ushort_comb(ushort *accum, const ushort *other) { } + +#pragma rs reduce(my_ushort2) accumulator(my_ushort2_accum) combiner(my_ushort2_comb) +static void my_ushort2_accum(ushort2 *accum, ushort2 val) { } +static void my_ushort2_comb(ushort2 *accum, const ushort2 *other) { } + +#pragma rs reduce(my_ushort4) accumulator(my_ushort4_accum) combiner(my_ushort4_comb) +static void my_ushort4_accum(ushort4 *accum, ushort4 val) { } +static void my_ushort4_comb(ushort4 *accum, const ushort4 *other) { } + +#pragma rs reduce(my_array_ushort) accumulator(my_array_ushort_accum) combiner(my_array_ushort_comb) +typedef ushort array_ushort[7]; +static void my_array_ushort_accum(array_ushort *accum, ushort val) { } +static void my_array_ushort_comb(array_ushort *accum, const array_ushort *other) { } + +#pragma rs reduce(my_array_ushort2) accumulator(my_array_ushort2_accum) combiner(my_array_ushort2_comb) +typedef ushort2 array_ushort2[7]; +static void my_array_ushort2_accum(array_ushort2 *accum, ushort2 val) { } +static void my_array_ushort2_comb(array_ushort2 *accum, const array_ushort2 *other) { } + +#pragma rs reduce(my_array_ushort4) accumulator(my_array_ushort4_accum) combiner(my_array_ushort4_comb) +typedef ushort4 array_ushort4[7]; +static void my_array_ushort4_accum(array_ushort4 *accum, ushort4 val) { } +static void my_array_ushort4_comb(array_ushort4 *accum, const array_ushort4 *other) { } + +#pragma rs reduce(my_uint) accumulator(my_uint_accum) combiner(my_uint_comb) +static void my_uint_accum(uint *accum, uint val) { } +static void my_uint_comb(uint *accum, const uint *other) { } + +#pragma rs reduce(my_uint2) accumulator(my_uint2_accum) combiner(my_uint2_comb) +static void my_uint2_accum(uint2 *accum, uint2 val) { } +static void my_uint2_comb(uint2 *accum, const uint2 *other) { } + +#pragma rs reduce(my_uint4) accumulator(my_uint4_accum) combiner(my_uint4_comb) +static void my_uint4_accum(uint4 *accum, uint4 val) { } +static void my_uint4_comb(uint4 *accum, const uint4 *other) { } + +#pragma rs reduce(my_array_uint) accumulator(my_array_uint_accum) combiner(my_array_uint_comb) +typedef uint array_uint[7]; +static void my_array_uint_accum(array_uint *accum, uint val) { } +static void my_array_uint_comb(array_uint *accum, const array_uint *other) { } + +#pragma rs reduce(my_array_uint2) accumulator(my_array_uint2_accum) combiner(my_array_uint2_comb) +typedef uint2 array_uint2[7]; +static void my_array_uint2_accum(array_uint2 *accum, uint2 val) { } +static void my_array_uint2_comb(array_uint2 *accum, const array_uint2 *other) { } + +#pragma rs reduce(my_array_uint4) accumulator(my_array_uint4_accum) combiner(my_array_uint4_comb) +typedef uint4 array_uint4[7]; +static void my_array_uint4_accum(array_uint4 *accum, uint4 val) { } +static void my_array_uint4_comb(array_uint4 *accum, const array_uint4 *other) { } + +#pragma rs reduce(my_ulong) accumulator(my_ulong_accum) combiner(my_ulong_comb) +static void my_ulong_accum(ulong *accum, ulong val) { } +static void my_ulong_comb(ulong *accum, const ulong *other) { } + +#pragma rs reduce(my_ulong2) accumulator(my_ulong2_accum) combiner(my_ulong2_comb) +static void my_ulong2_accum(ulong2 *accum, ulong2 val) { } +static void my_ulong2_comb(ulong2 *accum, const ulong2 *other) { } + +#pragma rs reduce(my_ulong4) accumulator(my_ulong4_accum) combiner(my_ulong4_comb) +static void my_ulong4_accum(ulong4 *accum, ulong4 val) { } +static void my_ulong4_comb(ulong4 *accum, const ulong4 *other) { } + +#pragma rs reduce(my_array_ulong) accumulator(my_array_ulong_accum) combiner(my_array_ulong_comb) +typedef ulong array_ulong[7]; +static void my_array_ulong_accum(array_ulong *accum, ulong val) { } +static void my_array_ulong_comb(array_ulong *accum, const array_ulong *other) { } + +#pragma rs reduce(my_array_ulong2) accumulator(my_array_ulong2_accum) combiner(my_array_ulong2_comb) +typedef ulong2 array_ulong2[7]; +static void my_array_ulong2_accum(array_ulong2 *accum, ulong2 val) { } +static void my_array_ulong2_comb(array_ulong2 *accum, const array_ulong2 *other) { } + +#pragma rs reduce(my_array_ulong4) accumulator(my_array_ulong4_accum) combiner(my_array_ulong4_comb) +typedef ulong4 array_ulong4[7]; +static void my_array_ulong4_accum(array_ulong4 *accum, ulong4 val) { } +static void my_array_ulong4_comb(array_ulong4 *accum, const array_ulong4 *other) { } + +#pragma rs reduce(my_bool) accumulator(my_bool_accum) combiner(my_bool_comb) +static void my_bool_accum(bool *accum, bool val) { } +static void my_bool_comb(bool *accum, const bool *other) { } + +#pragma rs reduce(my_array_bool) accumulator(my_array_bool_accum) combiner(my_array_bool_comb) +typedef bool array_bool[7]; +static void my_array_bool_accum(array_bool *accum, bool val) { } +static void my_array_bool_comb(array_bool *accum, const array_bool *other) { } + +#pragma rs reduce(my_MyStruct) accumulator(my_MyStruct_accum) combiner(my_MyStruct_comb) +static void my_MyStruct_accum(MyStruct *accum, MyStruct val) { } +static void my_MyStruct_comb(MyStruct *accum, const MyStruct *other) { } + +#pragma rs reduce(my_array_MyStruct) accumulator(my_array_MyStruct_accum) combiner(my_array_MyStruct_comb) +typedef MyStruct array_MyStruct[7]; +static void my_array_MyStruct_accum(array_MyStruct *accum, MyStruct val) { } +static void my_array_MyStruct_comb(array_MyStruct *accum, const array_MyStruct *other) { }
diff --git a/slang/tests/P_reduce_general_result/stderr.txt.expect b/slang/tests/P_reduce_general_result/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_result/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_result/stdout.txt.expect b/slang/tests/P_reduce_general_result/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_result/stdout.txt.expect
diff --git a/slang/tests/P_reduce_general_struct/ScriptC_reduce_general_struct.java.expect b/slang/tests/P_reduce_general_struct/ScriptC_reduce_general_struct.java.expect new file mode 100644 index 0000000..983ea39 --- /dev/null +++ b/slang/tests/P_reduce_general_struct/ScriptC_reduce_general_struct.java.expect
@@ -0,0 +1,101 @@ +/* + * Copyright (C) 2011-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file is auto-generated. DO NOT MODIFY! + * The source Renderscript file: reduce_general_struct.rs + */ + +package struct; + +import android.renderscript.*; +import struct.reduce_general_structBitCode; + +/** + * @hide + */ +public class ScriptC_reduce_general_struct extends ScriptC { + private static final String __rs_resource_name = "reduce_general_struct"; + // Constructor + public ScriptC_reduce_general_struct(RenderScript rs) { + super(rs, + __rs_resource_name, + reduce_general_structBitCode.getBitCode32(), + reduce_general_structBitCode.getBitCode64()); + mRSLocal = rs; + __I32 = Element.I32(rs); + __ScriptField_MyStruct = ScriptField_MyStruct.createElement(rs); + } + + private Element __I32; + private Element __ScriptField_MyStruct; + private RenderScript mRSLocal; + // To obtain the result, invoke get(), which blocks + // until the asynchronously-launched operation has completed. + public static class result_int { + public int get() { + if (!mGotResult) { + int[] outArray = new int[1]; + mOut.copyTo(outArray); + mResult = outArray[0]; + mOut.destroy(); + mOut = null; // make Java object eligible for garbage collection + if (mTempIns != null) { + for (Allocation tempIn : mTempIns) { + tempIn.destroy(); + } + + mTempIns = null; // make Java objects eligible for garbage collection + } + + mGotResult = true; + } + + return mResult; + } + + private result_int(Allocation out) { + mTempIns = null; + mOut = out; + mGotResult = false; + } + + private Allocation[] mTempIns; + private Allocation mOut; + private boolean mGotResult; + private int mResult; + } + + private final static int mExportReduceIdx_inStruct = 0; + // ain1 = "/* struct <> */ val" + public result_int reduce_inStruct(Allocation ain1) { + return reduce_inStruct(ain1, null); + } + + // ain1 = "/* struct <> */ val" + public result_int reduce_inStruct(Allocation ain1, Script.LaunchOptions sc) { + // check ain1 + if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) { + throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!"); + } + Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); + aout.setAutoPadding(true); + reduce(mExportReduceIdx_inStruct, new Allocation[]{ain1}, aout, sc); + return new result_int(aout); + } + +} +
diff --git a/slang/tests/P_reduce_general_struct/reduce_general_struct.rs b/slang/tests/P_reduce_general_struct/reduce_general_struct.rs new file mode 100644 index 0000000..ac6951e --- /dev/null +++ b/slang/tests/P_reduce_general_struct/reduce_general_struct.rs
@@ -0,0 +1,15 @@ +// -target-api 0 -Wall +#pragma version(1) +#pragma rs java_package_name(struct) + +typedef struct MyStruct { int f; } MyStruct; + +// No Java array method reflection for kernel with struct input (only Allocation method reflection) +#pragma rs reduce(inStruct) accumulator(inStructAccum) combiner(inStructComb) +static void inStructAccum(int *accum, MyStruct val) { } +static void inStructComb(int *accum, const int *other) { } + +// No Java reflection at all for kernel with struct result +#pragma rs reduce(outStruct) accumulator(outStructAccum) outconverter(outStructOut) +static void outStructAccum(int *accum, int val) { } +static void outStructOut(MyStruct *out, const int *accum) { }
diff --git a/slang/tests/P_reduce_general_struct/stderr.txt.expect b/slang/tests/P_reduce_general_struct/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_struct/stderr.txt.expect
diff --git a/slang/tests/P_reduce_general_struct/stdout.txt.expect b/slang/tests/P_reduce_general_struct/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_reduce_general_struct/stdout.txt.expect
diff --git a/slang/tests/P_refcount/refcount.rs b/slang/tests/P_refcount/refcount.rs new file mode 100644 index 0000000..96cb9d6 --- /dev/null +++ b/slang/tests/P_refcount/refcount.rs
@@ -0,0 +1,33 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +rs_allocation globalAlloc; +rs_allocation globalAlloc2; + +struct hasMatrix { + rs_matrix3x3 m; +} ghm; + +static void foo() { + + rs_allocation allocUninit; + rs_allocation allocArr[10]; + allocUninit = globalAlloc; + for (int i = 0; i < 10; i++) { + allocArr[i] = globalAlloc; + } + + return; +} + +void singleStmt() { + struct hasMatrix h = ghm; + ghm = h; + globalAlloc = globalAlloc2; +} + +int root(void) { + foo(); + return 10; +} +
diff --git a/slang/tests/P_refcount/stderr.txt.expect b/slang/tests/P_refcount/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_refcount/stderr.txt.expect
diff --git a/slang/tests/P_refcount/stdout.txt.expect b/slang/tests/P_refcount/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_refcount/stdout.txt.expect
diff --git a/slang/tests/P_root_11_i/root_11_i.rs b/slang/tests/P_root_11_i/root_11_i.rs new file mode 100644 index 0000000..105569f --- /dev/null +++ b/slang/tests/P_root_11_i/root_11_i.rs
@@ -0,0 +1,6 @@ +// -target-api 11 +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *in) { +}
diff --git a/slang/tests/P_root_11_i/stderr.txt.expect b/slang/tests/P_root_11_i/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_11_i/stderr.txt.expect
diff --git a/slang/tests/P_root_11_i/stdout.txt.expect b/slang/tests/P_root_11_i/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_11_i/stdout.txt.expect
diff --git a/slang/tests/P_root_11_iouxy/root_11_iouxy.rs b/slang/tests/P_root_11_iouxy/root_11_iouxy.rs new file mode 100644 index 0000000..2cd0667 --- /dev/null +++ b/slang/tests/P_root_11_iouxy/root_11_iouxy.rs
@@ -0,0 +1,6 @@ +// -target-api 11 +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *in, int *out, const int *usrData, uint32_t x, uint32_t y) { +}
diff --git a/slang/tests/P_root_11_iouxy/stderr.txt.expect b/slang/tests/P_root_11_iouxy/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_11_iouxy/stderr.txt.expect
diff --git a/slang/tests/P_root_11_iouxy/stdout.txt.expect b/slang/tests/P_root_11_iouxy/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_11_iouxy/stdout.txt.expect
diff --git a/slang/tests/P_root_compute/root_compute.rs b/slang/tests/P_root_compute/root_compute.rs new file mode 100644 index 0000000..e668380 --- /dev/null +++ b/slang/tests/P_root_compute/root_compute.rs
@@ -0,0 +1,6 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const void *usrData, + uint32_t x, uint32_t y) { +}
diff --git a/slang/tests/P_root_compute/stderr.txt.expect b/slang/tests/P_root_compute/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_compute/stderr.txt.expect
diff --git a/slang/tests/P_root_compute/stdout.txt.expect b/slang/tests/P_root_compute/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_compute/stdout.txt.expect
diff --git a/slang/tests/P_root_compute_int32_xy/root_compute_int32_xy.rs b/slang/tests/P_root_compute_int32_xy/root_compute_int32_xy.rs new file mode 100644 index 0000000..37df481 --- /dev/null +++ b/slang/tests/P_root_compute_int32_xy/root_compute_int32_xy.rs
@@ -0,0 +1,10 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root_old(const int *ain, int *aout, int x, int y) { + *aout = *ain + x + y; +} + +int RS_KERNEL root_new(int in, int x, int y) { + return in + x + y; +}
diff --git a/slang/tests/P_root_compute_int32_xy/stderr.txt.expect b/slang/tests/P_root_compute_int32_xy/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_compute_int32_xy/stderr.txt.expect
diff --git a/slang/tests/P_root_compute_int32_xy/stdout.txt.expect b/slang/tests/P_root_compute_int32_xy/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_compute_int32_xy/stdout.txt.expect
diff --git a/slang/tests/P_root_compute_non_void_ptr_usrData/root_compute_non_void_ptr_usrData.rs b/slang/tests/P_root_compute_non_void_ptr_usrData/root_compute_non_void_ptr_usrData.rs new file mode 100644 index 0000000..cf7f318 --- /dev/null +++ b/slang/tests/P_root_compute_non_void_ptr_usrData/root_compute_non_void_ptr_usrData.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const int *ain, int *aout, const int *usrData) { +}
diff --git a/slang/tests/P_root_compute_non_void_ptr_usrData/stderr.txt.expect b/slang/tests/P_root_compute_non_void_ptr_usrData/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_compute_non_void_ptr_usrData/stderr.txt.expect
diff --git a/slang/tests/P_root_compute_non_void_ptr_usrData/stdout.txt.expect b/slang/tests/P_root_compute_non_void_ptr_usrData/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_compute_non_void_ptr_usrData/stdout.txt.expect
diff --git a/slang/tests/P_root_graphics/root_graphics.rs b/slang/tests/P_root_graphics/root_graphics.rs new file mode 100644 index 0000000..62ec241 --- /dev/null +++ b/slang/tests/P_root_graphics/root_graphics.rs
@@ -0,0 +1,8 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef int myInt; + +myInt root(void) { + return 10; +}
diff --git a/slang/tests/P_root_graphics/stderr.txt.expect b/slang/tests/P_root_graphics/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_graphics/stderr.txt.expect
diff --git a/slang/tests/P_root_graphics/stdout.txt.expect b/slang/tests/P_root_graphics/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_graphics/stdout.txt.expect
diff --git a/slang/tests/P_root_graphics_13/root_graphics_13.rs b/slang/tests/P_root_graphics_13/root_graphics_13.rs new file mode 100644 index 0000000..882bea1 --- /dev/null +++ b/slang/tests/P_root_graphics_13/root_graphics_13.rs
@@ -0,0 +1,9 @@ +// -target-api 13 +#pragma version(1) +#pragma rs java_package_name(foo) + +typedef int myInt; + +myInt root(myInt launchID) { + return 10; +}
diff --git a/slang/tests/P_root_graphics_13/stderr.txt.expect b/slang/tests/P_root_graphics_13/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_graphics_13/stderr.txt.expect
diff --git a/slang/tests/P_root_graphics_13/stdout.txt.expect b/slang/tests/P_root_graphics_13/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_graphics_13/stdout.txt.expect
diff --git a/slang/tests/P_root_void/root_void.rs b/slang/tests/P_root_void/root_void.rs new file mode 100644 index 0000000..13bed22 --- /dev/null +++ b/slang/tests/P_root_void/root_void.rs
@@ -0,0 +1,83 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +void root(const void *ain, void *aout, const void *usrData, + uint32_t x, uint32_t y) { +} + +void in_only(const void *ain) { +} + +void in_x_only(const void *ain, uint32_t x) { +} + +void in_y_only(const void *ain, uint32_t y) { +} + +void in_x_y_only(const void *ain, uint32_t x, uint32_t y) { +} + +void in_usrdata_only(const void *ain, const void *usrData) { +} + +void in_usrdata_x_only(const void *ain, const void *usrData, uint32_t x) { +} + +void in_usrdata_y_only(const void *ain, const void *usrData, uint32_t y) { +} + +void in_usrdata_x_y_only(const void *ain, const void *usrData, uint32_t x, + uint32_t y) { +} + +void out_only(void *aout) { +} + +void out_x_only(void *aout, uint32_t x) { +} + +void out_y_only(void *aout, uint32_t y) { +} + +void out_x_y_only(void *aout, uint32_t x, uint32_t y) { +} + +void out_usrdata_only(void *aout, const void *usrData) { +} + +void out_usrdata_x_only(void *aout, const void *usrData, uint32_t x) { +} + +void out_usrdata_y_only(void *aout, const void *usrData, uint32_t y) { +} + +void out_usrdata_x_y_only(void *aout, const void *usrData, uint32_t x, + uint32_t y) { +} + +void in_out_only(const void *ain, void *aout) { +} + +void in_out_x_only(const void *ain, void *aout, uint32_t x) { +} + +void in_out_y_only(const void *ain, void *aout, uint32_t y) { +} + +void in_out_x_y_only(const void *ain, void *aout, uint32_t x, uint32_t y) { +} + +void in_out_usrdata_only(const void *ain, void *aout, const void *usrData) { +} + +void in_out_usrdata_x_only(const void *ain, void *aout, const void *usrData, + uint32_t x) { +} + +void in_out_usrdata_y_only(const void *ain, void *aout, const void *usrData, + uint32_t y) { +} + +void in_out_usrdata_x_y_only(const void *ain, void *aout, const void *usrData, + uint32_t x, uint32_t y) { +}
diff --git a/slang/tests/P_root_void/stderr.txt.expect b/slang/tests/P_root_void/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_void/stderr.txt.expect
diff --git a/slang/tests/P_root_void/stdout.txt.expect b/slang/tests/P_root_void/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_root_void/stdout.txt.expect
diff --git a/slang/tests/P_rs_fp_full/rs_fp_full.rs b/slang/tests/P_rs_fp_full/rs_fp_full.rs new file mode 100644 index 0000000..35050fc --- /dev/null +++ b/slang/tests/P_rs_fp_full/rs_fp_full.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#pragma rs_fp_full +
diff --git a/slang/tests/P_rs_fp_full/stderr.txt.expect b/slang/tests/P_rs_fp_full/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_rs_fp_full/stderr.txt.expect
diff --git a/slang/tests/P_rs_fp_full/stdout.txt.expect b/slang/tests/P_rs_fp_full/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_rs_fp_full/stdout.txt.expect
diff --git a/slang/tests/P_rs_fp_imprecise/rs_fp_imprecise.rs b/slang/tests/P_rs_fp_imprecise/rs_fp_imprecise.rs new file mode 100644 index 0000000..98c4c91 --- /dev/null +++ b/slang/tests/P_rs_fp_imprecise/rs_fp_imprecise.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#pragma rs_fp_imprecise +
diff --git a/slang/tests/P_rs_fp_imprecise/stderr.txt.expect b/slang/tests/P_rs_fp_imprecise/stderr.txt.expect new file mode 100644 index 0000000..0d86335 --- /dev/null +++ b/slang/tests/P_rs_fp_imprecise/stderr.txt.expect
@@ -0,0 +1 @@ +rs_fp_imprecise.rs:4:9: warning: rs_fp_imprecise is deprecated. Assuming rs_fp_relaxed instead.
diff --git a/slang/tests/P_rs_fp_imprecise/stdout.txt.expect b/slang/tests/P_rs_fp_imprecise/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_rs_fp_imprecise/stdout.txt.expect
diff --git a/slang/tests/P_rs_fp_relaxed/rs_fp_relaxed.rs b/slang/tests/P_rs_fp_relaxed/rs_fp_relaxed.rs new file mode 100644 index 0000000..dfa8c82 --- /dev/null +++ b/slang/tests/P_rs_fp_relaxed/rs_fp_relaxed.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#pragma rs_fp_relaxed +
diff --git a/slang/tests/P_rs_fp_relaxed/stderr.txt.expect b/slang/tests/P_rs_fp_relaxed/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_rs_fp_relaxed/stderr.txt.expect
diff --git a/slang/tests/P_rs_fp_relaxed/stdout.txt.expect b/slang/tests/P_rs_fp_relaxed/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_rs_fp_relaxed/stdout.txt.expect
diff --git a/slang/tests/P_rs_package_name/rs_package_name.rs b/slang/tests/P_rs_package_name/rs_package_name.rs new file mode 100644 index 0000000..ac62324 --- /dev/null +++ b/slang/tests/P_rs_package_name/rs_package_name.rs
@@ -0,0 +1,4 @@ +// -rs-package-name different.rs.package.name +#pragma version(1) +#pragma rs java_package_name(foo) +
diff --git a/slang/tests/P_rs_package_name/stderr.txt.expect b/slang/tests/P_rs_package_name/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_rs_package_name/stderr.txt.expect
diff --git a/slang/tests/P_rs_package_name/stdout.txt.expect b/slang/tests/P_rs_package_name/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_rs_package_name/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_11/IN_CTS b/slang/tests/P_set_target_api_11/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_11/IN_CTS
diff --git a/slang/tests/P_set_target_api_11/set_target_api_11.rs b/slang/tests/P_set_target_api_11/set_target_api_11.rs new file mode 100644 index 0000000..412b21d --- /dev/null +++ b/slang/tests/P_set_target_api_11/set_target_api_11.rs
@@ -0,0 +1,21 @@ +// -target-api 11 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 11 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_11/stderr.txt.expect b/slang/tests/P_set_target_api_11/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_11/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_11/stdout.txt.expect b/slang/tests/P_set_target_api_11/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_11/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_12/IN_CTS b/slang/tests/P_set_target_api_12/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_12/IN_CTS
diff --git a/slang/tests/P_set_target_api_12/set_target_api_12.rs b/slang/tests/P_set_target_api_12/set_target_api_12.rs new file mode 100644 index 0000000..69e36a4 --- /dev/null +++ b/slang/tests/P_set_target_api_12/set_target_api_12.rs
@@ -0,0 +1,21 @@ +// -target-api 12 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 12 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_12/stderr.txt.expect b/slang/tests/P_set_target_api_12/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_12/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_12/stdout.txt.expect b/slang/tests/P_set_target_api_12/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_12/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_13/IN_CTS b/slang/tests/P_set_target_api_13/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_13/IN_CTS
diff --git a/slang/tests/P_set_target_api_13/set_target_api_13.rs b/slang/tests/P_set_target_api_13/set_target_api_13.rs new file mode 100644 index 0000000..64c8cac --- /dev/null +++ b/slang/tests/P_set_target_api_13/set_target_api_13.rs
@@ -0,0 +1,21 @@ +// -target-api 13 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 13 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_13/stderr.txt.expect b/slang/tests/P_set_target_api_13/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_13/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_13/stdout.txt.expect b/slang/tests/P_set_target_api_13/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_13/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_14/IN_CTS b/slang/tests/P_set_target_api_14/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_14/IN_CTS
diff --git a/slang/tests/P_set_target_api_14/set_target_api_14.rs b/slang/tests/P_set_target_api_14/set_target_api_14.rs new file mode 100644 index 0000000..b2be554 --- /dev/null +++ b/slang/tests/P_set_target_api_14/set_target_api_14.rs
@@ -0,0 +1,21 @@ +// -target-api 14 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 14 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_14/stderr.txt.expect b/slang/tests/P_set_target_api_14/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_14/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_14/stdout.txt.expect b/slang/tests/P_set_target_api_14/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_14/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_15/IN_CTS b/slang/tests/P_set_target_api_15/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_15/IN_CTS
diff --git a/slang/tests/P_set_target_api_15/set_target_api_15.rs b/slang/tests/P_set_target_api_15/set_target_api_15.rs new file mode 100644 index 0000000..f9d2b59 --- /dev/null +++ b/slang/tests/P_set_target_api_15/set_target_api_15.rs
@@ -0,0 +1,21 @@ +// -target-api 15 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 15 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_15/stderr.txt.expect b/slang/tests/P_set_target_api_15/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_15/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_15/stdout.txt.expect b/slang/tests/P_set_target_api_15/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_15/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_16/IN_CTS b/slang/tests/P_set_target_api_16/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_16/IN_CTS
diff --git a/slang/tests/P_set_target_api_16/set_target_api_16.rs b/slang/tests/P_set_target_api_16/set_target_api_16.rs new file mode 100644 index 0000000..a0f823f --- /dev/null +++ b/slang/tests/P_set_target_api_16/set_target_api_16.rs
@@ -0,0 +1,21 @@ +// -target-api 16 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 16 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_16/stderr.txt.expect b/slang/tests/P_set_target_api_16/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_16/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_16/stdout.txt.expect b/slang/tests/P_set_target_api_16/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_16/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_17/IN_CTS b/slang/tests/P_set_target_api_17/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_17/IN_CTS
diff --git a/slang/tests/P_set_target_api_17/set_target_api_17.rs b/slang/tests/P_set_target_api_17/set_target_api_17.rs new file mode 100644 index 0000000..3361c48 --- /dev/null +++ b/slang/tests/P_set_target_api_17/set_target_api_17.rs
@@ -0,0 +1,21 @@ +// -target-api 17 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 17 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_17/stderr.txt.expect b/slang/tests/P_set_target_api_17/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_17/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_17/stdout.txt.expect b/slang/tests/P_set_target_api_17/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_17/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_18/IN_CTS b/slang/tests/P_set_target_api_18/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_18/IN_CTS
diff --git a/slang/tests/P_set_target_api_18/set_target_api_18.rs b/slang/tests/P_set_target_api_18/set_target_api_18.rs new file mode 100644 index 0000000..a898735 --- /dev/null +++ b/slang/tests/P_set_target_api_18/set_target_api_18.rs
@@ -0,0 +1,21 @@ +// -target-api 18 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 18 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_18/stderr.txt.expect b/slang/tests/P_set_target_api_18/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_18/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_18/stdout.txt.expect b/slang/tests/P_set_target_api_18/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_18/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_19/IN_CTS b/slang/tests/P_set_target_api_19/IN_CTS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_19/IN_CTS
diff --git a/slang/tests/P_set_target_api_19/set_target_api_19.rs b/slang/tests/P_set_target_api_19/set_target_api_19.rs new file mode 100644 index 0000000..6d290b9 --- /dev/null +++ b/slang/tests/P_set_target_api_19/set_target_api_19.rs
@@ -0,0 +1,21 @@ +// -target-api 19 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#if RS_VERSION != 19 +#error Invalid RS_VERSION +#endif + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_19/stderr.txt.expect b/slang/tests/P_set_target_api_19/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_19/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_19/stdout.txt.expect b/slang/tests/P_set_target_api_19/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_19/stdout.txt.expect
diff --git a/slang/tests/P_set_target_api_development/set_target_api_development.rs b/slang/tests/P_set_target_api_development/set_target_api_development.rs new file mode 100644 index 0000000..0bcad66 --- /dev/null +++ b/slang/tests/P_set_target_api_development/set_target_api_development.rs
@@ -0,0 +1,17 @@ +// -target-api 0 +#pragma version(1) +#pragma rs java_package_name(android.renderscript.cts) + +#define RS_MSG_TEST_PASSED 100 +#define RS_MSG_TEST_FAILED 101 + +void check(unsigned int version) { + if (version != RS_VERSION) { + rsDebug("version: ", version); + rsDebug("RS_VERSION: ", RS_VERSION); + rsSendToClient(RS_MSG_TEST_FAILED); + } else { + rsSendToClientBlocking(RS_MSG_TEST_PASSED); + } +} +
diff --git a/slang/tests/P_set_target_api_development/stderr.txt.expect b/slang/tests/P_set_target_api_development/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_development/stderr.txt.expect
diff --git a/slang/tests/P_set_target_api_development/stdout.txt.expect b/slang/tests/P_set_target_api_development/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_set_target_api_development/stdout.txt.expect
diff --git a/slang/tests/P_static_struct/static_struct.rs b/slang/tests/P_static_struct/static_struct.rs new file mode 100644 index 0000000..0b3e9ec --- /dev/null +++ b/slang/tests/P_static_struct/static_struct.rs
@@ -0,0 +1,11 @@ +// -target-api 12 +#pragma version(1) +#pragma rs java_package_name(com.example); + +typedef struct Plane_s { + float3 point; +} Plane; + +static Plane carouselPlane = { + { 0.0f, 0.0f, 0.0f } +};
diff --git a/slang/tests/P_static_struct/stderr.txt.expect b/slang/tests/P_static_struct/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_static_struct/stderr.txt.expect
diff --git a/slang/tests/P_static_struct/stdout.txt.expect b/slang/tests/P_static_struct/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_static_struct/stdout.txt.expect
diff --git a/slang/tests/P_str_escape/stderr.txt.expect b/slang/tests/P_str_escape/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_str_escape/stderr.txt.expect
diff --git a/slang/tests/P_str_escape/stdout.txt.expect b/slang/tests/P_str_escape/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_str_escape/stdout.txt.expect
diff --git "a/slang/tests/P_str_escape/str\\\\escape.rs" "b/slang/tests/P_str_escape/str\\\\escape.rs" new file mode 100644 index 0000000..b2072d5 --- /dev/null +++ "b/slang/tests/P_str_escape/str\\\\escape.rs"
@@ -0,0 +1,2 @@ +#pragma version(1) +#pragma rs java_package_name(foo)
diff --git a/slang/tests/P_struct_matrix/stderr.txt.expect b/slang/tests/P_struct_matrix/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_struct_matrix/stderr.txt.expect
diff --git a/slang/tests/P_struct_matrix/stdout.txt.expect b/slang/tests/P_struct_matrix/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_struct_matrix/stdout.txt.expect
diff --git a/slang/tests/P_struct_matrix/struct_matrix.rs b/slang/tests/P_struct_matrix/struct_matrix.rs new file mode 100644 index 0000000..353238b --- /dev/null +++ b/slang/tests/P_struct_matrix/struct_matrix.rs
@@ -0,0 +1,31 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +struct hasMatrix { + int j; + rs_matrix3x3 m; + int i; +} ghm; + +extern foo(struct hasMatrix*); + +void singleStmt() { + struct hasMatrix h = ghm; +} + +struct new_matrix { + float f[2]; +}; + +struct new_struct { + struct new_matrix m; + rs_matrix3x3 t; + int i; +} newm; + +void newstmt() { + struct new_struct h = {1.f, 2.f, 3}; + struct new_struct h_uninit; + struct new_struct empty_init = {}; +} +
diff --git a/slang/tests/P_use_RS_VERSION/stderr.txt.expect b/slang/tests/P_use_RS_VERSION/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_use_RS_VERSION/stderr.txt.expect
diff --git a/slang/tests/P_use_RS_VERSION/stdout.txt.expect b/slang/tests/P_use_RS_VERSION/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_use_RS_VERSION/stdout.txt.expect
diff --git a/slang/tests/P_use_RS_VERSION/use_RS_VERSION.rs b/slang/tests/P_use_RS_VERSION/use_RS_VERSION.rs new file mode 100644 index 0000000..ae7a3ad --- /dev/null +++ b/slang/tests/P_use_RS_VERSION/use_RS_VERSION.rs
@@ -0,0 +1,5 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +int i = RS_VERSION; +
diff --git a/slang/tests/P_verbose/stderr.txt.expect b/slang/tests/P_verbose/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_verbose/stderr.txt.expect
diff --git a/slang/tests/P_verbose/stdout.txt.expect b/slang/tests/P_verbose/stdout.txt.expect new file mode 100644 index 0000000..bb8a171 --- /dev/null +++ b/slang/tests/P_verbose/stdout.txt.expect
@@ -0,0 +1 @@ +Generating ScriptC_verbose.java
diff --git a/slang/tests/P_verbose/verbose.rs b/slang/tests/P_verbose/verbose.rs new file mode 100644 index 0000000..7815a77 --- /dev/null +++ b/slang/tests/P_verbose/verbose.rs
@@ -0,0 +1,3 @@ +// -v +#pragma version(1) +#pragma rs java_package_name(foo)
diff --git a/slang/tests/P_warnings/stderr.txt.expect b/slang/tests/P_warnings/stderr.txt.expect new file mode 100644 index 0000000..00d6d40 --- /dev/null +++ b/slang/tests/P_warnings/stderr.txt.expect
@@ -0,0 +1,7 @@ +warnings.rs:6:1: warning: control reaches end of non-void function +warnings.rs:9:7: warning: unused variable 'k' +warnings.rs:11:7: warning: unused variable 'j' +warnings.rs:11:11: warning: variable 'l' is uninitialized when used here +warnings.rs:10:8: note: initialize the variable 'l' to silence this warning +warnings.rs:5:12: warning: unused function 'foo' +warnings.rs:8:13: warning: unused function 'bar'
diff --git a/slang/tests/P_warnings/stdout.txt.expect b/slang/tests/P_warnings/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_warnings/stdout.txt.expect
diff --git a/slang/tests/P_warnings/warnings.rs b/slang/tests/P_warnings/warnings.rs new file mode 100644 index 0000000..f419d9c --- /dev/null +++ b/slang/tests/P_warnings/warnings.rs
@@ -0,0 +1,12 @@ +// -Wall +#pragma version(1) +#pragma rs java_package_name(foo) + +static int foo() { +} + +static void bar() { + int k; + int l; + int j = l + 1; +}
diff --git a/slang/tests/P_warnings_deprecated/deprecated.rs b/slang/tests/P_warnings_deprecated/deprecated.rs new file mode 100644 index 0000000..4e5f5af --- /dev/null +++ b/slang/tests/P_warnings_deprecated/deprecated.rs
@@ -0,0 +1,11 @@ +// -target-api 22 +#pragma version(1) +#pragma rs java_package_name(foo) + +char out; +rs_allocation al; + +void foo(char in) { + out = rsClamp(in, (char) 1, (char) 4); + al = rsGetAllocation((void*) 33); +}
diff --git a/slang/tests/P_warnings_deprecated/stderr.txt.expect b/slang/tests/P_warnings_deprecated/stderr.txt.expect new file mode 100644 index 0000000..95402b7 --- /dev/null +++ b/slang/tests/P_warnings_deprecated/stderr.txt.expect
@@ -0,0 +1,4 @@ +deprecated.rs:9:9: warning: 'rsClamp' is deprecated: Use clamp() instead. +../../../../../frameworks/rs/scriptc/rs_math.rsh:6538:5: note: 'rsClamp' has been explicitly marked deprecated here +deprecated.rs:10:8: warning: 'rsGetAllocation' is deprecated: This function is deprecated and will be removed from the SDK in a future release. +../../../../../frameworks/rs/scriptc/rs_object_info.rsh:381:5: note: 'rsGetAllocation' has been explicitly marked deprecated here
diff --git a/slang/tests/P_warnings_deprecated/stdout.txt.expect b/slang/tests/P_warnings_deprecated/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_warnings_deprecated/stdout.txt.expect
diff --git a/slang/tests/P_warnings_rsSetElementAt/setelementat.rs b/slang/tests/P_warnings_rsSetElementAt/setelementat.rs new file mode 100644 index 0000000..032a456 --- /dev/null +++ b/slang/tests/P_warnings_rsSetElementAt/setelementat.rs
@@ -0,0 +1,52 @@ +#pragma version(1) +#pragma rs java_package_name(foo) + +rs_allocation A; +static void foo() { + // Basic scalar and floating point types. + float a = 4.0f; + double d = 4.0f; + float2 a2 = {4.0f, 4.0f}; + float3 a3 = {4.0f, 4.0f, 4.0f}; + float4 a4 = {4.0f, 4.0f, 4.0f, 4.0f}; + char c = 4; + uchar uc = 4; + short s = 4; + ushort us = 4; + int i = 4; + uint ui = 4; + long l = 4; + ulong ul = 4; + + rsSetElementAt(A, &a, 0, 0); + rsSetElementAt(A, &d, 0, 0); + rsSetElementAt(A, &a2, 0, 0); + rsSetElementAt(A, &a3, 0, 0); + rsSetElementAt(A, &a4, 0, 0); + rsSetElementAt(A, &c, 0, 0); + rsSetElementAt(A, &uc, 0, 0); + rsSetElementAt(A, &s, 0, 0); + rsSetElementAt(A, &us, 0, 0); + rsSetElementAt(A, &i, 0, 0); + rsSetElementAt(A, &ui, 0, 0); + rsSetElementAt(A, &l, 0, 0); + rsSetElementAt(A, &ul, 0, 0); + + // No warnings for complex data types + struct { + int A; + int B; + } P; + rsSetElementAt(A, &P, 0, 0); + + // No warning for 'long long' + long long LL = 4.0f; + rsSetElementAt(A, &LL, 0, 0); + + // Unsupported vector width + typedef int int5 __attribute__((ext_vector_type(5))); + int5 i5 = {5, 5, 5, 5, 5}; + + rsSetElementAt(A, &i5, 0, 0); +} +
diff --git a/slang/tests/P_warnings_rsSetElementAt/stderr.txt.expect b/slang/tests/P_warnings_rsSetElementAt/stderr.txt.expect new file mode 100644 index 0000000..d003f5e --- /dev/null +++ b/slang/tests/P_warnings_rsSetElementAt/stderr.txt.expect
@@ -0,0 +1,13 @@ +setelementat.rs:21:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_float() instead. +setelementat.rs:22:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_double() instead. +setelementat.rs:23:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_float2() instead. +setelementat.rs:24:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_float3() instead. +setelementat.rs:25:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_float4() instead. +setelementat.rs:26:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_char() instead. +setelementat.rs:27:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_uchar() instead. +setelementat.rs:28:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_short() instead. +setelementat.rs:29:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_ushort() instead. +setelementat.rs:30:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_int() instead. +setelementat.rs:31:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_uint() instead. +setelementat.rs:32:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_long() instead. +setelementat.rs:33:5: warning: untyped rsSetElementAt() can reduce performance. Use rsSetElementAt_ulong() instead.
diff --git a/slang/tests/P_warnings_rsSetElementAt/stdout.txt.expect b/slang/tests/P_warnings_rsSetElementAt/stdout.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/slang/tests/P_warnings_rsSetElementAt/stdout.txt.expect
diff --git a/slang/tests/test.py b/slang/tests/test.py new file mode 100755 index 0000000..2544c58 --- /dev/null +++ b/slang/tests/test.py
@@ -0,0 +1,251 @@ +#!/usr/bin/python +# +# Copyright 2010-2012 Google Inc. All Rights Reserved. + +"""Renderscript Compiler Test. + +Runs subdirectories of tests for the Renderscript compiler. +""" + +import filecmp +import glob +import os +import re +import shutil +import subprocess +import sys + +__author__ = 'Android' + + +class Options(object): + def __init__(self): + return + verbose = 0 + cleanup = 1 + updateCTS = 0 + + +def CompareFiles(actual, expect): + """Compares actual and expect for equality.""" + if not os.path.isfile(actual): + if Options.verbose: + print 'Could not find %s' % actual + return False + if not os.path.isfile(expect): + if Options.verbose: + print 'Could not find %s' % expect + return False + + return filecmp.cmp(actual, expect, False) + + +def UpdateFiles(src, dst): + """Update dst if it is different from src.""" + if not CompareFiles(src, dst): + print 'Copying from %s to %s' % (src, dst) + shutil.copyfile(src, dst) + + +def GetCommandLineArgs(filename): + """Extracts command line arguments from first comment line in a file.""" + f = open(filename, 'r') + line = f.readline() + if line[0] == '/' and line [1] == '/': + return line[2:].strip() + else: + return '' + + +def ExecTest(dirname): + """Executes an llvm-rs-cc test from dirname.""" + passed = True + + if Options.verbose != 0: + print 'Testing %s' % dirname + + os.chdir(dirname) + stdout_file = open('stdout.txt', 'w+') + stderr_file = open('stderr.txt', 'w+') + + out_dir = os.environ['ANDROID_HOST_OUT'] + cmd_string = ('%s/bin/llvm-rs-cc -o tmp/ -p tmp/ -MD ' + '-I ../../../../../frameworks/rs/scriptc/ ' + '-I ../../../../../external/clang/lib/Headers/') % out_dir + base_args = cmd_string.split() + rs_files = glob.glob('*.rs') + fs_files = glob.glob('*.fs') + rs_files += fs_files; + rs_files.sort() + + # Extra command line arguments can be placed as // comments at the start of + # any .rs file. We automatically bundle up all of these extra args and invoke + # llvm-rs-cc with them. + extra_args_str = '' + for rs_file in rs_files: + extra_args_str += GetCommandLineArgs(rs_file) + extra_args = extra_args_str.split() + + args = base_args + extra_args + rs_files + + if Options.verbose > 1: + print 'Executing:', + for arg in args: + print arg, + print + + # Execute the command and check the resulting shell return value. + # All tests that are expected to FAIL have directory names that + # start with 'F_'. Other tests that are expected to PASS have + # directory names that start with 'P_'. + ret = 0 + try: + ret = subprocess.call(args, stdout=stdout_file, stderr=stderr_file) + except: + passed = False + + stdout_file.flush() + stderr_file.flush() + + if Options.verbose > 1: + stdout_file.seek(0) + stderr_file.seek(0) + for line in stdout_file: + print 'STDOUT>', line, + for line in stderr_file: + print 'STDERR>', line, + + stdout_file.close() + stderr_file.close() + + if dirname[0:2] == 'F_': + if ret == 0: + passed = False + if Options.verbose: + print 'Command passed on invalid input' + elif dirname[0:2] == 'P_': + if ret != 0: + passed = False + if Options.verbose: + print 'Command failed on valid input' + else: + passed = (ret == 0) + if Options.verbose: + print 'Test Directory name should start with an F or a P' + + if not CompareFiles('stdout.txt', 'stdout.txt.expect'): + passed = False + if Options.verbose: + print 'stdout is different' + if not CompareFiles('stderr.txt', 'stderr.txt.expect'): + passed = False + if Options.verbose: + print 'stderr is different' + java_expect = glob.glob('Script*.java.expect'); + for expect in java_expect: + expect_base = expect[:-7] # strip ".expect" suffix + if Options.verbose: + print 'Comparing ' + expect_base + find = 'tmp/*/' + expect_base + found = glob.glob(find) + if len(found) != 1: + passed = False + if Options.verbose: + print 'unique ' + find + ' not found' + elif not CompareFiles(found[0], expect): + passed = False + if Options.verbose: + print expect_base + ' is different' + + if Options.updateCTS: + # Copy resulting files to appropriate CTS directory (if different). + if passed and glob.glob('IN_CTS'): + cts_path = '../../../../../cts/' + cts_res_raw_path = cts_path + 'tests/res/raw/' + cts_src_path = cts_path + 'tests/tests/renderscript/src/' + for bc_src in glob.glob('tmp/*.bc'): + bc_dst = re.sub('tmp\/', cts_res_raw_path, bc_src, 1) + UpdateFiles(bc_src, bc_dst) + for java_src in glob.glob('tmp/android/renderscript/cts/*.java'): + java_dst = re.sub('tmp\/', cts_src_path, java_src, 1) + UpdateFiles(java_src, java_dst) + + if Options.cleanup: + try: + os.remove('stdout.txt') + os.remove('stderr.txt') + shutil.rmtree('tmp/') + except: + pass + + os.chdir('..') + return passed + + +def Usage(): + """Print out usage information.""" + print ('Usage: %s [OPTION]... [TESTNAME]...' + 'Renderscript Compiler Test Harness\n' + 'Runs TESTNAMEs (all tests by default)\n' + 'Available Options:\n' + ' -h, --help Help message\n' + ' -n, --no-cleanup Don\'t clean up after running tests\n' + ' -u, --update-cts Update CTS test versions\n' + ' -v, --verbose Verbose output. Enter multiple -v to get more verbose.\n' + ) % (sys.argv[0]), + return + + +def main(): + passed = 0 + failed = 0 + files = [] + failed_tests = [] + + for arg in sys.argv[1:]: + if arg in ('-h', '--help'): + Usage() + return 0 + elif arg in ('-n', '--no-cleanup'): + Options.cleanup = 0 + elif arg in ('-u', '--update-cts'): + Options.updateCTS = 1 + elif arg in ('-v', '--verbose'): + Options.verbose += 1 + else: + # Test list to run + if os.path.isdir(arg): + files.append(arg) + else: + print >> sys.stderr, 'Invalid test or option: %s' % arg + return 1 + + if not files: + tmp_files = os.listdir('.') + # Only run tests that are known to PASS or FAIL + # Disabled tests can be marked D_ and invoked explicitly + for f in tmp_files: + if os.path.isdir(f) and (f[0:2] == 'F_' or f[0:2] == 'P_'): + files.append(f) + files.sort() + + for f in files: + if os.path.isdir(f): + if ExecTest(f): + passed += 1 + else: + failed += 1 + failed_tests.append(f) + + print 'Tests Passed: %d\n' % passed, + print 'Tests Failed: %d\n' % failed, + if failed: + print 'Failures:', + for t in failed_tests: + print t, + + return failed != 0 + + +if __name__ == '__main__': + sys.exit(main())